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(
102
102
Opts.RemarkOnRebuildFromModuleInterface |=
103
103
Args.hasArg (OPT_Rmodule_interface_rebuild);
104
104
105
- Opts.DisableInterfaceFileLock |= Args.hasArg (OPT_disable_interface_lockfile);
106
-
107
105
computePrintStatsOptions ();
108
106
computeDebugTimeOptions ();
109
107
computeTBDOptions ();
@@ -149,6 +147,15 @@ bool ArgsToFrontendOptionsConverter::convert(
149
147
Opts.RequestedAction = determineRequestedAction (Args);
150
148
}
151
149
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
+
152
159
if (Opts.RequestedAction == FrontendOptions::ActionType::Immediate &&
153
160
Opts.InputsAndOutputs .hasPrimaryInputs ()) {
154
161
Diags.diagnose (SourceLoc (), diag::error_immediate_mode_primary_file);
You can’t perform that action at this time.
0 commit comments