@@ -132,20 +132,24 @@ public struct BuildParameters: Encodable {
132
132
indexStoreMode: IndexStoreMode = . auto,
133
133
isXcodeBuildSystemEnabled: Bool = false ,
134
134
shouldSkipBuilding: Bool = false ,
135
- debuggingParameters: Debugging = . init ( ) ,
135
+ debuggingParameters: Debugging ? = nil ,
136
136
driverParameters: Driver = . init( ) ,
137
137
linkingParameters: Linking = . init( ) ,
138
138
outputParameters: Output = . init( ) ,
139
139
testingParameters: Testing ? = nil
140
140
) throws {
141
141
let targetTriple = try targetTriple ?? . getHostTriple( usingSwiftCompiler: toolchain. swiftCompilerPath)
142
+ self . debuggingParameters = debuggingParameters ?? . init(
143
+ targetTriple: targetTriple,
144
+ shouldEnableDebuggingEntitlement: configuration == . debug
145
+ )
142
146
143
147
self . dataPath = dataPath
144
148
self . configuration = configuration
145
149
self . _toolchain = _Toolchain ( toolchain: toolchain)
146
150
self . hostTriple = try hostTriple ?? . getHostTriple( usingSwiftCompiler: toolchain. swiftCompilerPath)
147
151
self . targetTriple = targetTriple
148
- switch debuggingParameters. debugInfoFormat {
152
+ switch self . debuggingParameters. debugInfoFormat {
149
153
case . dwarf:
150
154
var flags = flags
151
155
// DWARF requires lld as link.exe expects CodeView debug info.
@@ -182,7 +186,6 @@ public struct BuildParameters: Encodable {
182
186
self . indexStoreMode = indexStoreMode
183
187
self . isXcodeBuildSystemEnabled = isXcodeBuildSystemEnabled
184
188
self . shouldSkipBuilding = shouldSkipBuilding
185
- self . debuggingParameters = debuggingParameters
186
189
self . driverParameters = driverParameters
187
190
self . linkingParameters = linkingParameters
188
191
self . outputParameters = outputParameters
0 commit comments