Skip to content

Commit 806c01d

Browse files
committed
[build-script] Merged the PlaygroundLogger and PlaygroundSupport products.
These don't make sense to build separately, and indeed it's likely that PlaygroundLogger will soon depend on PlaygroundSupport. As a result, build them as one product (playgroundsupport) in build-script. Aside from removing the playgroundlogger product, this otherwise continues to build PlaygroundLogger and PlaygroundSupport the same way. This is for <rdar://problem/36512531>.
1 parent 9bc45e1 commit 806c01d

File tree

6 files changed

+29
-105
lines changed

6 files changed

+29
-105
lines changed

utils/build-presets.ini

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ llbuild
326326
swiftpm
327327

328328
# Build Playground support
329-
playgroundlogger
330329
playgroundsupport
331330

332331
dash-dash
@@ -768,7 +767,6 @@ skip-test-swiftpm
768767
skip-test-xctest
769768
skip-test-foundation
770769
skip-test-libdispatch
771-
skip-test-playgroundlogger
772770
skip-test-playgroundsupport
773771
skip-test-libicu
774772

@@ -945,7 +943,6 @@ watchos
945943
lldb
946944
llbuild
947945
swiftpm
948-
playgroundlogger
949946
playgroundsupport
950947

951948
# Build with debug info, this allows us to symbolicate crashes from
@@ -963,14 +960,12 @@ build-ninja
963960
build-swift-static-stdlib
964961
build-swift-static-sdk-overlay
965962
build-swift-stdlib-unittest-extra
966-
playgroundlogger-build-type=Release
967963
playgroundsupport-build-type=Release
968964

969965
install-swift
970966
install-lldb
971967
install-llbuild
972968
install-swiftpm
973-
install-playgroundlogger
974969
install-playgroundsupport
975970

976971
install-destdir=%(install_destdir)s
@@ -1060,7 +1055,6 @@ skip-test-swiftpm
10601055
skip-test-llbuild
10611056
skip-test-lldb
10621057
skip-test-cmark
1063-
skip-test-playgroundlogger
10641058
skip-test-playgroundsupport
10651059

10661060

@@ -1144,7 +1138,6 @@ llbuild
11441138
swiftpm
11451139

11461140
# Build Playground support
1147-
playgroundlogger
11481141
playgroundsupport
11491142

11501143
dash-dash

utils/build-script

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,6 @@ class BuildScriptInvocation(object):
595595
impl_args += ["--skip-build-libicu"]
596596
if not args.build_swiftpm:
597597
impl_args += ["--skip-build-swiftpm"]
598-
if not args.build_playgroundlogger:
599-
impl_args += ["--skip-build-playgroundlogger"]
600598
if not args.build_playgroundsupport:
601599
impl_args += ["--skip-build-playgroundsupport"]
602600
if args.build_swift_dynamic_stdlib:
@@ -644,7 +642,6 @@ class BuildScriptInvocation(object):
644642
"--skip-test-foundation",
645643
"--skip-test-libdispatch",
646644
"--skip-test-libicu",
647-
"--skip-test-playgroundlogger",
648645
"--skip-test-playgroundsupport"]
649646
if not args.test_linux:
650647
impl_args += ["--skip-test-linux"]

utils/build-script-impl

