mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add driver options to swift to enable MCCAS.
To enable MCCAS, the following driver options have been added -cas-backend: Enable MCCAS backend in swift, the option -cache-compile-job must also be used. -cas-backend-mode=native: Set the CAS Backend mode to emit an object file after materializing it from the CAS. -cas-backend-mode=casid: Emit a file with the CASID for the CAS that was created. -cas-backend-mode=verify: Verify that the object file created is identical to the object file materialized from the CAS. -cas-emit-casid-file: Emit a .casid file next to the object file when CAS Backend is enabled.
This commit is contained in:
@@ -380,6 +380,17 @@ bool ArgsToFrontendOptionsConverter::convert(
|
||||
Opts.BlocklistConfigFilePaths.push_back(A);
|
||||
}
|
||||
|
||||
if (Arg *A = Args.getLastArg(OPT_cas_backend_mode)) {
|
||||
Opts.CASObjMode = llvm::StringSwitch<llvm::CASBackendMode>(A->getValue())
|
||||
.Case("native", llvm::CASBackendMode::Native)
|
||||
.Case("casid", llvm::CASBackendMode::CASID)
|
||||
.Case("verify", llvm::CASBackendMode::Verify)
|
||||
.Default(llvm::CASBackendMode::Native);
|
||||
}
|
||||
|
||||
Opts.UseCASBackend = Args.hasArg(OPT_cas_backend);
|
||||
Opts.EmitCASIDFile = Args.hasArg(OPT_cas_emit_casid_file);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user