Skip to content

Commit 71cefff

Browse files
authored
Merge pull request #11733 from Rostepher/build-script-whitespace
Removed trailing whitespace in build-script and build-script-impl
2 parents 0406359 + 572be69 commit 71cefff

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

utils/build-script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ from swift_build_support.swift_build_support.SwiftBuildSupport import (
4040
SWIFT_REPO_NAME,
4141
SWIFT_SOURCE_ROOT,
4242
get_all_preset_names,
43-
get_preset_options,
43+
get_preset_options,
4444
)
4545

4646
from swift_build_support.swift_build_support.cmake import CMake

utils/build-script-impl

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ function is_llvm_module_build_enabled() {
377377
# Check if the named action should be run in the given script invocation.
378378
function should_execute_action() {
379379
local name="$1"
380-
380+
381381
if [[ "${ONLY_EXECUTE}" = "all" ]] ||
382382
[[ "${ONLY_EXECUTE}" = "${name}" ]]; then
383383
echo 1
@@ -413,7 +413,7 @@ function set_build_options_for_host() {
413413

414414
# Hosts which can be cross-compiled must specify:
415415
# SWIFT_HOST_TRIPLE and llvm_target_arch (as well as usual HOST_VARIANT flags)
416-
416+
417417
case ${host} in
418418
freebsd-x86_64)
419419
SWIFT_HOST_VARIANT="freebsd"
@@ -517,7 +517,7 @@ function set_build_options_for_host() {
517517
SWIFT_HOST_VARIANT="iphonesimulator"
518518
SWIFT_HOST_VARIANT_SDK="IOS_SIMULATOR"
519519
SWIFT_HOST_VARIANT_ARCH="x86_64"
520-
520+
521521
cmake_osx_deployment_target=""
522522
cmark_cmake_options=(
523523
-DCMAKE_C_FLAGS="$(cmark_c_flags ${host})"
@@ -535,7 +535,7 @@ function set_build_options_for_host() {
535535
SWIFT_HOST_VARIANT="iphoneos"
536536
SWIFT_HOST_VARIANT_SDK="IOS"
537537
SWIFT_HOST_VARIANT_ARCH="armv7"
538-
538+
539539
cmake_osx_deployment_target=""
540540
cmark_cmake_options=(
541541
-DCMAKE_C_FLAGS="$(cmark_c_flags ${host})"
@@ -589,7 +589,7 @@ function set_build_options_for_host() {
589589
SWIFT_HOST_VARIANT="appletvsimulator"
590590
SWIFT_HOST_VARIANT_SDK="TVOS_SIMULATOR"
591591
SWIFT_HOST_VARIANT_ARCH="x86_64"
592-
592+
593593
cmake_osx_deployment_target=""
594594
cmark_cmake_options=(
595595
-DCMAKE_C_FLAGS="$(cmark_c_flags ${host})"
@@ -1004,8 +1004,8 @@ function not() {
10041004
fi
10051005
}
10061006

1007-
function join {
1008-
local IFS="$1"; shift; echo "$*";
1007+
function join {
1008+
local IFS="$1"; shift; echo "$*";
10091009
}
10101010

10111011
function false_true() {
@@ -1091,7 +1091,7 @@ splitSemicolonDelimitedInstallPrefixes
10911091

10921092
function get_host_install_prefix() {
10931093
local host="$1"
1094-
1094+
10951095
if [[ $(is_cross_tools_host ${host}) ]] && [[ ${#CROSS_COMPILE_INSTALL_PREFIXES[@]} -gt 0 ]]; then
10961096

10971097
# Find the host's index in CROSS_COMPILE_HOSTS.
@@ -1134,7 +1134,7 @@ function is_cross_tools_host() {
11341134
function should_include_host_in_lipo() {
11351135
local host="$1"
11361136
if [[ $(has_cross_compile_hosts) ]] && [[ -z "${SKIP_MERGE_LIPO_CROSS_COMPILE_TOOLS}" ]]; then
1137-
case ${host} in
1137+
case ${host} in
11381138
iphone* | appletv* | watch* )
11391139
echo 1
11401140
;;
@@ -1144,7 +1144,7 @@ function should_include_host_in_lipo() {
11441144

11451145
function host_has_darwin_symbols() {
11461146
local host="$1"
1147-
case ${host} in
1147+
case ${host} in
11481148
macosx* | iphone* | appletv* | watch* )
11491149
echo 1
11501150
;;
@@ -1156,11 +1156,11 @@ function get_stdlib_targets_for_host() {
11561156
# FIXME: STDLIB_DEPLOYMENT_TARGETS argument assumed to apply when Host == Build
11571157
# Cross-compile Hosts are only built with their native standard libraries.
11581158
# To fix this, we would need to pass in a list of stdlib targets _per host_,
1159-
# and the SWIFT_SDKS parameters would need to be able to capture both the SDK
1159+
# and the SWIFT_SDKS parameters would need to be able to capture both the SDK
11601160
# and architecture of each stdlib target -- currently it only captures the SDK.
11611161
#
11621162
# We turn these targets in to SWIFT_SDKS in `calculate_targets_for_host()`
1163-
1163+
11641164
if [[ $(is_cross_tools_host $1) ]] ; then
11651165
echo "$1"
11661166
else
@@ -1299,7 +1299,7 @@ function get_host_specific_variable() {
12991299

13001300
function calculate_targets_for_host() {
13011301
local host=$1
1302-
1302+
13031303
SWIFT_STDLIB_TARGETS=()
13041304
SWIFT_SDKS=()
13051305
SWIFT_BENCHMARK_TARGETS=()
@@ -1696,7 +1696,7 @@ function cmake_config_opt() {
16961696
;;
16971697
foundation)
16981698
echo "--config ${FOUNDATION_BUILD_TYPE}"
1699-
;;
1699+
;;
17001700
libdispatch)
17011701
;;
17021702
libicu)
@@ -2019,7 +2019,7 @@ for host in "${ALL_HOSTS[@]}"; do
20192019
-DCLANG_TOOL_CLANG_FORMAT_BUILD=NO
20202020
)
20212021
fi
2022-
2022+
20232023
if [[ $(true_false "${LLVM_INCLUDE_TESTS}") == "FALSE" ]]; then
20242024
cmake_options+=(
20252025
-DLLVM_INCLUDE_TESTS=NO
@@ -2362,21 +2362,21 @@ for host in "${ALL_HOSTS[@]}"; do
23622362
swiftpm)
23632363
set_swiftpm_bootstrap_command
23642364
call "${swiftpm_bootstrap_command[@]}"
2365-
2365+
23662366
# swiftpm installs itself with a bootstrap method. No further cmake building is performed.
23672367
continue
23682368
;;
23692369
xctest)
23702370
SWIFTC_BIN="$(build_directory_bin ${LOCAL_HOST} swift)/swiftc"
23712371
XCTEST_BUILD_DIR=$(build_directory ${host} xctest)
23722372
FOUNDATION_BUILD_DIR=$(build_directory ${host} foundation)
2373-
2373+
23742374
# Staging: require opt-in for building with dispatch
23752375
if [[ ! "${SKIP_BUILD_LIBDISPATCH}" ]] ; then
23762376
LIBDISPATCH_BUILD_DIR="$(build_directory ${host} libdispatch)"
23772377
LIBDISPATCH_BUILD_ARGS="--libdispatch-src-dir=${LIBDISPATCH_SOURCE_DIR} --libdispatch-build-dir=${LIBDISPATCH_BUILD_DIR}"
23782378
fi
2379-
2379+
23802380
# Use XCTEST_BUILD_TYPE to build either --debug or --release.
23812381
if [[ "${XCTEST_BUILD_TYPE}" == "Debug" ]] ; then
23822382
XCTEST_BUILD_ARGS="--debug"
@@ -2414,7 +2414,7 @@ for host in "${ALL_HOSTS[@]}"; do
24142414
SWIFT_USE_LINKER="-fuse-ld=gold"
24152415
fi
24162416

2417-
# FIXME CROSSCOMPILING:
2417+
# FIXME CROSSCOMPILING:
24182418
# Foundation is a target library (like the Swift standard library),
24192419
# so technically we should build it for all stdlib_targets, not just for the host.
24202420
# However, we only have the triple and sysroot for the host.
@@ -2431,7 +2431,7 @@ for host in "${ALL_HOSTS[@]}"; do
24312431
echo "Skipping Foundation on OS X -- use the Xcode project instead"
24322432
continue
24332433
fi
2434-
2434+
24352435
with_pushd "${FOUNDATION_SOURCE_DIR}" \
24362436
call env SWIFTC="${SWIFTC_BIN}" CLANG="${LLVM_BIN}"/clang SWIFT="${SWIFT_BIN}" \
24372437
SDKROOT="${SWIFT_BUILD_PATH}" BUILD_DIR="${build_dir}" DSTROOT="$(get_host_install_destdir ${host})" PREFIX="$(get_host_install_prefix ${host})" ./configure "${FOUNDATION_BUILD_TYPE}" ${FOUNDATION_BUILD_ARGS[@]} -DXCTEST_BUILD_DIR=${XCTEST_BUILD_DIR} $LIBDISPATCH_BUILD_ARGS
@@ -2762,7 +2762,7 @@ for host in "${ALL_HOSTS[@]}"; do
27622762
# Use the clang that was just built in the tree.
27632763
LLDB_DOTEST_CC_OPTS="-C $(build_directory $LOCAL_HOST llvm)"/bin/clang
27642764
fi
2765-
2765+
27662766
call mkdir -p "${results_dir}"
27672767
with_pushd "${results_dir}" \
27682768
call env SWIFTCC="$(build_directory $LOCAL_HOST swift)/bin/swiftc" \
@@ -2954,7 +2954,7 @@ for host in "${ALL_HOSTS[@]}"; do
29542954
# Calculate the directory to install products in to.
29552955
host_install_destdir=$(get_host_install_destdir ${host})
29562956
host_install_prefix=$(get_host_install_prefix ${host})
2957-
2957+
29582958
if [[ $(should_include_host_in_lipo ${host}) ]]; then
29592959
LIPO_SRC_DIRS+=( "${host_install_destdir}" )
29602960
fi
@@ -3264,7 +3264,7 @@ function build_and_test_installable_package() {
32643264

32653265
# Get the directory where the products where installed.
32663266
# If INSTALL_DESTDIR not given, we couldn't have installed anything.
3267-
3267+
32683268
if [[ -z "${INSTALL_DESTDIR}" ]] ; then
32693269
echo "--install-destdir required to build a package. Skipping."
32703270
return
@@ -3316,14 +3316,14 @@ function build_and_test_installable_package() {
33163316

33173317
if [[ "${DARWIN_TOOLCHAIN_APPLICATION_CERT}" ]] ; then
33183318
echo "-- Codesign xctoolchain --"
3319-
call "${SWIFT_SOURCE_DIR}/utils/toolchain-codesign" "${DARWIN_TOOLCHAIN_APPLICATION_CERT}" "${host_install_destdir}${TOOLCHAIN_PREFIX}/"
3319+
call "${SWIFT_SOURCE_DIR}/utils/toolchain-codesign" "${DARWIN_TOOLCHAIN_APPLICATION_CERT}" "${host_install_destdir}${TOOLCHAIN_PREFIX}/"
33203320
fi
33213321
if [[ "${DARWIN_TOOLCHAIN_INSTALLER_PACKAGE}" ]] ; then
33223322
echo "-- Create Installer --"
33233323
call "${SWIFT_SOURCE_DIR}/utils/toolchain-installer" "${host_install_destdir}${TOOLCHAIN_PREFIX}/" "${DARWIN_TOOLCHAIN_BUNDLE_IDENTIFIER}" \
33243324
"${DARWIN_TOOLCHAIN_INSTALLER_CERT}" "${DARWIN_TOOLCHAIN_INSTALLER_PACKAGE}" "${DARWIN_TOOLCHAIN_INSTALL_LOCATION}" \
33253325
"${DARWIN_TOOLCHAIN_VERSION}" "${SWIFT_SOURCE_DIR}/utils/darwin-installer-scripts"
3326-
fi
3326+
fi
33273327

33283328
# host_install_destdir contains the toolchain prefix.
33293329
# We want to create the package in host_install_destdir_nonprefixed.
@@ -3366,32 +3366,32 @@ function build_and_test_installable_package() {
33663366

33673367
# Build and test packages.
33683368
for host in "${ALL_HOSTS[@]}"; do
3369-
3369+
33703370
# Check if we should perform this action.
33713371
if ! [[ $(should_execute_action "${host}-package") ]]; then
33723372
continue
33733373
fi
3374-
3374+
33753375
if [[ $(should_include_host_in_lipo ${host}) ]]; then
33763376
continue
3377-
fi
3378-
3377+
fi
3378+
33793379
build_and_test_installable_package ${host}
33803380
done
33813381

33823382
# Lipo those products which require it, optionally build and test an installable package.
33833383
if [[ ${#LIPO_SRC_DIRS[@]} -gt 0 ]]; then
3384-
# This is from multiple hosts; Which host should we say it is?
3384+
# This is from multiple hosts; Which host should we say it is?
33853385
# Let's call it 'merged-hosts' so that we can identify it.
33863386
mergedHost="merged-hosts"
3387-
3387+
33883388
# Check if we should perform this action.
33893389
if ! [[ $(should_execute_action "${mergedHost}-lipo") ]]; then
33903390
continue
33913391
fi
3392-
3392+
33933393
echo "--- Merging and running lipo ---"
3394-
3394+
33953395
# Allow passing lipo with --host-lipo
33963396
if [[ -z "${HOST_LIPO}" ]] ; then
33973397
LIPO_PATH=$(xcrun_find_tool lipo)

0 commit comments

Comments
 (0)