Skip to content

Commit 7431b96

Browse files
committed
[Build] Only add -lfts for linux-static-*.
Looks like I'd unconditionally added -lfts to the Foundation build flags. rdar://123503470
1 parent 2297c3f commit 7431b96

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

utils/build-script-impl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,6 +1446,16 @@ function swift_c_flags() {
14461446
esac
14471447
}
14481448

1449+
function maybe_lfts() {
1450+
local host=$1
1451+
1452+
case $host in
1453+
linux-static-*)
1454+
echo -n "-lfts"
1455+
;;
1456+
esac
1457+
}
1458+
14491459
function common_swift_flags() {
14501460
if [ "${module_cache}" == "" ] ; then
14511461
echo "error: a module cache path has not been set"
@@ -2524,7 +2534,7 @@ for host in "${ALL_HOSTS[@]}"; do
25242534
-DENABLE_TESTING:BOOL=NO
25252535

25262536
-DBUILD_SHARED_LIBS=$([[ ${product} == foundation_static ]] && echo "NO" || echo "YES")
2527-
-DCMAKE_C_FLAGS="$(swift_c_flags ${host}) -lfts"
2537+
-DCMAKE_C_FLAGS="$(swift_c_flags ${host}) $(maybe_lfts ${host})"
25282538
)
25292539

25302540
if [[ $(is_cross_tools_host ${host}) ]] ; then

0 commit comments

Comments
 (0)