Enable 'StopOptimizationAfterSerialization' SIL Option for explicit

'-compile-module-from-interface' tasks
This commit is contained in:
Artem Chikin
2023-08-17 13:47:21 -07:00
parent 48695c6e51
commit e6361aee0e
2 changed files with 24 additions and 1 deletions

View File

@@ -1941,7 +1941,8 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
// If we're only emitting a module, stop optimizations once we've serialized
// the SIL for the module.
if (FEOpts.RequestedAction == FrontendOptions::ActionType::EmitModuleOnly)
if (FEOpts.RequestedAction == FrontendOptions::ActionType::EmitModuleOnly ||
FEOpts.RequestedAction == FrontendOptions::ActionType::CompileModuleFromInterface)
Opts.StopOptimizationAfterSerialization = true;
// Propagate the typechecker's understanding of