build-llvm: Add an option --no-llvm-tool-reuse
This allows using the build-llvm.sh script for doing a cross build of LLVM, while the same directory may contain a native build which can be out of sync with the actual source.
This commit is contained in:
1 parent
a7f4cf9670
commit
b6b58d96d9
2 files changed
+7
-1
No files matched your search
@@ -31,6 +31,9 @@ while [ $# -gt 0 ]; do
|
|||||||
--disable-clang-tools-extra)
|
--disable-clang-tools-extra)
|
||||||
LLVM_ARGS="$LLVM_ARGS $1"
|
LLVM_ARGS="$LLVM_ARGS $1"
|
||||||
;;
|
;;
|
||||||
|
--no-llvm-tool-reuse)
|
||||||
|
LLVM_ARGS="$LLVM_ARGS $1"
|
||||||
|
;;
|
||||||
--disable-mingw-w64-tools)
|
--disable-mingw-w64-tools)
|
||||||
NO_MINGW_W64_TOOLS=1
|
NO_MINGW_W64_TOOLS=1
|
||||||
;;
|
;;
|
||||||
|
|||||||
+4
-1
@@ -65,6 +65,9 @@ while [ $# -gt 0 ]; do
|
|||||||
--disable-clang-tools-extra)
|
--disable-clang-tools-extra)
|
||||||
unset CLANG_TOOLS_EXTRA
|
unset CLANG_TOOLS_EXTRA
|
||||||
;;
|
;;
|
||||||
|
--no-llvm-tool-reuse)
|
||||||
|
NO_LLVM_TOOL_REUSE=1
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
PREFIX="$1"
|
PREFIX="$1"
|
||||||
;;
|
;;
|
||||||
@@ -186,7 +189,7 @@ if [ -n "$HOST" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -n "$native" ]; then
|
if [ -n "$native" ] && [ -z "$NO_LLVM_TOOL_REUSE" ]; then
|
||||||
CMAKEFLAGS="$CMAKEFLAGS -DLLVM_NATIVE_TOOL_DIR=$native"
|
CMAKEFLAGS="$CMAKEFLAGS -DLLVM_NATIVE_TOOL_DIR=$native"
|
||||||
fi
|
fi
|
||||||
CROSS_ROOT=$(cd $(dirname $(command -v $HOST-gcc))/../$HOST && pwd)
|
CROSS_ROOT=$(cd $(dirname $(command -v $HOST-gcc))/../$HOST && pwd)
|
||||||
|
|||||||
Reference in new issue
Block a user