Lines changed: 29 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ KNOWN_SETTINGS=(
7878
foundation-build-type "Debug" "the build variant for Foundation"
7979
libdispatch-build-type "Debug" "the build variant for libdispatch"
8080
libicu-build-type "Debug" "the build variant for libicu"
81-
playgroundlogger-build-type "Debug" "the build variant for PlaygroundLogger"
8281
playgroundsupport-build-type "Debug" "the build variant for PlaygroundSupport"
8382
xctest-build-type "Debug" "the build variant for xctest"
8483
swiftpm-build-type "Debug" "the build variant for swiftpm"
@@ -128,7 +127,6 @@ KNOWN_SETTINGS=(
128127
skip-build-libicu "" "set to skip building libicu"
129128
skip-build-benchmarks "" "set to skip building Swift Benchmark Suite"
130129
skip-build-external-benchmarks "1" "set to skip building the external Swift Benchmark Suite. (skipped by default)"
131-
skip-build-playgroundlogger "" "set to skip building PlaygroundLogger"
132130
skip-build-playgroundsupport "" "set to skip building PlaygroundSupport"
133131
skip-test-cmark "" "set to skip testing CommonMark"
134132
skip-test-lldb "" "set to skip testing lldb"
@@ -139,7 +137,6 @@ KNOWN_SETTINGS=(
139137
skip-test-foundation "" "set to skip testing foundation"
140138
skip-test-libdispatch "" "set to skip testing libdispatch"
141139
skip-test-libicu "" "set to skip testing libicu"
142-
skip-test-playgroundlogger "" "set to skip testing PlaygroundLogger"
143140
skip-test-playgroundsupport "" "set to skip testing PlaygroundSupport"
144141
skip-test-linux "" "set to skip testing Swift stdlibs for Linux"
145142
skip-test-freebsd "" "set to skip testing Swift stdlibs for FreeBSD"
@@ -193,7 +190,6 @@ KNOWN_SETTINGS=(
193190
install-foundation "" "whether to install foundation"
194191
install-libdispatch "" "whether to install libdispatch"
195192
install-libicu "" "whether to install libicu"
196-
install-playgroundlogger "" "whether to install PlaygroundLogger"
197193
install-playgroundsupport "" "whether to install PlaygroundSupport"
198194
darwin-install-extract-symbols "" "whether to extract symbols with dsymutil during installations"
199195
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**"
@@ -248,7 +244,6 @@ KNOWN_SETTINGS=(
248244
swiftpm-cmake-options "" "CMake options used for all swiftpm targets"
249245
xctest-cmake-options "" "CMake options used for all xctest targets"
250246
playgroundsupport-cmake-options "" "CMake options used for all playgroundsupport targets"
251-
playgroundlogger-cmake-options "" "CMake options used for all playgroundlogger targets"
252247
# TODO: Remove this some time later.
253248
user-config-args "" "**Renamed to --extra-cmake-options**: User-supplied arguments to cmake when used to do configuration."
254249
only-execute "all" "Only execute the named action (see implementation)"
@@ -494,7 +489,6 @@ function set_build_options_for_host() {
494489
--sysroot="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
495490
)
496491
playgroundlogger_build_target=("PlaygroundLogger_TestDriver")
497-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="MacOSX.platform"
498492
;;
499493
iphonesimulator-i386)
500494
xcrun_sdk_name="iphonesimulator"
@@ -511,7 +505,6 @@ function set_build_options_for_host() {
511505
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
512506
)
513507
playgroundlogger_build_target=("PlaygroundLogger_iOS")
514-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="iPhoneSimulator.platform"
515508
;;
516509
iphonesimulator-x86_64)
517510
xcrun_sdk_name="iphonesimulator"
@@ -528,7 +521,6 @@ function set_build_options_for_host() {
528521
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
529522
)
530523
playgroundlogger_build_target=("PlaygroundLogger_iOS")
531-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="iPhoneSimulator.platform"
532524
;;
533525
iphoneos-armv7)
534526
xcrun_sdk_name="iphoneos"
@@ -545,7 +537,6 @@ function set_build_options_for_host() {
545537
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
546538
)
547539
playgroundlogger_build_target=("PlaygroundLogger_iOS")
548-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="iPhoneOS.platform"
549540
;;
550541
iphoneos-armv7s)
551542
xcrun_sdk_name="iphoneos"
@@ -562,7 +553,6 @@ function set_build_options_for_host() {
562553
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
563554
)
564555
playgroundlogger_build_target=("PlaygroundLogger_iOS")
565-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="iPhoneOS.platform"
566556
;;
567557
iphoneos-arm64)
568558
xcrun_sdk_name="iphoneos"
@@ -579,7 +569,6 @@ function set_build_options_for_host() {
579569
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
580570
)
581571
playgroundlogger_build_target=("PlaygroundLogger_iOS")
582-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="iPhoneOS.platform"
583572
;;
584573
appletvsimulator-x86_64)
585574
xcrun_sdk_name="appletvsimulator"
@@ -596,7 +585,6 @@ function set_build_options_for_host() {
596585
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
597586
)
598587
playgroundlogger_build_target=("PlaygroundLogger_tvOS")
599-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="AppleTVSimulator.platform"
600588
;;
601589
appletvos-arm64)
602590
xcrun_sdk_name="appletvos"
@@ -613,7 +601,6 @@ function set_build_options_for_host() {
613601
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
614602
)
615603
playgroundlogger_build_target=("PlaygroundLogger_tvOS")
616-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="AppleTVOS.platform"
617604
;;
618605
watchsimulator-i386)
619606
xcrun_sdk_name="watchsimulator"
@@ -1254,9 +1241,6 @@ fi
12541241
if [[ ! "${SKIP_BUILD_FOUNDATION}" ]] ; then
12551242
PRODUCTS=("${PRODUCTS[@]}" foundation)
12561243
fi
1257-
if [[ ! "${SKIP_BUILD_PLAYGROUNDLOGGER}" ]] ; then
1258-
PRODUCTS=("${PRODUCTS[@]}" playgroundlogger)
1259-
fi
12601244
if [[ ! "${SKIP_BUILD_PLAYGROUNDSUPPORT}" ]] ; then
12611245
PRODUCTS=("${PRODUCTS[@]}" playgroundsupport)
12621246
fi
@@ -1586,10 +1570,6 @@ function build_directory_bin() {
15861570
;;
15871571
libicu)
15881572
;;
1589-
playgroundlogger)
1590-
# FIXME: var name for build type
1591-
echo "${root}/${PLAYGROUNDLOGGER_BUILD_TYPE}/bin"
1592-
;;
15931573
playgroundsupport)
15941574
echo "${root}/${PLAYGROUNDSUPPORT_BUILD_TYPE}/bin"
15951575
;;
@@ -1720,10 +1700,6 @@ function cmake_config_opt() {
17201700
;;
17211701
libicu)
17221702
;;
1723-
playgroundlogger)
1724-
# FIXME: var name
1725-
echo "--config ${PLAYGROUNDLOGGER_BUILD_TYPE}"
1726-
;;
17271703
playgroundsupport)
17281704
echo "--config ${PLAYGROUNDSUPPORT_BUILD_TYPE}"
17291705
;;
@@ -2640,26 +2616,9 @@ for host in "${ALL_HOSTS[@]}"; do
26402616
# libicu builds itself and doesn't use cmake
26412617
continue
26422618
;;
2643-
playgroundlogger)
2644-
if [[ "$(uname -s)" != "Darwin" ]]; then
2645-
echo "error: unable to build PlaygroundLogger on this platform"
2646-
exit 1
2647-
fi
2648-
2649-
PLAYGROUNDLOGGER_BUILD_DIR=$(build_directory ${host} ${product})
2650-
SWIFTC_BIN="$(build_directory_bin ${host} swift)/swiftc"
2651-
2652-
set -x
2653-
pushd "${PLAYGROUNDLOGGER_SOURCE_DIR}"
2654-
mkdir -p "${PLAYGROUNDLOGGER_BUILD_DIR}"
2655-
"xcodebuild" -configuration "${PLAYGROUNDLOGGER_BUILD_TYPE}" -target "${playgroundlogger_build_target}" install SWIFT_EXEC="${SWIFTC_BIN}" DSTROOT=${build_dir} INSTALL_PATH="/" SKIP_INSTALL=NO
2656-
popd
2657-
{ set +x; } 2>/dev/null
2658-
continue
2659-
;;
26602619
playgroundsupport)
26612620
if [[ "$(uname -s)" != "Darwin" ]]; then
2662-
echo "error: unable to build PlaygroundSupport on this platform"
2621+
echo "error: unable to build PlaygroundLogger and PlaygroundSupport on this platform"
26632622
exit 1
26642623
fi
26652624

