@@ -446,14 +446,6 @@ function set_build_options_for_host() {
446
446
case ${host} in
447
447
linux-x86_64)
448
448
SWIFT_HOST_VARIANT_ARCH=" x86_64"
449
- playgroundlogger_build_cmd=" ${PLAYGROUNDLOGGER_SOURCE_DIR} /build.py"
450
- playgroundlogger_build_options=(
451
- --swiftc " $( build_directory_bin ${host} swift) "
452
- --foundation " $( build_directory ${host} foundation) "
453
- --build-dir " $( build_directory ${host} playgroundlogger) "
454
- --swift-build-dir " $( build_directory ${host} swift) "
455
- --$( tolower " ${PLAYGROUNDLOGGER_BUILD_TYPE} " )
456
- )
457
449
;;
458
450
linux-armv6)
459
451
SWIFT_HOST_VARIANT_ARCH=" armv6"
@@ -501,7 +493,6 @@ function set_build_options_for_host() {
501
493
swiftpm_bootstrap_options=(
502
494
--sysroot=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
503
495
)
504
- playgroundlogger_build_cmd=" xcodebuild"
505
496
playgroundlogger_build_target=(" PlaygroundLogger_TestDriver" )
506
497
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" MacOSX.platform"
507
498
;;
@@ -519,7 +510,6 @@ function set_build_options_for_host() {
519
510
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
520
511
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
521
512
)
522
- playgroundlogger_build_cmd=" xcodebuild"
523
513
playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
524
514
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" iPhoneSimulator.platform"
525
515
;;
@@ -537,7 +527,6 @@ function set_build_options_for_host() {
537
527
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
538
528
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
539
529
)
540
- playgroundlogger_build_cmd=" xcodebuild"
541
530
playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
542
531
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" iPhoneSimulator.platform"
543
532
;;
@@ -555,7 +544,6 @@ function set_build_options_for_host() {
555
544
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
556
545
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
557
546
)
558
- playgroundlogger_build_cmd=" xcodebuild"
559
547
playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
560
548
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" iPhoneOS.platform"
561
549
;;
@@ -573,7 +561,6 @@ function set_build_options_for_host() {
573
561
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
574
562
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
575
563
)
576
- playgroundlogger_build_cmd=" xcodebuild"
577
564
playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
578
565
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" iPhoneOS.platform"
579
566
;;
@@ -591,7 +578,6 @@ function set_build_options_for_host() {
591
578
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
592
579
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
593
580
)
594
- playgroundlogger_build_cmd=" xcodebuild"
595
581
playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
596
582
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" iPhoneOS.platform"
597
583
;;
@@ -609,7 +595,6 @@ function set_build_options_for_host() {
609
595
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
610
596
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
611
597
)
612
- playgroundlogger_build_cmd=" xcodebuild"
613
598
playgroundlogger_build_target=(" PlaygroundLogger_tvOS" )
614
599
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" AppleTVSimulator.platform"
615
600
;;
@@ -627,7 +612,6 @@ function set_build_options_for_host() {
627
612
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
628
613
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
629
614
)
630
- playgroundlogger_build_cmd=" xcodebuild"
631
615
playgroundlogger_build_target=(" PlaygroundLogger_tvOS" )
632
616
PLAYGROUNDLOGGER_INSTALL_PLATFORM=" AppleTVOS.platform"
633
617
;;
@@ -2657,18 +2641,28 @@ for host in "${ALL_HOSTS[@]}"; do
2657
2641
continue
2658
2642
;;
2659
2643
playgroundlogger)
2644
+ if [[ " $( uname -s) " != " Darwin" ]]; then
2645
+ echo " error: unable to build PlaygroundLogger on this platform"
2646
+ exit 1
2647
+ fi
2648
+
2660
2649
PLAYGROUNDLOGGER_BUILD_DIR=$( build_directory ${host} ${product} )
2661
2650
SWIFTC_BIN=" $( build_directory_bin ${host} swift) /swiftc"
2662
2651
2663
2652
set -x
2664
2653
pushd " ${PLAYGROUNDLOGGER_SOURCE_DIR} "
2665
2654
mkdir -p " ${PLAYGROUNDLOGGER_BUILD_DIR} "
2666
- " ${playgroundlogger_build_cmd} " -configuration " ${PLAYGROUNDLOGGER_BUILD_TYPE} " -target " ${playgroundlogger_build_target} " install SWIFT_EXEC=" ${SWIFTC_BIN} " DSTROOT=${build_dir} INSTALL_PATH=" /" SKIP_INSTALL=NO
2655
+ " xcodebuild " -configuration " ${PLAYGROUNDLOGGER_BUILD_TYPE} " -target " ${playgroundlogger_build_target} " install SWIFT_EXEC=" ${SWIFTC_BIN} " DSTROOT=${build_dir} INSTALL_PATH=" /" SKIP_INSTALL=NO
2667
2656
popd
2668
2657
{ set +x; } 2> /dev/null
2669
2658
continue
2670
2659
;;
2671
2660
playgroundsupport)
2661
+ if [[ " $( uname -s) " != " Darwin" ]]; then
2662
+ echo " error: unable to build PlaygroundSupport on this platform"
2663
+ exit 1
2664
+ fi
2665
+
2672
2666
PLAYGROUNDSUPPORT_BUILD_DIR=$( build_directory ${host} ${product} )
2673
2667
SWIFTC_BIN=" $( build_directory_bin ${host} swift) /swiftc"
2674
2668
@@ -2999,6 +2993,10 @@ for host in "${ALL_HOSTS[@]}"; do
2999
2993
continue
3000
2994
;;
3001
2995
playgroundlogger)
2996
+ if [[ " ${host} " != " macosx" * ]]; then
2997
+ echo " Skipping PlaygroundLogger tests on non-macOS platform"
2998
+ continue
2999
+ fi
3002
3000
SWIFT_DYLIB_PATH=$( build_directory ${host} swift) /lib/swift/macosx/
3003
3001
PLAYGROUNDLOGGER_FRAMEWORK_PATH=$( build_directory ${host} ${product} )
3004
3002
set -x
@@ -3322,11 +3320,6 @@ for host in "${ALL_HOSTS[@]}"; do
3322
3320
# requires root permissions.
3323
3321
set -x
3324
3322
case " $( uname -s) " in
3325
- Linux)
3326
- PLAYGROUNDLOGGER_INSTALL_DIR=" $( get_host_install_destdir ${host} ) /$( get_host_install_prefix ${host} ) /lib/swift/linux"
3327
- mkdir -p " ${PLAYGROUNDLOGGER_INSTALL_DIR} "
3328
- cp -R " ${PLAYGROUNDLOGGER_BUILD_DIR} " /libPlaygroundLogger.so " ${PLAYGROUNDLOGGER_INSTALL_DIR} "
3329
- ;;
3330
3323
Darwin)
3331
3324
pushd " ${PLAYGROUNDLOGGER_SOURCE_DIR} "
3332
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} ) "
@@ -3349,20 +3342,16 @@ for host in "${ALL_HOSTS[@]}"; do
3349
3342
continue
3350
3343
fi
3351
3344
case " $( uname -s) " in
3352
- Linux)
3353
- ;;
3354
- FreeBSD)
3355
- ;;
3356
- CYGWIN_NT-10.0)
3357
- ;;
3358
- Haiku)
3359
- ;;
3360
3345
Darwin)
3361
3346
pushd " ${PLAYGROUNDSUPPORT_SOURCE_DIR} "
3362
3347
xcodebuild -target AllProducts -configuration ${PLAYGROUNDSUPPORT_BUILD_TYPE} install SWIFT_EXEC=" ${SWIFTC_BIN} " DT_TOOLCHAIN_DIR=" ${TOOLCHAIN_PREFIX} " DSTROOT=" $( get_host_install_destdir ${host} ) "
3363
3348
popd
3364
3349
continue
3365
3350
;;
3351
+ * )
3352
+ echo " error: --install-playgroundsupport is not supported on this platform"
3353
+ exit 1
3354
+ ;;
3366
3355
esac
3367
3356
{ set +x; } 2> /dev/null
3368
3357
;;
0 commit comments