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 @@ -102,8 +102,6 @@ bool ArgsToFrontendOptionsConverter::convert(
102102 Opts.RemarkOnRebuildFromModuleInterface |=
103103 Args.hasArg (OPT_Rmodule_interface_rebuild);
104104
105- Opts.DisableInterfaceFileLock |= Args.hasArg (OPT_disable_interface_lockfile);
106-
107105 computePrintStatsOptions ();
108106 computeDebugTimeOptions ();
109107 computeTBDOptions ();
@@ -149,6 +147,15 @@ bool ArgsToFrontendOptionsConverter::convert(
149147 Opts.RequestedAction = determineRequestedAction (Args);
150148 }
151149
150+ if (Opts.RequestedAction == FrontendOptions::ActionType::CompileModuleFromInterface) {
151+ // The situations where we use this action, e.g. explicit module building and
152+ // generating prebuilt module cache, don't need synchronization. We should avoid
153+ // using lock files for them.
154+ Opts.DisableInterfaceFileLock = true ;
155+ } else {
156+ Opts.DisableInterfaceFileLock |= Args.hasArg (OPT_disable_interface_lockfile);
157+ }
158+
152159 if (Opts.RequestedAction == FrontendOptions::ActionType::Immediate &&
153160 Opts.InputsAndOutputs .hasPrimaryInputs ()) {
154161 Diags.diagnose (SourceLoc (), diag::error_immediate_mode_primary_file);
You can’t perform that action at this time.
0 commit comments