@@ -2671,6 +2630,11 @@ for host in "${ALL_HOSTS[@]}"; do
26712630
mkdir -p "${PLAYGROUNDSUPPORT_BUILD_DIR}"
26722631
"xcodebuild" -configuration "${PLAYGROUNDSUPPORT_BUILD_TYPE}" -target AllProducts SWIFT_EXEC="${SWIFTC_BIN}" DSTROOT="$(get_host_install_destdir ${host})"
26732632
popd
2633+
2634+
pushd "${PLAYGROUNDLOGGER_SOURCE_DIR}"
2635+
mkdir -p "${PLAYGROUNDSUPPORT_BUILD_DIR}"
2636+
"xcodebuild" -configuration "${PLAYGROUNDSUPPORT_BUILD_TYPE}" -target "${playgroundlogger_build_target}" install SWIFT_EXEC="${SWIFTC_BIN}" DSTROOT=${build_dir} INSTALL_PATH="/" SKIP_INSTALL=NO
2637+
popd
26742638
{ set +x; } 2>/dev/null
26752639
continue
26762640
;;
@@ -2992,23 +2956,21 @@ for host in "${ALL_HOSTS[@]}"; do
29922956
echo "--- Finished tests for ${product} ---"
29932957
continue
29942958
;;
2995-
playgroundlogger)
2996-
if [[ "${host}" != "macosx"* ]]; then
2997-
echo "Skipping PlaygroundLogger tests on non-macOS platform"
2998-
continue
2999-
fi
3000-
SWIFT_DYLIB_PATH=$(build_directory ${host} swift)/lib/swift/macosx/
3001-
PLAYGROUNDLOGGER_FRAMEWORK_PATH=$(build_directory ${host} ${product})
3002-
set -x
3003-
pushd "${PLAYGROUNDLOGGER_FRAMEWORK_PATH}"
3004-
DYLD_LIBRARY_PATH=$SWIFT_DYLIB_PATH DYLD_FRAMEWORK_PATH=$PLAYGROUNDLOGGER_FRAMEWORK_PATH ./PlaygroundLogger_TestDriver
3005-
popd
3006-
{ set +x; } 2>/dev/null
3007-
continue
3008-
;;
30092959
playgroundsupport)
3010-
continue
3011-
;;
2960+
if [[ "${host}" != "macosx"* ]]; then
2961+
echo "Skipping PlaygroundLogger tests on non-macOS platform"
2962+
continue
2963+
fi
2964+
2965+
SWIFT_DYLIB_PATH=$(build_directory ${host} swift)/lib/swift/macosx/
2966+
PLAYGROUNDLOGGER_FRAMEWORK_PATH=$(build_directory ${host} ${product})
2967+
set -x
2968+
pushd "${PLAYGROUNDLOGGER_FRAMEWORK_PATH}"
2969+
DYLD_LIBRARY_PATH=$SWIFT_DYLIB_PATH DYLD_FRAMEWORK_PATH=$PLAYGROUNDLOGGER_FRAMEWORK_PATH ./PlaygroundLogger_TestDriver
2970+
popd
2971+
{ set +x; } 2>/dev/null
2972+
continue
2973+
;;
30122974
*)
30132975
echo "error: unknown product: ${product}"
30142976
exit 1
@@ -3304,48 +3266,27 @@ for host in "${ALL_HOSTS[@]}"; do
33043266
done
33053267
continue
33063268
;;
3307-
playgroundlogger)
3308-
if [[ -z "${INSTALL_PLAYGROUNDLOGGER}" ]] ; then
3269+
playgroundsupport)
3270+
set -x
3271+
if [[ -z "${INSTALL_PLAYGROUNDSUPPORT}" ]] ; then
33093272
continue
33103273
fi
33113274
if [[ -z "${INSTALL_DESTDIR}" ]] ; then
33123275
echo "--install-destdir is required to install products."
33133276
exit 1
33143277
fi
3315-
3278+
33163279
echo "--- Installing ${product} ---"
3317-
PLAYGROUNDLOGGER_BUILD_DIR=$(build_directory ${host} playgroundlogger)
3318-
PLAYGROUNDLOGGER_INSTALL_PREFIX="${INSTALL_DESTDIR}"
3319-
# Note that installing directly to /usr/lib/swift usually
3320-
# requires root permissions.
3321-
set -x
3322-
case "$(uname -s)" in
3323-
Darwin)
3324-
pushd "${PLAYGROUNDLOGGER_SOURCE_DIR}"
3325-
xcodebuild -target "All Platforms Logger" -configuration Toolchain_${PLAYGROUNDLOGGER_BUILD_TYPE} install SWIFT_EXEC="${SWIFTC_BIN}" DT_TOOLCHAIN_DIR="${TOOLCHAIN_PREFIX}" DSTROOT="$(get_host_install_destdir ${host})"
3326-
popd
3327-
continue
3328-
;;
3329-
*)
3330-
echo "error: --install-playgroundlogger is not supported on this platform"
3331-
exit 1
3332-
;;
3333-
esac
3334-
{ set +x; } 2>/dev/null
3335-
3336-
# As XCTest installation is self-contained, we break early here.
3337-
continue
3338-
;;
3339-
playgroundsupport)
3340-
set -x
3341-
if [[ -z "${INSTALL_PLAYGROUNDSUPPORT}" ]] ; then
3342-
continue
3343-
fi
3280+
33443281
case "$(uname -s)" in
33453282
Darwin)
33463283
pushd "${PLAYGROUNDSUPPORT_SOURCE_DIR}"
33473284
xcodebuild -target AllProducts -configuration ${PLAYGROUNDSUPPORT_BUILD_TYPE} install SWIFT_EXEC="${SWIFTC_BIN}" DT_TOOLCHAIN_DIR="${TOOLCHAIN_PREFIX}" DSTROOT="$(get_host_install_destdir ${host})"
33483285
popd
3286+
3287+
pushd "${PLAYGROUNDLOGGER_SOURCE_DIR}"
3288+
xcodebuild -target "All Platforms Logger" -configuration Toolchain_${PLAYGROUNDSUPPORT_BUILD_TYPE} install SWIFT_EXEC="${SWIFTC_BIN}" DT_TOOLCHAIN_DIR="${TOOLCHAIN_PREFIX}" DSTROOT="$(get_host_install_destdir ${host})"
3289+
popd
33493290
continue
33503291
;;
33513292
*)

