From 255286eb725d1fa08e9f609e19197eeb08249d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 23 Oct 2019 12:54:34 +0000 Subject: [PATCH] build-llvm: Fix only checking out the source This is used if calling build-compiler-rt.sh or build-libcxx.sh with the environment variable SYNC set. --- build-llvm.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/build-llvm.sh b/build-llvm.sh index 573f5a0..f51bd89 100755 --- a/build-llvm.sh +++ b/build-llvm.sh @@ -19,13 +19,15 @@ while [ $# -gt 0 ]; do fi shift done -if [ -z "$PREFIX" ]; then - echo $0 [--enable-asserts] [--full-llvm] dest - exit 1 -fi +if [ -z "$CHECKOUT_ONLY" ]; then + if [ -z "$PREFIX" ]; then + echo $0 [--enable-asserts] [--full-llvm] dest + exit 1 + fi -mkdir -p "$PREFIX" -PREFIX="$(cd "$PREFIX" && pwd)" + mkdir -p "$PREFIX" + PREFIX="$(cd "$PREFIX" && pwd)" +fi : ${CORES:=$(nproc 2>/dev/null)} : ${CORES:=$(sysctl -n hw.ncpu 2>/dev/null)}