mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ClangImporter] Add a mode to create the underlying Clang 'CompilerInvocation' directly from 'cc1' arguments, bypassing the Clang driver, only in the 'emit-pcm' compilation flow.
Controlled with a new flag '-direct-clang-cc1-module-build' This will allow clients to formulate 'swift-frontend' invocations with fully-specified set of cc1 arguments (using '-Xcc -Xclang -Xcc <FLAG>') required for the PCM build, without having to go through the driver.
This commit is contained in:
@@ -1273,6 +1273,7 @@ static bool ParseClangImporterArgs(ClangImporterOptions &Opts,
|
||||
}
|
||||
|
||||
Opts.ExtraArgsOnly |= Args.hasArg(OPT_extra_clang_options_only);
|
||||
Opts.DirectClangCC1ModuleBuild |= Args.hasArg(OPT_direct_clang_cc1_module_build);
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_pch_output_dir)) {
|
||||
Opts.PrecompiledHeaderOutputDir = A->getValue();
|
||||
|
||||
Reference in New Issue
Block a user