utils/build_swift/driver_arguments.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ def _apply_default_arguments(args):
141141
args.build_foundation = False
142142
args.build_libdispatch = False
143143
args.build_libicu = False
144-
args.build_playgroundlogger = False
145144
args.build_playgroundsupport = False
146145

147146
# --skip-{ios,tvos,watchos} or --skip-build-{ios,tvos,watchos} are
@@ -507,9 +506,6 @@ def create_argument_parser():
507506
option('--libicu', toggle_true('build_libicu'),
508507
help='build libicu')
509508

510-
option('--playgroundlogger', store_true('build_playgroundlogger'),
511-
help='build playgroundlogger')
512-
513509
option('--playgroundsupport', store_true('build_playgroundsupport'),
514510
help='build PlaygroundSupport')
515511

utils/build_swift/tests/expected_options.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
'build_lldb': False,
7070
'build_ninja': False,
7171
'build_osx': True,
72-
'build_playgroundlogger': False,
7372
'build_playgroundsupport': False,
7473
'build_runtime_with_host_compiler': False,
7574
'build_stdlib_deployment_targets': ['all'],
@@ -385,7 +384,6 @@ class IgnoreOption(_BaseOption):
385384
SetTrueOption('--ios'),
386385
SetTrueOption('--llbuild', dest='build_llbuild'),
387386
SetTrueOption('--lldb', dest='build_lldb'),
388-
SetTrueOption('--playgroundlogger', dest='build_playgroundlogger'),
389387
SetTrueOption('--playgroundsupport', dest='build_playgroundsupport'),
390388
SetTrueOption('--skip-build'),
391389
SetTrueOption('--swiftpm', dest='build_swiftpm'),

utils/build_swift/tests/test_driver_arguments.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,6 @@ def test_implied_defaults_skip_build(self):
590590
self.assertFalse(namespace.build_libicu)
591591
self.assertFalse(namespace.build_lldb)
592592
self.assertFalse(namespace.build_llbuild)
593-
self.assertFalse(namespace.build_playgroundlogger)
594593
self.assertFalse(namespace.build_playgroundsupport)
595594
self.assertFalse(namespace.build_swiftpm)
596595
self.assertFalse(namespace.build_xctest)

0 commit comments

Comments
 (0)