@@ -444,14 +444,6 @@ function set_build_options_for_host() {
444
444
case ${host} in
445
445
linux-x86_64)
446
446
SWIFT_HOST_VARIANT_ARCH=" x86_64"
447
- playgroundlogger_build_cmd=" ${PLAYGROUNDLOGGER_SOURCE_DIR} /build.py"
448
- playgroundlogger_build_options=(
449
- --swiftc " $( build_directory_bin ${host} swift) "
450
- --foundation " $( build_directory ${host} foundation) "
451
- --build-dir " $( build_directory ${host} playgroundlogger) "
452
- --swift-build-dir " $( build_directory ${host} swift) "
453
- --$( tolower " ${PLAYGROUNDLOGGER_BUILD_TYPE} " )
454
- )
455
447
;;
456
448
linux-armv6)
457
449
SWIFT_HOST_VARIANT_ARCH=" armv6"
@@ -499,7 +491,6 @@ function set_build_options_for_host() {
499
491
swiftpm_bootstrap_options=(
500
492
--sysroot=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
501
493
)
502
- playgroundlogger_build_cmd=" xcodebuild"
503
494
playgroundlogger_build_target=(" PlaygroundLogger_TestDriver" )
504
495
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" MacOSX.platform"
505
496
;;
@@ -517,7 +508,6 @@ function set_build_options_for_host() {
517
508
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
518
509
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
519
510
)
520
- playgroundlogger_build_cmd=" xcodebuild"
521
511
playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
522
512
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" iPhoneSimulator.platform"
523
513
;;
@@ -535,7 +525,6 @@ function set_build_options_for_host() {
535
525
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
536
526
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
537
527
)
538
- playgroundlogger_build_cmd=" xcodebuild"
539
528
playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
540
529
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" iPhoneSimulator.platform"
541
530
;;
@@ -553,7 +542,6 @@ function set_build_options_for_host() {
553
542
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
554
543
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
555
544
)
556
- playgroundlogger_build_cmd=" xcodebuild"
557
545
playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
558
546
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" iPhoneOS.platform"
559
547
;;
@@ -571,7 +559,6 @@ function set_build_options_for_host() {
571
559
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
572
560
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
573
561
)
574
- playgroundlogger_build_cmd=" xcodebuild"
575
562
playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
576
563
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" iPhoneOS.platform"
577
564
;;
@@ -589,7 +576,6 @@ function set_build_options_for_host() {
589
576
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
590
577
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
591
578
)
592
- playgroundlogger_build_cmd=" xcodebuild"
593
579
playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
594
580
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" iPhoneOS.platform"
595
581
;;
@@ -607,7 +593,6 @@ function set_build_options_for_host() {
607
593
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
608
594
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
609
595
)
610
- playgroundlogger_build_cmd=" xcodebuild"
611
596
playgroundlogger_build_target=(" PlaygroundLogger_tvOS" )
612
597
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" AppleTVSimulator.platform"
613
598
;;
@@ -625,7 +610,6 @@ function set_build_options_for_host() {
625
610
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
626
611
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
627
612
)
628
- playgroundlogger_build_cmd=" xcodebuild"
629
613
playgroundlogger_build_target=(" PlaygroundLogger_tvOS" )
630
614
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" AppleTVOS.platform"
631
615
;;
@@ -2621,18 +2605,28 @@ for host in "${ALL_HOSTS[@]}"; do
2621
2605
continue
2622
2606
;;
2623
2607
playgroundlogger)
2608
+ if [[ " $( uname -s) " != " Darwin" ]]; then
2609
+ echo " error: unable to build PlaygroundLogger on this platform"
2610
+ exit 1
2611
+ fi
2612
+
2624
2613
PLAYGROUNDLOGGER_BUILD_DIR=$( build_directory ${host} ${product} )
2625
2614
SWIFTC_BIN=" $( build_directory_bin ${host} swift) /swiftc"
2626
2615
2627
2616
set -x
2628
2617
pushd " ${PLAYGROUNDLOGGER_SOURCE_DIR} "
2629
2618
mkdir -p " ${PLAYGROUNDLOGGER_BUILD_DIR} "
2630
- " ${playgroundlogger_build_cmd} " -configuration " ${PLAYGROUNDLOGGER_BUILD_TYPE} " -target " ${playgroundlogger_build_target} " install SWIFT_EXEC=" ${SWIFTC_BIN} " DSTROOT=${build_dir} INSTALL_PATH=" /" SKIP_INSTALL=NO
2619
+ " xcodebuild " -configuration " ${PLAYGROUNDLOGGER_BUILD_TYPE} " -target " ${playgroundlogger_build_target} " install SWIFT_EXEC=" ${SWIFTC_BIN} " DSTROOT=${build_dir} INSTALL_PATH=" /" SKIP_INSTALL=NO
2631
2620
popd
2632
2621
{ set +x; } 2> /dev/null
2633
2622
continue
2634
2623
;;
2635
2624
playgroundsupport)
2625
+ if [[ " $( uname -s) " != " Darwin" ]]; then
2626
+ echo " error: unable to build PlaygroundSupport on this platform"
2627
+ exit 1
2628
+ fi
2629
+
2636
2630
PLAYGROUNDSUPPORT_BUILD_DIR=$( build_directory ${host} ${product} )
2637
2631
SWIFTC_BIN=" $( build_directory_bin ${host} swift) /swiftc"
2638
2632
@@ -2964,6 +2958,10 @@ for host in "${ALL_HOSTS[@]}"; do
2964
2958
continue
2965
2959
;;
2966
2960
playgroundlogger)
2961
+ if [[ " ${host} " != " macosx" * ]]; then
2962
+ echo " Skipping PlaygroundLogger tests on non-macOS platform"
2963
+ continue
2964
+ fi
2967
2965
SWIFT_DYLIB_PATH=$( build_directory ${host} swift) /lib/swift/macosx/
2968
2966
PLAYGROUNDLOGGER_FRAMEWORK_PATH=$( build_directory ${host} ${product} )
2969
2967
set -x
@@ -3287,11 +3285,6 @@ for host in "${ALL_HOSTS[@]}"; do
3287
3285
# requires root permissions.
3288
3286
set -x
3289
3287
case " $( uname -s) " in
3290
- Linux)
3291
- PLAYGROUNDLOGGER_INSTALL_DIR=" $( get_host_install_destdir ${host} ) /$( get_host_install_prefix ${host} ) /lib/swift/linux"
3292
- mkdir -p " ${PLAYGROUNDLOGGER_INSTALL_DIR} "
3293
- cp -R " ${PLAYGROUNDLOGGER_BUILD_DIR} " /libPlaygroundLogger.so " ${PLAYGROUNDLOGGER_INSTALL_DIR} "
3294
- ;;
3295
3288
Darwin)
3296
3289
pushd " ${PLAYGROUNDLOGGER_SOURCE_DIR} "
3297
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} ) "
@@ -3314,20 +3307,16 @@ for host in "${ALL_HOSTS[@]}"; do
3314
3307
continue
3315
3308
fi
3316
3309
case " $( uname -s) " in
3317
- Linux)
3318
- ;;
3319
- FreeBSD)
3320
- ;;
3321
- CYGWIN_NT-10.0)
3322
- ;;
3323
- Haiku)
3324
- ;;
3325
3310
Darwin)
3326
3311
pushd " ${PLAYGROUNDSUPPORT_SOURCE_DIR} "
3327
3312
xcodebuild -target AllProducts -configuration ${PLAYGROUNDSUPPORT_BUILD_TYPE} install SWIFT_EXEC=" ${SWIFTC_BIN} " DT_TOOLCHAIN_DIR=" ${TOOLCHAIN_PREFIX} " DSTROOT=" $( get_host_install_destdir ${host} ) "
3328
3313
popd
3329
3314
continue
3330
3315
;;
3316
+ * )
3317
+ echo " error: --install-playgroundsupport is not supported on this platform"
3318
+ exit 1
3319
+ ;;
3331
3320
esac
3332
3321
{ set +x; } 2> /dev/null
3333
3322
;;
0 commit comments