@@ -1180,6 +1180,7 @@ SWIFTSYNTAX_SOURCE_DIR="${WORKSPACE}/swift-syntax"
1180
1180
SKSTRESSTESTER_SOURCE_DIR=" ${WORKSPACE} /swift-stress-tester/SourceKitStressTester"
1181
1181
XCTEST_SOURCE_DIR=" ${WORKSPACE} /swift-corelibs-xctest"
1182
1182
FOUNDATION_SOURCE_DIR=" ${WORKSPACE} /swift-corelibs-foundation"
1183
+ FOUNDATION_STATIC_SOURCE_DIR=" ${WORKSPACE} /swift-corelibs-foundation"
1183
1184
LIBDISPATCH_SOURCE_DIR=" ${WORKSPACE} /swift-corelibs-libdispatch"
1184
1185
LIBDISPATCH_STATIC_SOURCE_DIR=" ${WORKSPACE} /swift-corelibs-libdispatch"
1185
1186
LIBICU_SOURCE_DIR=" ${WORKSPACE} /icu"
@@ -1230,6 +1231,9 @@ if [[ ! "${SKIP_BUILD_LIBDISPATCH}" ]] ; then
1230
1231
fi
1231
1232
if [[ ! " ${SKIP_BUILD_FOUNDATION} " ]] ; then
1232
1233
PRODUCTS=(" ${PRODUCTS[@]} " foundation)
1234
+ if [[ -z " ${SKIP_BUILD_STATIC_FOUNDATION} " ]] ; then
1235
+ PRODUCTS=(" ${PRODUCTS[@]} " foundation_static)
1236
+ fi
1233
1237
fi
1234
1238
if [[ ! " ${SKIP_BUILD_LLBUILD} " ]] ; then
1235
1239
PRODUCTS=(" ${PRODUCTS[@]} " llbuild)
@@ -1571,7 +1575,7 @@ function build_directory_bin() {
1571
1575
xctest)
1572
1576
echo " ${root} /${XCTEST_BUILD_TYPE} /bin"
1573
1577
;;
1574
- foundation)
1578
+ foundation|foundation_static )
1575
1579
echo " ${root} /${FOUNDATION_BUILD_TYPE} /bin"
1576
1580
;;
1577
1581
libdispatch|libdispatch_static)
@@ -1716,7 +1720,7 @@ function cmake_config_opt() {
1716
1720
xctest)
1717
1721
echo " --config ${XCTEST_BUILD_TYPE} "
1718
1722
;;
1719
- foundation)
1723
+ foundation|foundation_static )
1720
1724
echo " --config ${FOUNDATION_BUILD_TYPE} "
1721
1725
;;
1722
1726
libdispatch|libdispatch_static)
@@ -2604,7 +2608,7 @@ for host in "${ALL_HOSTS[@]}"; do
2604
2608
esac
2605
2609
2606
2610
;;
2607
- foundation)
2611
+ foundation|foundation_static )
2608
2612
# The configuration script requires knowing about XCTest's
2609
2613
# location for building and running the tests. Note that XCTest
2610
2614
# is not yet built at this point.
@@ -2625,8 +2629,12 @@ for host in "${ALL_HOSTS[@]}"; do
2625
2629
-DICU_INCLUDE_DIR:PATH=${ICU_ROOT} /include
2626
2630
-DICU_UC_LIBRARIES:FILEPATH=${ICU_LIBDIR} /libicuucswift.so
2627
2631
-DICU_UC_LIBRARY:FILEPATH=${ICU_LIBDIR} /libicuucswift.so
2632
+ -DICU_UC_LIBRARY_DEBUG:FILEPATH=${ICU_LIBDIR} /libicuucswift.so
2633
+ -DICU_UC_LIBRARY_RELEASE:FILEPATH=${ICU_LIBDIR} /libicuucswift.so
2628
2634
-DICU_I18N_LIBRARIES:FILEPATH=${ICU_LIBDIR} /libicui18nswift.so
2629
2635
-DICU_I18N_LIBRARY:FILEPATH=${ICU_LIBDIR} /libicui18nswift.so
2636
+ -DICU_I18N_LIBRARY_DEBUG:FILEPATH=${ICU_LIBDIR} /libicui18nswift.so
2637
+ -DICU_I18N_LIBRARY_RELEASE:FILEPATH=${ICU_LIBDIR} /libicui18nswift.so
2630
2638
)
2631
2639
else
2632
2640
LIBICU_BUILD_ARGS=()
@@ -2662,6 +2670,8 @@ for host in "${ALL_HOSTS[@]}"; do
2662
2670
# NOTE(compnerd) we disable tests because XCTest is not ready
2663
2671
# yet, but we will reconfigure when the time comes.
2664
2672
-DENABLE_TESTING:BOOL=NO
2673
+
2674
+ -DBUILD_SHARED_LIBS=$( [[ ${product} == foundation_static ]] && echo " NO" || echo " YES" )
2665
2675
)
2666
2676
2667
2677
;;
@@ -3225,8 +3235,12 @@ for host in "${ALL_HOSTS[@]}"; do
3225
3235
-DICU_INCLUDE_DIR:PATH=${ICU_ROOT} /include
3226
3236
-DICU_UC_LIBRARIES:FILEPATH=${ICU_LIBDIR} /libicuucswift.so
3227
3237
-DICU_UC_LIBRARY:FILEPATH=${ICU_LIBDIR} /libicuucswift.so
3238
+ -DICU_UC_LIBRARY_DEBUG:FILEPATH=${ICU_LIBDIR} /libicuucswift.so
3239
+ -DICU_UC_LIBRARY_RELEASE:FILEPATH=${ICU_LIBDIR} /libicuucswift.so
3228
3240
-DICU_I18N_LIBRARIES:FILEPATH=${ICU_LIBDIR} /libicui18nswift.so
3229
3241
-DICU_I18N_LIBRARY:FILEPATH=${ICU_LIBDIR} /libicui18nswift.so
3242
+ -DICU_I18N_LIBRARY_DEBUG:FILEPATH=${ICU_LIBDIR} /libicui18nswift.so
3243
+ -DICU_I18N_LIBRARY_RELEASE:FILEPATH=${ICU_LIBDIR} /libicui18nswift.so
3230
3244
)
3231
3245
else
3232
3246
LIBICU_BUILD_ARGS=()
@@ -3266,6 +3280,9 @@ for host in "${ALL_HOSTS[@]}"; do
3266
3280
results_targets=( " test" )
3267
3281
executable_target=(" TestFoundation" )
3268
3282
;;
3283
+ foundation_static)
3284
+ continue
3285
+ ;;
3269
3286
libdispatch)
3270
3287
if [[ " ${SKIP_TEST_LIBDISPATCH} " ]]; then
3271
3288
continue
@@ -3518,7 +3535,7 @@ for host in "${ALL_HOSTS[@]}"; do
3518
3535
esac
3519
3536
3520
3537
;;
3521
- foundation)
3538
+ foundation|foundation_static )
3522
3539
# FIXME: Foundation doesn't build from the script on OS X
3523
3540
if [[ ${host} == " macosx" * ]]; then
3524
3541
echo " Skipping Foundation on OS X -- use the Xcode project instead"
0 commit comments