Skip to content

Commit e5f5e59

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. (cherry picked from commit faa5003)
1 parent c6f161f commit e5f5e59

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
@@ -3375,6 +3375,7 @@ function build_and_test_installable_package() {
33753375
COMPATIBILITY_VERSION=2
33763376
COMPATIBILITY_VERSION_DISPLAY_STRING="Xcode 8.0"
33773377
DARWIN_TOOLCHAIN_CREATED_DATE="$(date -u +'%a %b %d %T GMT %Y')"
3378+
TOOLCHAIN_PLUGIN_PATH_DESCRIPTOR='$(TOOLCHAIN_DIR)/usr/lib/swift/host/plugins'
33783379

33793380
SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME="YES"
33803381
if [[ "${DARWIN_TOOLCHAIN_REQUIRE_USE_OS_RUNTIME}" -eq "1" ]]; then
@@ -3409,6 +3410,7 @@ function build_and_test_installable_package() {
34093410
call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:SWIFT_LINK_OBJC_RUNTIME string 'YES'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
34103411
call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:SWIFT_DEVELOPMENT_TOOLCHAIN string 'YES'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
34113412
call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME string '${SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME}'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
3413+
call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:OTHER_SWIFT_FLAGS string '\$(inherited) -plugin-path ${TOOLCHAIN_PLUGIN_PATH_DESCRIPTOR}'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
34123414

34133415
call chmod a+r "${DARWIN_TOOLCHAIN_INFO_PLIST}"
34143416

0 commit comments

Comments
 (0)