@@ -361,8 +361,9 @@ public struct ClangExplicitModulesPayload: Serializable, Encodable, Sendable {
361
361
public let dependencyFilteringRootPath : Path ?
362
362
public let reportRequiredTargetDependencies : BooleanWarningLevel
363
363
public let verifyingModule : String ?
364
+ public let shouldGenerateReproducerForErrors : Bool
364
365
365
- fileprivate init ( uniqueID: String , sourcePath: Path , libclangPath: Path , usesCompilerLauncher: Bool , outputPath: Path , scanningOutputPath: Path , casOptions: CASOptions ? , cacheFallbackIfNotAvailable: Bool , dependencyFilteringRootPath: Path ? , reportRequiredTargetDependencies: BooleanWarningLevel , verifyingModule: String ? ) {
366
+ fileprivate init ( uniqueID: String , sourcePath: Path , libclangPath: Path , usesCompilerLauncher: Bool , outputPath: Path , scanningOutputPath: Path , casOptions: CASOptions ? , cacheFallbackIfNotAvailable: Bool , dependencyFilteringRootPath: Path ? , reportRequiredTargetDependencies: BooleanWarningLevel , verifyingModule: String ? , shouldGenerateReproducerForErrors : Bool ) {
366
367
self . uniqueID = uniqueID
367
368
self . sourcePath = sourcePath
368
369
self . libclangPath = libclangPath
@@ -374,10 +375,11 @@ public struct ClangExplicitModulesPayload: Serializable, Encodable, Sendable {
374
375
self . dependencyFilteringRootPath = dependencyFilteringRootPath
375
376
self . reportRequiredTargetDependencies = reportRequiredTargetDependencies
376
377
self . verifyingModule = verifyingModule
378
+ self . shouldGenerateReproducerForErrors = shouldGenerateReproducerForErrors
377
379
}
378
380
379
381
public func serialize< T: Serializer > ( to serializer: T ) {
380
- serializer. serializeAggregate ( 11 ) {
382
+ serializer. serializeAggregate ( 12 ) {
381
383
serializer. serialize ( uniqueID)
382
384
serializer. serialize ( sourcePath)
383
385
serializer. serialize ( libclangPath)
@@ -389,11 +391,12 @@ public struct ClangExplicitModulesPayload: Serializable, Encodable, Sendable {
389
391
serializer. serialize ( dependencyFilteringRootPath)
390
392
serializer. serialize ( reportRequiredTargetDependencies)
391
393
serializer. serialize ( verifyingModule)
394
+ serializer. serialize ( shouldGenerateReproducerForErrors)
392
395
}
393
396
}
394
397
395
398
public init ( from deserializer: any Deserializer ) throws {
396
- try deserializer. beginAggregate ( 11 )
399
+ try deserializer. beginAggregate ( 12 )
397
400
self . uniqueID = try deserializer. deserialize ( )
398
401
self . sourcePath = try deserializer. deserialize ( )
399
402
self . libclangPath = try deserializer. deserialize ( )
@@ -405,6 +408,7 @@ public struct ClangExplicitModulesPayload: Serializable, Encodable, Sendable {
405
408
self . dependencyFilteringRootPath = try deserializer. deserialize ( )
406
409
self . reportRequiredTargetDependencies = try deserializer. deserialize ( )
407
410
self . verifyingModule = try deserializer. deserialize ( )
411
+ self . shouldGenerateReproducerForErrors = try deserializer. deserialize ( )
408
412
}
409
413
410
414
}
@@ -997,7 +1001,8 @@ public class ClangCompilerSpec : CompilerSpec, SpecIdentifierType, GCCCompatible
997
1001
// To match the behavior of -MMD, our scan task should filter out headers in the SDK when discovering dependencies. In the long run, libclang should do this for us.
998
1002
dependencyFilteringRootPath: isForPCHTask ? nil : cbc. producer. sdk? . path,
999
1003
reportRequiredTargetDependencies: cbc. scope. evaluate ( BuiltinMacros . DIAGNOSE_MISSING_TARGET_DEPENDENCIES) ,
1000
- verifyingModule: verifyingModule ( cbc)
1004
+ verifyingModule: verifyingModule ( cbc) ,
1005
+ shouldGenerateReproducerForErrors: cbc. scope. evaluate ( BuiltinMacros . CLANG_EXPLICIT_MODULES_ENABLE_REPRODUCER_FOR_ERRORS)
1001
1006
)
1002
1007
let explicitModulesSignatureData = cachedBuild ? " cached " : nil
1003
1008
0 commit comments