Skip to content

Commit a4f77de

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>. (cherry picked from commit 806c01d) Conflicts: utils/build_swift/driver_arguments.py
1 parent 4fff99b commit a4f77de

File tree

6 files changed

+29
-107
lines changed

6 files changed

+29
-107
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
@@ -589,8 +589,6 @@ class BuildScriptInvocation(object):
589589
impl_args += ["--skip-build-libicu"]
590590
if not args.build_swiftpm:
591591
impl_args += ["--skip-build-swiftpm"]
592-
if not args.build_playgroundlogger:
593-
impl_args += ["--skip-build-playgroundlogger"]
594592
if not args.build_playgroundsupport:
595593
impl_args += ["--skip-build-playgroundsupport"]
596594
if args.build_swift_dynamic_stdlib:
@@ -638,7 +636,6 @@ class BuildScriptInvocation(object):
638636
"--skip-test-foundation",
639637
"--skip-test-libdispatch",
640638
"--skip-test-libicu",
641-
"--skip-test-playgroundlogger",
642639
"--skip-test-playgroundsupport"]
643640
if not args.test_linux:
644641
impl_args += ["--skip-test-linux"]

utils/build-script-impl

Lines changed: 29 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ KNOWN_SETTINGS=(
7777
foundation-build-type "Debug" "the build variant for Foundation"
7878
libdispatch-build-type "Debug" "the build variant for libdispatch"
7979
libicu-build-type "Debug" "the build variant for libicu"
80-
playgroundlogger-build-type "Debug" "the build variant for PlaygroundLogger"
8180
playgroundsupport-build-type "Debug" "the build variant for PlaygroundSupport"
8281
xctest-build-type "Debug" "the build variant for xctest"
8382
swiftpm-build-type "Debug" "the build variant for swiftpm"
@@ -126,7 +125,6 @@ KNOWN_SETTINGS=(
126125
skip-build-libicu "" "set to skip building libicu"
127126
skip-build-benchmarks "" "set to skip building Swift Benchmark Suite"
128127
skip-build-external-benchmarks "1" "set to skip building the external Swift Benchmark Suite. (skipped by default)"
129-
skip-build-playgroundlogger "" "set to skip building PlaygroundLogger"
130128
skip-build-playgroundsupport "" "set to skip building PlaygroundSupport"
131129
skip-test-cmark "" "set to skip testing CommonMark"
132130
skip-test-lldb "" "set to skip testing lldb"
@@ -137,7 +135,6 @@ KNOWN_SETTINGS=(
137135
skip-test-foundation "" "set to skip testing foundation"
138136
skip-test-libdispatch "" "set to skip testing libdispatch"
139137
skip-test-libicu "" "set to skip testing libicu"
140-
skip-test-playgroundlogger "" "set to skip testing PlaygroundLogger"
141138
skip-test-playgroundsupport "" "set to skip testing PlaygroundSupport"
142139
skip-test-linux "" "set to skip testing Swift stdlibs for Linux"
143140
skip-test-freebsd "" "set to skip testing Swift stdlibs for FreeBSD"
@@ -191,7 +188,6 @@ KNOWN_SETTINGS=(
191188
install-foundation "" "whether to install foundation"
192189
install-libdispatch "" "whether to install libdispatch"
193190
install-libicu "" "whether to install libicu"
194-
install-playgroundlogger "" "whether to install PlaygroundLogger"
195191
install-playgroundsupport "" "whether to install PlaygroundSupport"
196192
darwin-install-extract-symbols "" "whether to extract symbols with dsymutil during installations"
197193
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**"
@@ -246,7 +242,6 @@ KNOWN_SETTINGS=(
246242
swiftpm-cmake-options "" "CMake options used for all swiftpm targets"
247243
xctest-cmake-options "" "CMake options used for all xctest targets"
248244
playgroundsupport-cmake-options "" "CMake options used for all playgroundsupport targets"
249-
playgroundlogger-cmake-options "" "CMake options used for all playgroundlogger targets"
250245
# TODO: Remove this some time later.
251246
user-config-args "" "**Renamed to --extra-cmake-options**: User-supplied arguments to cmake when used to do configuration."
252247
only-execute "all" "Only execute the named action (see implementation)"
@@ -492,7 +487,6 @@ function set_build_options_for_host() {
492487
--sysroot="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
493488
)
494489
playgroundlogger_build_target=("PlaygroundLogger_TestDriver")
495-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="MacOSX.platform"
496490
;;
497491
iphonesimulator-i386)
498492
xcrun_sdk_name="iphonesimulator"
@@ -509,7 +503,6 @@ function set_build_options_for_host() {
509503
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
510504
)
511505
playgroundlogger_build_target=("PlaygroundLogger_iOS")
512-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="iPhoneSimulator.platform"
513506
;;
514507
iphonesimulator-x86_64)
515508
xcrun_sdk_name="iphonesimulator"
@@ -526,7 +519,6 @@ function set_build_options_for_host() {
526519
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
527520
)
528521
playgroundlogger_build_target=("PlaygroundLogger_iOS")
529-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="iPhoneSimulator.platform"
530522
;;
531523
iphoneos-armv7)
532524
xcrun_sdk_name="iphoneos"
@@ -543,7 +535,6 @@ function set_build_options_for_host() {
543535
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
544536
)
545537
playgroundlogger_build_target=("PlaygroundLogger_iOS")
546-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="iPhoneOS.platform"
547538
;;
548539
iphoneos-armv7s)
549540
xcrun_sdk_name="iphoneos"
@@ -560,7 +551,6 @@ function set_build_options_for_host() {
560551
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
561552
)
562553
playgroundlogger_build_target=("PlaygroundLogger_iOS")
563-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="iPhoneOS.platform"
564554
;;
565555
iphoneos-arm64)
566556
xcrun_sdk_name="iphoneos"
@@ -577,7 +567,6 @@ function set_build_options_for_host() {
577567
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
578568
)
579569
playgroundlogger_build_target=("PlaygroundLogger_iOS")
580-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="iPhoneOS.platform"
581570
;;
582571
appletvsimulator-x86_64)
583572
xcrun_sdk_name="appletvsimulator"
@@ -594,7 +583,6 @@ function set_build_options_for_host() {
594583
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
595584
)
596585
playgroundlogger_build_target=("PlaygroundLogger_tvOS")
597-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="AppleTVSimulator.platform"
598586
;;
599587
appletvos-arm64)
600588
xcrun_sdk_name="appletvos"
@@ -611,7 +599,6 @@ function set_build_options_for_host() {
611599
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
612600
)
613601
playgroundlogger_build_target=("PlaygroundLogger_tvOS")
614-
PLAYGROUNDLOGGER_INSTALL_PLATFORM="AppleTVOS.platform"
615602
;;
616603
watchsimulator-i386)
617604
xcrun_sdk_name="watchsimulator"
@@ -1252,9 +1239,6 @@ fi
12521239
if [[ ! "${SKIP_BUILD_FOUNDATION}" ]] ; then
12531240
PRODUCTS=("${PRODUCTS[@]}" foundation)
12541241
fi
1255-
if [[ ! "${SKIP_BUILD_PLAYGROUNDLOGGER}" ]] ; then
1256-
PRODUCTS=("${PRODUCTS[@]}" playgroundlogger)
1257-
fi
12581242
if [[ ! "${SKIP_BUILD_PLAYGROUNDSUPPORT}" ]] ; then
12591243
PRODUCTS=("${PRODUCTS[@]}" playgroundsupport)
12601244
fi
@@ -1584,10 +1568,6 @@ function build_directory_bin() {
15841568
;;
15851569
libicu)
15861570
;;
1587-
playgroundlogger)
1588-
# FIXME: var name for build type
1589-
echo "${root}/${PLAYGROUNDLOGGER_BUILD_TYPE}/bin"
1590-
;;
15911571
playgroundsupport)
15921572
echo "${root}/${PLAYGROUNDSUPPORT_BUILD_TYPE}/bin"
15931573
;;
@@ -1718,10 +1698,6 @@ function cmake_config_opt() {
17181698
;;
17191699
libicu)
17201700
;;
1721-
playgroundlogger)
1722-
# FIXME: var name
1723-
echo "--config ${PLAYGROUNDLOGGER_BUILD_TYPE}"
1724-
;;
17251701
playgroundsupport)
17261702
echo "--config ${PLAYGROUNDSUPPORT_BUILD_TYPE}"
17271703
;;
@@ -2604,26 +2580,9 @@ for host in "${ALL_HOSTS[@]}"; do
26042580
# libicu builds itself and doesn't use cmake
26052581
continue
26062582
;;
2607-
playgroundlogger)
2608-
if [[ "$(uname -s)" != "Darwin" ]]; then
2609-
echo "error: unable to build PlaygroundLogger on this platform"
2610-
exit 1
2611-
fi
2612-
2613-
PLAYGROUNDLOGGER_BUILD_DIR=$(build_directory ${host} ${product})
2614-
SWIFTC_BIN="$(build_directory_bin ${host} swift)/swiftc"
2615-
2616-
set -x
2617-
pushd "${PLAYGROUNDLOGGER_SOURCE_DIR}"
2618-
mkdir -p "${PLAYGROUNDLOGGER_BUILD_DIR}"
2619-
"xcodebuild" -configuration "${PLAYGROUNDLOGGER_BUILD_TYPE}" -target "${playgroundlogger_build_target}" install SWIFT_EXEC="${SWIFTC_BIN}" DSTROOT=${build_dir} INSTALL_PATH="/" SKIP_INSTALL=NO
2620-
popd
2621-
{ set +x; } 2>/dev/null
2622-
continue
2623-
;;
26242583
playgroundsupport)
26252584
if [[ "$(uname -s)" != "Darwin" ]]; then
2626-
echo "error: unable to build PlaygroundSupport on this platform"
2585+
echo "error: unable to build PlaygroundLogger and PlaygroundSupport on this platform"
26272586
exit 1
26282587
fi
26292588

