Skip to content

Commit 85dbbb9

Browse files
authored
Merge pull request #6432 from aciidb0mb3r/build-swiftpm-in-release
[BuildScript] Pass build conf to swiftpm
2 parents 2fffbb1 + 1ba5ce6 commit 85dbbb9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

utils/build-script

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ class BuildScriptInvocation(object):
591591
"--libdispatch-build-type", args.libdispatch_build_variant,
592592
"--libicu-build-type", args.libicu_build_variant,
593593
"--xctest-build-type", args.build_variant,
594+
"--swiftpm-build-type", args.build_variant,
594595
"--swift-enable-assertions", str(args.swift_assertions).lower(),
595596
"--swift-stdlib-enable-assertions", str(
596597
args.swift_stdlib_assertions).lower(),

utils/build-script-impl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ KNOWN_SETTINGS=(
7878
playgroundlogger-build-type "Debug" "the build variant for PlaygroundLogger"
7979
playgroundsupport-build-type "Debug" "the build variant for PlaygroundSupport"
8080
xctest-build-type "Debug" "the build variant for xctest"
81+
swiftpm-build-type "Debug" "the build variant for swiftpm"
8182
llbuild-enable-assertions "1" "enable assertions in llbuild"
8283
enable-asan "" "enable Address Sanitizer"
8384
cmake "" "path to the cmake binary"
@@ -1755,6 +1756,10 @@ function set_swiftpm_bootstrap_command() {
17551756
exit 1
17561757
fi
17571758
swiftpm_bootstrap_command=("${SWIFTPM_SOURCE_DIR}/Utilities/bootstrap" "${swiftpm_bootstrap_options[@]}")
1759+
# Add --release if we have to build in release mode.
1760+
if [[ "${SWIFTPM_BUILD_TYPE}" == "Release" ]] ; then
1761+
swiftpm_bootstrap_command+=(--release)
1762+
fi
17581763
if [[ "${VERBOSE_BUILD}" ]] ; then
17591764
swiftpm_bootstrap_command+=(-v)
17601765
fi

0 commit comments

Comments
 (0)