@@ -5,19 +5,22 @@ import Foundation
55
66/// If we are in a controlled CI environment, we can use internal compiler flags
77/// to speed up the build or improve it.
8- let swiftSettings : [ SwiftSetting ] = ProcessInfo . processInfo. environment [ " SWIFT_BUILD_SCRIPT_ENVIRONMENT " ] . map { _ in
8+ let swiftSyntaxSwiftSettings : [ SwiftSetting ]
9+ if case _? = ProcessInfo . processInfo. environment [ " SWIFT_BUILD_SCRIPT_ENVIRONMENT " ] {
910 let groupFile = URL ( fileURLWithPath: #file)
1011 . deletingLastPathComponent ( )
1112 . appendingPathComponent ( " utils " )
1213 . appendingPathComponent ( " group.json " )
13- return [ . unsafeFlags( [
14+ swiftSyntaxSwiftSettings = [ . unsafeFlags( [
1415 " -Xfrontend " , " -group-info-path " ,
1516 " -Xfrontend " , groupFile. path,
1617 // Enforcing exclusivity increases compile time of release builds by 2 minutes.
1718 // Disable it when we're in a controlled CI environment.
1819 " -enforce-exclusivity=unchecked " ,
1920 ] ) ]
20- } ?? [ ]
21+ } else {
22+ swiftSyntaxSwiftSettings = [ ]
23+ }
2124
2225let package = Package (
2326 name: " SwiftSyntax " ,
@@ -53,7 +56,7 @@ let package = Package(
5356 " SyntaxNodes.swift.gyb.template " ,
5457 " SyntaxKind.swift.gyb " ,
5558 ] ,
56- swiftSettings: swiftSettings
59+ swiftSettings: swiftSyntaxSwiftSettings
5760 ) ,
5861 . target(
5962 name: " SwiftSyntaxBuilder " ,
0 commit comments