Skip to content

Commit 2ccda29

Browse files
ahoppenfurby-tm
authored andcommitted
Set environment variable to disable building swift-syntax in Swift 6 mode (swiftlang#7495)
This allows us to work around the following issue in CI: The self-hosted SwiftPM job has Xcode 15.3 (Swift 5.10) installed and builds a Swift 6 SwiftPM from source. It then tries to build itself as a fat binary using the just-built Swift 6 SwiftPM, which uses xcbuild from Xcode as the build system. But the xcbuild in the installed Xcode is too old and doesn't know about Swift 6 mode, so it fails with: SWIFT_VERSION '6' is unsupported, supported versions are: 4.0, 4.2, 5.0 (rdar://126952308). This is fixed by setting `SWIFTSYNTAX_DISABLE_SWIFT_6_MODE` in `build-using-self`. The source compat suite is seeing the same issue, just by using `bootstrap`, so set it there as well. Accompanies swiftlang/swift-syntax#2621
1 parent faa798d commit 2ccda29

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Utilities/bootstrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,8 @@ def get_swiftpm_env_cmd(args):
747747
env_cmd.append("SWIFTPM_LLBUILD_FWK=1")
748748
env_cmd.append("SWIFTCI_USE_LOCAL_DEPS=1")
749749
env_cmd.append("SWIFTPM_MACOS_DEPLOYMENT_TARGET=%s" % g_macos_deployment_target)
750+
# Disable Swift 6 mode in swift-syntax to work around rdar://126952308
751+
env_cmd.append("SWIFTSYNTAX_DISABLE_SWIFT_6_MODE=1")
750752

751753
if not '-macosx' in args.build_target and args.command == 'install':
752754
env_cmd.append("SWIFTCI_INSTALL_RPATH_OS=%s" % args.platform_path.group(2))

Utilities/build-using-self

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ echo "Current directory is ${PWD}"
2020

2121
CONFIGURATION=debug
2222
export SWIFTCI_IS_SELF_HOSTED=1
23+
# Disable Swift 6 mode in swift-syntax to work around rdar://126952308
24+
export SWIFTSYNTAX_DISABLE_SWIFT_6_MODE=1
2325

2426
set -x
2527

0 commit comments

Comments
 (0)