@@ -361,8 +361,9 @@ public struct ClangExplicitModulesPayload: Serializable, Encodable, Sendable {
361361 public let dependencyFilteringRootPath : Path ?
362362 public let reportRequiredTargetDependencies : BooleanWarningLevel
363363 public let verifyingModule : String ?
364+ public let shouldGenerateReproducerForErrors : Bool
364365
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 ) {
366367 self . uniqueID = uniqueID
367368 self . sourcePath = sourcePath
368369 self . libclangPath = libclangPath
@@ -374,10 +375,11 @@ public struct ClangExplicitModulesPayload: Serializable, Encodable, Sendable {
374375 self . dependencyFilteringRootPath = dependencyFilteringRootPath
375376 self . reportRequiredTargetDependencies = reportRequiredTargetDependencies
376377 self . verifyingModule = verifyingModule
378+ self . shouldGenerateReproducerForErrors = shouldGenerateReproducerForErrors
377379 }
378380
379381 public func serialize< T: Serializer > ( to serializer: T ) {
380- serializer. serializeAggregate ( 11 ) {
382+ serializer. serializeAggregate ( 12 ) {
381383 serializer. serialize ( uniqueID)
382384 serializer. serialize ( sourcePath)
383385 serializer. serialize ( libclangPath)
@@ -389,11 +391,12 @@ public struct ClangExplicitModulesPayload: Serializable, Encodable, Sendable {
389391 serializer. serialize ( dependencyFilteringRootPath)
390392 serializer. serialize ( reportRequiredTargetDependencies)
391393 serializer. serialize ( verifyingModule)
394+ serializer. serialize ( shouldGenerateReproducerForErrors)
392395 }
393396 }
394397
395398 public init ( from deserializer: any Deserializer ) throws {
396- try deserializer. beginAggregate ( 11 )
399+ try deserializer. beginAggregate ( 12 )
397400 self . uniqueID = try deserializer. deserialize ( )
398401 self . sourcePath = try deserializer. deserialize ( )
399402 self . libclangPath = try deserializer. deserialize ( )
@@ -405,6 +408,7 @@ public struct ClangExplicitModulesPayload: Serializable, Encodable, Sendable {
405408 self . dependencyFilteringRootPath = try deserializer. deserialize ( )
406409 self . reportRequiredTargetDependencies = try deserializer. deserialize ( )
407410 self . verifyingModule = try deserializer. deserialize ( )
411+ self . shouldGenerateReproducerForErrors = try deserializer. deserialize ( )
408412 }
409413
410414}
@@ -997,7 +1001,8 @@ public class ClangCompilerSpec : CompilerSpec, SpecIdentifierType, GCCCompatible
9971001 // 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.
9981002 dependencyFilteringRootPath: isForPCHTask ? nil : cbc. producer. sdk? . path,
9991003 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)
10011006 )
10021007 let explicitModulesSignatureData = cachedBuild ? " cached " : nil
10031008
0 commit comments