Skip to content

Commit 1433504

Browse files
committed
[apple-ci] Allow invoking the build script from within the llvm-project dir
1 parent c59e45d commit 1433504

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apple-ci/clang/am/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ set -eu
44
SRC_DIR=$PWD/llvm-project
55
BUILD_DIR=$PWD/build
66

7+
if [[ -e llvm/CMakeLists.txt && -e clang && -e compiler-rt ]]; then
8+
# Looks like we are already in the llvm-project directory.
9+
# Adjust the source and build directory ___location variables accordingly.
10+
SRC_DIR=$PWD
11+
BUILD_DIR=$PWD/../build
12+
fi
13+
714
for arg; do
815
case $arg in
916
--src=*) SRC_DIR="${arg##*=}"; shift ;;

0 commit comments

Comments
 (0)