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:
Arnold Schwaighofer
2022-06-09 07:52:45 -07:00
parent 5ed21c6842
commit 821ba47079
9 changed files with 105 additions and 24 deletions

View File

@@ -2299,6 +2299,9 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
"-num-threads");
}
}
Opts.UseSingleModuleLLVMEmission =
Opts.NumThreads != 0 &&
Args.hasArg(OPT_enable_single_module_llvm_emission);
if (SWIFT_ENABLE_GLOBAL_ISEL_ARM64 &&
Triple.getArch() == llvm::Triple::aarch64 &&