1#!/usr/bin/env bash 2 3# This script starts a shell in a container running the libc++ build bot Docker 4# image. That image emulates the environment used by libc++'s Linux builders on 5# BuildKite. 6# 7# Once you're inside the shell, you can run the various build jobs with the 8# `run-buildbot` script. 9# 10# This script must be run from within the LLVM monorepo. Furthermore, the 11# monorepo will be mounted as `/llvm` inside the container. Be careful, the 12# state in `/llvm` is shared between the container and the host machine, which 13# is useful for editing files on the host machine and re-running the build bot 14# in the container. 15 16set -e 17 18MONOREPO_ROOT="$(git rev-parse --show-toplevel)" 19if [[ ! -d "${MONOREPO_ROOT}/libcxx/utils/ci" ]]; then 20 echo "Was unable to find the root of the LLVM monorepo; are you running from within the monorepo?" 21 exit 1 22fi 23docker pull ldionne/libcxx-builder 24docker run -it --volume "${MONOREPO_ROOT}:/llvm" --workdir "/llvm" ldionne/libcxx-builder bash 25