File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,6 @@ bool ArgsToFrontendOptionsConverter::convert(
8989 Opts.RemarkOnRebuildFromModuleInterface |=
9090 Args.hasArg (OPT_Rmodule_interface_rebuild);
9191
92- Opts.DisableInterfaceFileLock |= Args.hasArg (OPT_disable_interface_lockfile);
93-
9492 computePrintStatsOptions ();
9593 computeDebugTimeOptions ();
9694 computeTBDOptions ();
@@ -143,6 +141,15 @@ bool ArgsToFrontendOptionsConverter::convert(
143141 Opts.RequestedAction = determineRequestedAction (Args);
144142 }
145143
144+ if (Opts.RequestedAction == FrontendOptions::ActionType::CompileModuleFromInterface) {
145+ // The situations where we use this action, e.g. explicit module building and
146+ // generating prebuilt module cache, don't need synchronization. We should avoid
147+ // using lock files for them.
148+ Opts.DisableInterfaceFileLock = true ;
149+ } else {
150+ Opts.DisableInterfaceFileLock |= Args.hasArg (OPT_disable_interface_lockfile);
151+ }
152+
146153 if (Opts.RequestedAction == FrontendOptions::ActionType::Immediate &&
147154 Opts.InputsAndOutputs .hasPrimaryInputs ()) {
148155 Diags.diagnose (SourceLoc (), diag::error_immediate_mode_primary_file);
You can’t perform that action at this time.
0 commit comments