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(
89
89
Opts.RemarkOnRebuildFromModuleInterface |=
90
90
Args.hasArg (OPT_Rmodule_interface_rebuild);
91
91
92
- Opts.DisableInterfaceFileLock |= Args.hasArg (OPT_disable_interface_lockfile);
93
-
94
92
computePrintStatsOptions ();
95
93
computeDebugTimeOptions ();
96
94
computeTBDOptions ();
@@ -143,6 +141,15 @@ bool ArgsToFrontendOptionsConverter::convert(
143
141
Opts.RequestedAction = determineRequestedAction (Args);
144
142
}
145
143
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
+
146
153
if (Opts.RequestedAction == FrontendOptions::ActionType::Immediate &&
147
154
Opts.InputsAndOutputs .hasPrimaryInputs ()) {
148
155
Diags.diagnose (SourceLoc (), diag::error_immediate_mode_primary_file);
You can’t perform that action at this time.
0 commit comments