mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IRGen: Add a frontend option to force single LLVM module emission in multithreaded mode
This allows to experiment with single module LLVM emission without having to change drivers that expect multiple output files. rdar://94744623
This commit is contained in:
@@ -1727,6 +1727,13 @@ static bool performCompileStepsPostSILGen(CompilerInstance &Instance,
|
||||
if (validateTBDIfNeeded(Invocation, MSF, *IRModule.getModule()))
|
||||
return true;
|
||||
|
||||
if (IRGenOpts.UseSingleModuleLLVMEmission) {
|
||||
// Pretend the other files that drivers/build systems expect exist by
|
||||
// creating empty files.
|
||||
if (writeEmptyOutputFilesFor(Context, ParallelOutputFilenames, IRGenOpts))
|
||||
return true;
|
||||
}
|
||||
|
||||
return generateCode(Instance, OutputFilename, IRModule.getModule(),
|
||||
HashGlobal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user