Skip to content

Commit 8536b74

Browse files
committed
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.
1 parent c49460a commit 8536b74

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

build-llvm.sh

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -171,24 +171,7 @@ if [ -n "$HOST" ]; then
171171

172172

173173
if [ -n "$native" ]; then
174-
if [ -x "$native/llvm-tblgen$suffix" ]; then
175-
CMAKEFLAGS="$CMAKEFLAGS -DLLVM_TABLEGEN=$native/llvm-tblgen$suffix"
176-
fi
177-
if [ -x "$native/clang-tblgen$suffix" ]; then
178-
CMAKEFLAGS="$CMAKEFLAGS -DCLANG_TABLEGEN=$native/clang-tblgen$suffix"
179-
fi
180-
if [ -x "$native/lldb-tblgen$suffix" ]; then
181-
CMAKEFLAGS="$CMAKEFLAGS -DLLDB_TABLEGEN=$native/lldb-tblgen$suffix"
182-
fi
183-
if [ -x "$native/llvm-config$suffix" ]; then
184-
CMAKEFLAGS="$CMAKEFLAGS -DLLVM_CONFIG_PATH=$native/llvm-config$suffix"
185-
fi
186-
if [ -x "$native/clang-pseudo-gen$suffix" ]; then
187-
CMAKEFLAGS="$CMAKEFLAGS -DCLANG_PSEUDO_GEN=$native/clang-pseudo-gen$suffix"
188-
fi
189-
if [ -x "$native/clang-tidy-confusable-chars-gen$suffix" ]; then
190-
CMAKEFLAGS="$CMAKEFLAGS -DCLANG_TIDY_CONFUSABLE_CHARS_GEN=$native/clang-tidy-confusable-chars-gen$suffix"
191-
fi
174+
CMAKEFLAGS="$CMAKEFLAGS -DLLVM_NATIVE_TOOL_DIR=$native"
192175
fi
193176
CROSS_ROOT=$(cd $(dirname $(command -v $HOST-gcc))/../$HOST && pwd)
194177
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_FIND_ROOT_PATH=$CROSS_ROOT"

0 commit comments

Comments
 (0)