Skip to content

Commit faa5003

Browse files
committed
[Macros] Add '-plugin-path' the the toolchain's plugins in Info.plist
So Xcode always prefer the plugins in the toolchain to the SDK's. Since swift.org toolchains include stdlib, it wants to use the plugins in it.
1 parent da65626 commit faa5003

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

utils/build-script-impl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3398,6 +3398,7 @@ function build_and_test_installable_package() {
33983398
COMPATIBILITY_VERSION=2
33993399
COMPATIBILITY_VERSION_DISPLAY_STRING="Xcode 8.0"
34003400
DARWIN_TOOLCHAIN_CREATED_DATE="$(date -u +'%a %b %d %T GMT %Y')"
3401+
TOOLCHAIN_PLUGIN_PATH_DESCRIPTOR='$(TOOLCHAIN_DIR)/usr/lib/swift/host/plugins'
34013402

34023403
SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME="YES"
34033404
if [[ "${DARWIN_TOOLCHAIN_REQUIRE_USE_OS_RUNTIME}" -eq "1" ]]; then
@@ -3432,6 +3433,7 @@ function build_and_test_installable_package() {
34323433
call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:SWIFT_LINK_OBJC_RUNTIME string 'YES'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
34333434
call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:SWIFT_DEVELOPMENT_TOOLCHAIN string 'YES'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
34343435
call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME string '${SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME}'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
3436+
call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:OTHER_SWIFT_FLAGS string '\$(inherited) -plugin-path ${TOOLCHAIN_PLUGIN_PATH_DESCRIPTOR}'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
34353437

34363438
call chmod a+r "${DARWIN_TOOLCHAIN_INFO_PLIST}"
34373439

0 commit comments

Comments
 (0)