diff --git a/build-all.sh b/build-all.sh index 9294ed07..2326b495 100755 --- a/build-all.sh +++ b/build-all.sh @@ -24,7 +24,7 @@ HOST_ARGS="" while [ $# -gt 0 ]; do case "$1" in - --enable-asserts|--disable-dylib|--with-clang|--thinlto|--use-linker=*) + --enable-asserts|--disable-dylib|--with-clang|--thinlto|--use-linker=*|--llvm-repository=*|--llvm-version=*) LLVM_ARGS="$LLVM_ARGS $1" ;; --host-clang|--host-clang=*) diff --git a/build-llvm.sh b/build-llvm.sh index d4d3d920..e30fbe3e 100755 --- a/build-llvm.sh +++ b/build-llvm.sh @@ -25,6 +25,7 @@ ASSERTSSUFFIX="" LLDB=ON CLANG_TOOLS_EXTRA=ON INSTRUMENTED=OFF +LLVM_REPOSITORY='https://github.com/llvm/llvm-project.git' while [ $# -gt 0 ]; do case "$1" in @@ -57,6 +58,12 @@ while [ $# -gt 0 ]; do --full-llvm) FULL_LLVM=1 ;; + --llvm-repository=*) + LLVM_REPOSITORY="${1#*=}" + ;; + --llvm-version=*) + LLVM_VERSION="${1#*=}" + ;; --host=*) HOST="${1#*=}" ;; @@ -121,7 +128,7 @@ if [ ! -d llvm-project ]; then mkdir llvm-project cd llvm-project git init - git remote add origin https://github.com/llvm/llvm-project.git + git remote add origin "${LLVM_REPOSITORY}" cd .. CHECKOUT=1 fi