mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[embedded] Add a frontend flag to drop all code from a module and emit an empty object file
This commit is contained in:
@@ -2185,6 +2185,10 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
|
||||
FEOpts.RequestedAction == FrontendOptions::ActionType::CompileModuleFromInterface)
|
||||
Opts.StopOptimizationAfterSerialization = true;
|
||||
|
||||
if (Args.getLastArg(OPT_emit_empty_object_file)) {
|
||||
Opts.DropAllSILAfterSerialization = true;
|
||||
}
|
||||
|
||||
// Propagate the typechecker's understanding of
|
||||
// -experimental-skip-*-function-bodies to SIL.
|
||||
Opts.SkipFunctionBodies = TCOpts.SkipFunctionBodies;
|
||||
|
||||
Reference in New Issue
Block a user