mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #68138 from rastogishubham/MCCASSwift
Add driver options to swift to enable MCCAS.
This commit is contained in:
@@ -266,6 +266,10 @@ setIRGenOutputOptsFromFrontendOptions(IRGenOptions &IRGenOpts,
|
||||
}
|
||||
}(FrontendOpts.RequestedAction);
|
||||
|
||||
IRGenOpts.UseCASBackend = FrontendOpts.UseCASBackend;
|
||||
IRGenOpts.CASObjMode = FrontendOpts.CASObjMode;
|
||||
IRGenOpts.EmitCASIDFile = FrontendOpts.EmitCASIDFile;
|
||||
|
||||
// If we're in JIT mode, set the requisite flags.
|
||||
if (FrontendOpts.RequestedAction == FrontendOptions::ActionType::Immediate) {
|
||||
IRGenOpts.UseJIT = true;
|
||||
@@ -1447,7 +1451,8 @@ static bool ParseClangImporterArgs(ClangImporterOptions &Opts,
|
||||
DiagnosticEngine &Diags,
|
||||
StringRef workingDirectory,
|
||||
const LangOptions &LangOpts,
|
||||
const FrontendOptions &FrontendOpts) {
|
||||
const FrontendOptions &FrontendOpts,
|
||||
bool RequiresCAS) {
|
||||
using namespace options;
|
||||
|
||||
if (const Arg *a = Args.getLastArg(OPT_tools_directory)) {
|
||||
@@ -1575,7 +1580,7 @@ static bool ParseClangImporterArgs(ClangImporterOptions &Opts,
|
||||
|
||||
// Forward the FrontendOptions to clang importer option so it can be
|
||||
// accessed when creating clang module compilation invocation.
|
||||
if (FrontendOpts.EnableCaching)
|
||||
if (RequiresCAS)
|
||||
Opts.CASOpts = FrontendOpts.CASOpts;
|
||||
|
||||
return false;
|
||||
@@ -3034,7 +3039,7 @@ bool CompilerInvocation::parseArgs(
|
||||
}
|
||||
|
||||
if (ParseClangImporterArgs(ClangImporterOpts, ParsedArgs, Diags,
|
||||
workingDirectory, LangOpts, FrontendOpts)) {
|
||||
workingDirectory, LangOpts, FrontendOpts, requiresCAS())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user