Skip to content

Commit 0996da0

Browse files
author
Davide Italiano
committed
[build-script-impl] Fix cross-compilation of swift.
Swift requires now tablegen to build Options.inc, so build script has to be taught about picking the host llvm-tablegen instead of the target llvm-tablegen. <rdar://problem/55916729>
1 parent 5574372 commit 0996da0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

utils/build-script-impl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2248,6 +2248,13 @@ for host in "${ALL_HOSTS[@]}"; do
22482248
build_tests_this_time=${SWIFT_INCLUDE_TESTS}
22492249
fi
22502250

2251+
if [[ $(is_cross_tools_host ${host}) ]] ; then
2252+
cmake_options=(
2253+
"${cmake_options[@]}"
2254+
-DLLVM_TABLEGEN=$(build_directory "${LOCAL_HOST}" llvm)/bin/llvm-tblgen
2255+
)
2256+
fi
2257+
22512258
# Command-line parameters override any autodetection that we
22522259
# might have done.
22532260
if [[ "${NATIVE_LLVM_TOOLS_PATH}" ]] ; then

0 commit comments

Comments
 (0)