@@ -2635,6 +2594,11 @@ for host in "${ALL_HOSTS[@]}"; do
26352594
mkdir -p "${PLAYGROUNDSUPPORT_BUILD_DIR}"
26362595
"xcodebuild" -configuration "${PLAYGROUNDSUPPORT_BUILD_TYPE}" -target AllProducts SWIFT_EXEC="${SWIFTC_BIN}" DSTROOT="$(get_host_install_destdir ${host})"
26372596
popd
2597+
2598+
pushd "${PLAYGROUNDLOGGER_SOURCE_DIR}"
2599+
mkdir -p "${PLAYGROUNDSUPPORT_BUILD_DIR}"
2600+
"xcodebuild" -configuration "${PLAYGROUNDSUPPORT_BUILD_TYPE}" -target "${playgroundlogger_build_target}" install SWIFT_EXEC="${SWIFTC_BIN}" DSTROOT=${build_dir} INSTALL_PATH="/" SKIP_INSTALL=NO
2601+
popd
26382602
{ set +x; } 2>/dev/null
26392603
continue
26402604
;;
@@ -2957,23 +2921,21 @@ for host in "${ALL_HOSTS[@]}"; do
29572921
echo "--- Finished tests for ${product} ---"
29582922
continue
29592923
;;
2960-
playgroundlogger)
2961-
if [[ "${host}" != "macosx"* ]]; then
2962-
echo "Skipping PlaygroundLogger tests on non-macOS platform"
2963-
continue
2964-
fi
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-
;;
29742924
playgroundsupport)
2975-
continue
2976-
;;
2925+
if [[ "${host}" != "macosx"* ]]; then
2926+
echo "Skipping PlaygroundLogger tests on non-macOS platform"
2927+
continue
2928+
fi
2929+
2930+
SWIFT_DYLIB_PATH=$(build_directory ${host} swift)/lib/swift/macosx/
2931+
PLAYGROUNDLOGGER_FRAMEWORK_PATH=$(build_directory ${host} ${product})
2932+
set -x
2933+
pushd "${PLAYGROUNDLOGGER_FRAMEWORK_PATH}"
2934+
DYLD_LIBRARY_PATH=$SWIFT_DYLIB_PATH DYLD_FRAMEWORK_PATH=$PLAYGROUNDLOGGER_FRAMEWORK_PATH ./PlaygroundLogger_TestDriver
2935+
popd
2936+
{ set +x; } 2>/dev/null
2937+
continue
2938+
;;
29772939
*)
29782940
echo "error: unknown product: ${product}"
29792941
exit 1
@@ -3269,48 +3231,27 @@ for host in "${ALL_HOSTS[@]}"; do
32693231
done
32703232
continue
32713233
;;
3272-
playgroundlogger)
3273-
if [[ -z "${INSTALL_PLAYGROUNDLOGGER}" ]] ; then
3234+
playgroundsupport)
3235+
set -x
3236+
if [[ -z "${INSTALL_PLAYGROUNDSUPPORT}" ]] ; then
32743237
continue
32753238
fi
32763239
if [[ -z "${INSTALL_DESTDIR}" ]] ; then
32773240
echo "--install-destdir is required to install products."
32783241
exit 1
32793242
fi
3280-
3243+
32813244
echo "--- Installing ${product} ---"
3282-
PLAYGROUNDLOGGER_BUILD_DIR=$(build_directory ${host} playgroundlogger)
3283-
PLAYGROUNDLOGGER_INSTALL_PREFIX="${INSTALL_DESTDIR}"
3284-
# Note that installing directly to /usr/lib/swift usually
3285-
# requires root permissions.
3286-
set -x
3287-
case "$(uname -s)" in
3288-
Darwin)
3289-
pushd "${PLAYGROUNDLOGGER_SOURCE_DIR}"
3290-
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})"
3291-
popd
3292-
continue
3293-
;;
3294-
*)
3295-
echo "error: --install-playgroundlogger is not supported on this platform"
3296-
exit 1
3297-
;;
3298-
esac
3299-
{ set +x; } 2>/dev/null
3300-
3301-
# As XCTest installation is self-contained, we break early here.
3302-
continue
3303-
;;
3304-
playgroundsupport)
3305-
set -x
3306-
if [[ -z "${INSTALL_PLAYGROUNDSUPPORT}" ]] ; then
3307-
continue
3308-
fi
3245+
33093246
case "$(uname -s)" in
33103247
Darwin)
33113248
pushd "${PLAYGROUNDSUPPORT_SOURCE_DIR}"
33123249
xcodebuild -target AllProducts -configuration ${PLAYGROUNDSUPPORT_BUILD_TYPE} install SWIFT_EXEC="${SWIFTC_BIN}" DT_TOOLCHAIN_DIR="${TOOLCHAIN_PREFIX}" DSTROOT="$(get_host_install_destdir ${host})"
33133250
popd
3251+
3252+
pushd "${PLAYGROUNDLOGGER_SOURCE_DIR}"
3253+
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})"
3254+
popd
33143255
continue
33153256
;;
33163257
*)

