@@ -1463,6 +1463,26 @@ for host in "${ALL_HOSTS[@]}"; do
1463
1463
echo " Running Swift benchmarks for: ${SWIFT_RUN_BENCHMARK_TARGETS[@]} "
1464
1464
fi
1465
1465
1466
+ if [[ $( is_cross_tools_host ${host} ) ]] ; then
1467
+
1468
+ if [[ " ${CROSS_COMPILE_WITH_HOST_TOOLS} " ]]; then
1469
+ # Optionally use the freshly-built host copy of clang to build
1470
+ # for foreign hosts.
1471
+ COMMON_CMAKE_OPTIONS+=(
1472
+ -DCMAKE_C_COMPILER=" $( build_directory ${LOCAL_HOST} llvm) /bin/clang"
1473
+ -DCMAKE_CXX_COMPILER=" $( build_directory ${LOCAL_HOST} llvm) /bin/clang++"
1474
+ )
1475
+ fi
1476
+
1477
+ # CMake can't relink when using Ninja, but that's okay -
1478
+ # we don't need a build-local rpath because we can't run cross-compiled products
1479
+ if [[ " ${CMAKE_GENERATOR} " == " Ninja" ]]; then
1480
+ COMMON_CMAKE_OPTIONS+=(
1481
+ -DCMAKE_BUILD_WITH_INSTALL_RPATH=" 1"
1482
+ )
1483
+ fi
1484
+ fi
1485
+
1466
1486
case " ${COMPILER_VENDOR} " in
1467
1487
none)
1468
1488
;;
@@ -1564,26 +1584,6 @@ for host in "${ALL_HOSTS[@]}"; do
1564
1584
build_dir=$( build_directory ${host} ${product} )
1565
1585
build_targets=(all)
1566
1586
1567
- if [[ $( is_cross_tools_host ${host} ) ]] ; then
1568
-
1569
- if [[ " ${CROSS_COMPILE_WITH_HOST_TOOLS} " ]]; then
1570
- # Optionally use the freshly-built host copy of clang to build
1571
- # for foreign hosts.
1572
- COMMON_CMAKE_OPTIONS+=(
1573
- -DCMAKE_C_COMPILER=" $( build_directory ${LOCAL_HOST} llvm) /bin/clang"
1574
- -DCMAKE_CXX_COMPILER=" $( build_directory ${LOCAL_HOST} llvm) /bin/clang++"
1575
- )
1576
- fi
1577
-
1578
- # CMake can't relink when using Ninja, but that's okay -
1579
- # we don't need a build-local rpath because we can't run cross-compiled products
1580
- if [[ " ${CMAKE_GENERATOR} " == " Ninja" ]]; then
1581
- COMMON_CMAKE_OPTIONS+=(
1582
- -DCMAKE_BUILD_WITH_INSTALL_RPATH=" 1"
1583
- )
1584
- fi
1585
- fi
1586
-
1587
1587
cmake_options=(" ${COMMON_CMAKE_OPTIONS[@]} " )
1588
1588
1589
1589
# Add in gold linker support if requested.
0 commit comments