Skip to content

Commit 92f9456

Browse files
committed
[build-script] Link Objective-C runtime for XCTest
The XCTest CI is currently broken for OS X. Invoking `xcodebuild`, even when setting the correct `SWIFT_EXEC`, was unable to build Foundation. The problem was that a flag to link the Objective-C runtime was not being set as it would be when building with a Swift toolchain. Set the flag to get the builds passing. The XCTest CI presets should pass on all platforms with this change.
1 parent d80fe53 commit 92f9456

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utils/build-script-impl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1916,6 +1916,7 @@ for deployment_target in "${HOST_TARGET}" "${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}"
19161916
-workspace "${XCTEST_SOURCE_DIR}"/XCTest.xcworkspace \
19171917
-scheme SwiftXCTest \
19181918
SWIFT_EXEC="${SWIFTC_BIN}" \
1919+
SWIFT_LINK_OBJC_RUNTIME=YES \
19191920
SKIP_INSTALL=NO \
19201921
DEPLOYMENT_LOCATION=YES \
19211922
DSTROOT="${XCTEST_BUILD_DIR}" \
@@ -2183,7 +2184,8 @@ for deployment_target in "${STDLIB_DEPLOYMENT_TARGETS[@]}"; do
21832184
xcodebuild \
21842185
-workspace "${XCTEST_SOURCE_DIR}"/XCTest.xcworkspace \
21852186
-scheme SwiftXCTestFunctionalTests \
2186-
SWIFT_EXEC="${SWIFTC_BIN}"
2187+
SWIFT_EXEC="${SWIFTC_BIN}" \
2188+
SWIFT_LINK_OBJC_RUNTIME=YES
21872189
{ set +x; } 2>/dev/null
21882190
else
21892191
FOUNDATION_BUILD_DIR=$(build_directory ${deployment_target} foundation)

0 commit comments

Comments
 (0)