Skip to content

Commit 999bf66

Browse files
committed
Add flags to toolchain Info.plist to allow using macros from Apple's SDKs when building in Xcode
1 parent 1cf20fb commit 999bf66

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utils/build-script-impl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3314,6 +3314,8 @@ function build_and_test_installable_package() {
33143314
COMPATIBILITY_VERSION=2
33153315
COMPATIBILITY_VERSION_DISPLAY_STRING="Xcode 8.0"
33163316
DARWIN_TOOLCHAIN_CREATED_DATE="$(date -u +'%a %b %d %T GMT %Y')"
3317+
XCODE_DEFAULT_TOOLCHAIN_PLUGIN_SERVER_DESCRIPTOR='$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins#$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-plugin-server'
3318+
XCODE_DEFAULT_TOOLCHAIN_LOCAL_PLUGIN_SERVER_DESCRIPTOR='$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/local/lib/swift/host/plugins#$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-plugin-server'
33173319

33183320
SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME="YES"
33193321
if [[ "${DARWIN_TOOLCHAIN_REQUIRE_USE_OS_RUNTIME}" -eq "1" ]]; then
@@ -3349,6 +3351,8 @@ function build_and_test_installable_package() {
33493351
call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:SWIFT_DEVELOPMENT_TOOLCHAIN string 'YES'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
33503352
call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME string '${SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME}'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
33513353

3354+
call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:OTHER_SWIFT_FLAGS string '$(inherited) -Xfrontend -external-plugin-path -Xfrontend ${XCODE_DEFAULT_TOOLCHAIN_PLUGIN_SERVER_DESCRIPTOR} -Xfrontend -external-plugin-path -Xfrontend ${XCODE_DEFAULT_TOOLCHAIN_LOCAL_PLUGIN_SERVER_DESCRIPTOR}'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
3355+
33523356
call chmod a+r "${DARWIN_TOOLCHAIN_INFO_PLIST}"
33533357

33543358
if [[ "${DARWIN_TOOLCHAIN_APPLICATION_CERT}" ]] ; then

0 commit comments

Comments
 (0)