Skip to content

Commit be25fce

Browse files
committed
Merge pull request #2202 from modocache/build-script-impl-cross-variables
[build-script] Remove extra "cross tools" variable
2 parents 37eba5f + 4ac6cb7 commit be25fce

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

utils/build-script-impl

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ KNOWN_SETTINGS=(
189189
darwin-install-extract-symbols "" "whether to extract symbols with dsymutil during installations"
190190
host-target "" "The host target. LLVM, Clang, and Swift will be built for this target. The built LLVM and Clang will be used to compile Swift for the cross-compilation targets. **This argument is required**"
191191
stdlib-deployment-targets "" "space-separated list of targets to compile or cross-compile the Swift standard library for"
192-
cross-compile-tools-deployment-targets "" "space-separated list of targets to cross-compile host Swift tools for"
192+
cross-compile-tools-deployment-targets "" "space-separated list of targets to cross-compile host Swift tools for. We can't run the resulting binaries on the build machine"
193193
skip-merge-lipo-cross-compile-tools "" "set to skip running merge-lipo after installing cross-compiled host Swift tools"
194194
darwin-deployment-version-osx "10.9" "minimum deployment target version for OS X"
195195
darwin-deployment-version-ios "7.0" "minimum deployment target version for iOS"
@@ -517,7 +517,7 @@ function set_deployment_target_based_options() {
517517
)
518518
;;
519519
*)
520-
echo "Unknown deployment target"
520+
echo "Unknown deployment target: ${deployment_target}"
521521
exit 1
522522
;;
523523
esac
@@ -886,21 +886,14 @@ function make_relative_symlink() {
886886
ln -sf "${RELATIVE_SOURCE}" "${TARGET}"
887887
}
888888

889-
# A list of deployment targets to cross-compile the Swift host tools for.
890-
# We can't run the resulting binaries on the build machine.
891-
CROSS_TOOLS_DEPLOYMENT_TARGETS=()
892-
893889
# Sanitize the list of cross-compilation targets.
890+
CROSS_COMPILE_TOOLS_DEPLOYMENT_TARGETS=($CROSS_COMPILE_TOOLS_DEPLOYMENT_TARGETS)
894891
for t in ${CROSS_COMPILE_TOOLS_DEPLOYMENT_TARGETS} ; do
895892
case ${t} in
896893
iphonesimulator-i386 | iphonesimulator-x86_64 | \
897894
iphoneos-arm64 | iphoneos-armv7 | iphoneos-armv7s | \
898895
appletvos-arm64 | appletvsimulator-x86_64 | \
899896
watchos-armv7k | watchsimulator-i386)
900-
CROSS_TOOLS_DEPLOYMENT_TARGETS=(
901-
"${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}"
902-
"${t}"
903-
)
904897
;;
905898
*)
906899
echo "Unknown deployment target: ${t}"
@@ -911,7 +904,7 @@ done
911904

912905
function is_cross_tools_deployment_target() {
913906
local deployment_target="$1"
914-
for t in "${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}" ; do
907+
for t in "${CROSS_COMPILE_TOOLS_DEPLOYMENT_TARGETS[@]}" ; do
915908
if [ "${deployment_target}" == "${t}" ] ; then
916909
echo 1
917910
fi
@@ -1373,7 +1366,7 @@ fi
13731366
# Configure and build each product
13741367
#
13751368
# Start with native deployment targets because the resulting tools are used during cross-compilation.
1376-
for deployment_target in "${HOST_TARGET}" "${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}"; do
1369+
for deployment_target in "${HOST_TARGET}" "${CROSS_COMPILE_TOOLS_DEPLOYMENT_TARGETS[@]}"; do
13771370
set_deployment_target_based_options
13781371

13791372
case "${COMPILER_VENDOR}" in
@@ -2236,7 +2229,7 @@ for deployment_target in "${STDLIB_DEPLOYMENT_TARGETS[@]}"; do
22362229
done
22372230
done
22382231

2239-
for deployment_target in "${HOST_TARGET}" "${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}"; do
2232+
for deployment_target in "${HOST_TARGET}" "${CROSS_COMPILE_TOOLS_DEPLOYMENT_TARGETS[@]}"; do
22402233
set_deployment_target_based_options
22412234

22422235
for product in "${PRODUCTS[@]}"; do
@@ -2405,9 +2398,9 @@ for deployment_target in "${HOST_TARGET}" "${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}"
24052398
done
24062399

24072400
if [[ "${CROSS_COMPILE_TOOLS_DEPLOYMENT_TARGETS}" ]] && [[ ! "${SKIP_MERGE_LIPO_CROSS_COMPILE_TOOLS}" ]] ; then
2408-
echo "--- Merging and running lipo for ${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]} ---"
2401+
echo "--- Merging and running lipo for ${CROSS_COMPILE_TOOLS_DEPLOYMENT_TARGETS[@]} ---"
24092402
lipo_src_dirs=()
2410-
for deployment_target in "${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}"; do
2403+
for deployment_target in "${CROSS_COMPILE_TOOLS_DEPLOYMENT_TARGETS[@]}"; do
24112404
lipo_src_dirs=(
24122405
"${lipo_src_dirs[@]}"
24132406
"${BUILD_DIR}"/intermediate-install/"${deployment_target}"

0 commit comments

Comments
 (0)