@@ -229,7 +229,6 @@ extension Driver {
229
229
try commandLine. appendLast ( . nostdimport, from: & parsedOptions)
230
230
try commandLine. appendLast ( . nostdlibimport, from: & parsedOptions)
231
231
try commandLine. appendLast ( . parseStdlib, from: & parsedOptions)
232
- try commandLine. appendLast ( . solverMemoryThreshold, from: & parsedOptions)
233
232
try commandLine. appendLast ( . valueRecursionThreshold, from: & parsedOptions)
234
233
try commandLine. appendLast ( . warnSwift3ObjcInference, from: & parsedOptions)
235
234
try commandLine. appendLast ( . remarkLoadingModule, from: & parsedOptions)
@@ -475,14 +474,17 @@ extension Driver {
475
474
try computeCanonicalObjCHeader ( explicitModulePlanner: explicitModulePlanner)
476
475
let objcHeaderFile = ( kind == . scanDependencies) ? originalObjCHeaderFile : importedObjCHeader
477
476
if let importedObjCHeader = objcHeaderFile, bridgingHeaderHandling != . ignored {
477
+ let importBridgingHeaderFlag : Option = importBridgingHeaderAsInternal
478
+ ? . internalImportBridgingHeader
479
+ : . importObjcHeader
478
480
if bridgingHeaderHandling == . precompiled, let pch = precompiledObjCHeader {
479
481
// For explicit module build, we directly pass the compiled pch to
480
482
// swift-frontend, rather than rely on swift-frontend to locate
481
483
// the pch in the pchOutputDir and can start an implicit build in case
482
484
// of a lookup failure.
483
485
if parsedOptions. contains ( . pchOutputDir) &&
484
486
!parsedOptions. contains ( . driverExplicitModuleBuild) {
485
- commandLine. appendFlag ( . importObjcHeader )
487
+ commandLine. appendFlag ( importBridgingHeaderFlag )
486
488
try addPathArgument ( VirtualPath . lookup ( importedObjCHeader) , to: & commandLine, remap: jobNeedPathRemap)
487
489
try commandLine. appendLast ( . pchOutputDir, from: & parsedOptions)
488
490
if !compilerMode. isSingleCompilation {
@@ -491,21 +493,21 @@ extension Driver {
491
493
} else {
492
494
// If header chaining is enabled, pass objc header through `-import-objc-header` and
493
495
// PCH file through `-import-pch`. Otherwise, pass either the PCH or header through
494
- // `-import-objc-header` option.
496
+ // `-import-objc-header` option (or its internal variant) .
495
497
if isFrontendArgSupported ( . importPch) , importedObjCHeader != originalObjCHeaderFile {
496
- commandLine. appendFlag ( . importPch)
498
+ commandLine. appendFlag ( importBridgingHeaderAsInternal ? . internalImportPch : . importPch)
497
499
try addPathArgument ( VirtualPath . lookup ( pch) , to: & commandLine, remap: jobNeedPathRemap)
498
500
if let originalHeader = originalObjCHeaderFile {
499
- commandLine. appendFlag ( . importObjcHeader )
501
+ commandLine. appendFlag ( importBridgingHeaderFlag )
500
502
try addPathArgument ( VirtualPath . lookup ( originalHeader) , to: & commandLine, remap: jobNeedPathRemap)
501
503
}
502
504
} else {
503
- commandLine. appendFlag ( . importObjcHeader )
505
+ commandLine. appendFlag ( importBridgingHeaderFlag )
504
506
try addPathArgument ( VirtualPath . lookup ( pch) , to: & commandLine, remap: jobNeedPathRemap)
505
507
}
506
508
}
507
509
} else {
508
- commandLine. appendFlag ( . importObjcHeader )
510
+ commandLine. appendFlag ( importBridgingHeaderFlag )
509
511
try addPathArgument ( VirtualPath . lookup ( importedObjCHeader) , to: & commandLine, remap: jobNeedPathRemap)
510
512
}
511
513
}
0 commit comments