Skip to content

Commit a995362

Browse files
committed
Merge pull request #2832 from karwa/common-cmake-opts
2 parents ceefc13 + d9dccfa commit a995362

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

utils/build-script-impl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,12 +1506,14 @@ for host in "${ALL_HOSTS[@]}"; do
15061506
echo "Running Swift benchmarks for: ${SWIFT_RUN_BENCHMARK_TARGETS[@]}"
15071507
fi
15081508

1509+
common_cmake_options_host=("${COMMON_CMAKE_OPTIONS[@]}")
1510+
15091511
if [[ $(is_cross_tools_host ${host}) ]] ; then
15101512

15111513
if [[ "${CROSS_COMPILE_WITH_HOST_TOOLS}" ]]; then
15121514
# Optionally use the freshly-built host copy of clang to build
15131515
# for foreign hosts.
1514-
COMMON_CMAKE_OPTIONS+=(
1516+
common_cmake_options_host+=(
15151517
-DCMAKE_C_COMPILER="$(build_directory ${LOCAL_HOST} llvm)/bin/clang"
15161518
-DCMAKE_CXX_COMPILER="$(build_directory ${LOCAL_HOST} llvm)/bin/clang++"
15171519
)
@@ -1520,7 +1522,7 @@ for host in "${ALL_HOSTS[@]}"; do
15201522
# CMake can't relink when using Ninja, but that's okay -
15211523
# we don't need a build-local rpath because we can't run cross-compiled products
15221524
if [[ "${CMAKE_GENERATOR}" == "Ninja" ]]; then
1523-
COMMON_CMAKE_OPTIONS+=(
1525+
common_cmake_options_host+=(
15241526
-DCMAKE_BUILD_WITH_INSTALL_RPATH="1"
15251527
)
15261528
fi
@@ -1627,7 +1629,7 @@ for host in "${ALL_HOSTS[@]}"; do
16271629
build_dir=$(build_directory ${host} ${product})
16281630
build_targets=(all)
16291631

1630-
cmake_options=("${COMMON_CMAKE_OPTIONS[@]}")
1632+
cmake_options=("${common_cmake_options_host[@]}")
16311633

16321634
# Add in gold linker support if requested.
16331635
if [[ "${USE_GOLD_LINKER}" ]]; then
@@ -1702,7 +1704,6 @@ for host in "${ALL_HOSTS[@]}"; do
17021704

17031705
swift)
17041706

1705-
cmake_options=("${COMMON_CMAKE_OPTIONS[@]}")
17061707
if [[ "${USE_GOLD_LINKER}" ]]; then
17071708
# Swift will selectively use the gold linker on all
17081709
# parts except building the standard library. We

0 commit comments

Comments
 (0)