From 8536b740e3d438a120b5432fe6cf2b4277f8daa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 18 Jan 2023 21:34:44 +0200 Subject: [PATCH] build-llvm: Use the new LLVM_NATIVE_TOOL_DIR option for pointing out preexisting native tools This allows setting one variable pointing at all tools, instead of setting multiple individual options for all tools. --- build-llvm.sh | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/build-llvm.sh b/build-llvm.sh index ee9e3f2..bf9f4bd 100755 --- a/build-llvm.sh +++ b/build-llvm.sh @@ -171,24 +171,7 @@ if [ -n "$HOST" ]; then if [ -n "$native" ]; then - if [ -x "$native/llvm-tblgen$suffix" ]; then - CMAKEFLAGS="$CMAKEFLAGS -DLLVM_TABLEGEN=$native/llvm-tblgen$suffix" - fi - if [ -x "$native/clang-tblgen$suffix" ]; then - CMAKEFLAGS="$CMAKEFLAGS -DCLANG_TABLEGEN=$native/clang-tblgen$suffix" - fi - if [ -x "$native/lldb-tblgen$suffix" ]; then - CMAKEFLAGS="$CMAKEFLAGS -DLLDB_TABLEGEN=$native/lldb-tblgen$suffix" - fi - if [ -x "$native/llvm-config$suffix" ]; then - CMAKEFLAGS="$CMAKEFLAGS -DLLVM_CONFIG_PATH=$native/llvm-config$suffix" - fi - if [ -x "$native/clang-pseudo-gen$suffix" ]; then - CMAKEFLAGS="$CMAKEFLAGS -DCLANG_PSEUDO_GEN=$native/clang-pseudo-gen$suffix" - fi - if [ -x "$native/clang-tidy-confusable-chars-gen$suffix" ]; then - CMAKEFLAGS="$CMAKEFLAGS -DCLANG_TIDY_CONFUSABLE_CHARS_GEN=$native/clang-tidy-confusable-chars-gen$suffix" - fi + CMAKEFLAGS="$CMAKEFLAGS -DLLVM_NATIVE_TOOL_DIR=$native" fi CROSS_ROOT=$(cd $(dirname $(command -v $HOST-gcc))/../$HOST && pwd) CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH=$CROSS_ROOT"