utils/build_swift/driver_arguments.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ def _apply_default_arguments(args):
138138
args.build_foundation = False
139139
args.build_libdispatch = False
140140
args.build_libicu = False
141-
args.build_playgroundlogger = False
142141
args.build_playgroundsupport = False
143142

144143
# --skip-{ios,tvos,watchos} or --skip-build-{ios,tvos,watchos} are
@@ -626,11 +625,6 @@ def create_argument_parser():
626625
action=arguments.action.enable,
627626
dest='build_libicu',
628627
help='build libicu')
629-
projects_group.add_argument(
630-
'--playgroundlogger',
631-
action='store_true',
632-
dest='build_playgroundlogger',
633-
help='build playgroundlogger')
634628
projects_group.add_argument(
635629
'--playgroundsupport',
636630
action='store_true',

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'],
@@ -378,7 +377,6 @@ class IgnoreOption(_BaseOption):
378377
SetTrueOption('--ios'),
379378
SetTrueOption('--llbuild', dest='build_llbuild'),
380379
SetTrueOption('--lldb', dest='build_lldb'),
381-
SetTrueOption('--playgroundlogger', dest='build_playgroundlogger'),
382380
SetTrueOption('--playgroundsupport', dest='build_playgroundsupport'),
383381
SetTrueOption('--skip-build'),
384382
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)