mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[embedded] Detect WMO via .hasPrimaryInputs() instead of -wmo flag presense
This commit is contained in:
@@ -1327,6 +1327,11 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
Diags.diagnose(SourceLoc(), diag::evolution_with_embedded);
|
||||
HadError = true;
|
||||
}
|
||||
|
||||
if (FrontendOpts.InputsAndOutputs.hasPrimaryInputs()) {
|
||||
Diags.diagnose(SourceLoc(), diag::wmo_with_embedded);
|
||||
HadError = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (auto A = Args.getLastArg(OPT_checked_async_objc_bridging)) {
|
||||
@@ -1344,15 +1349,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
}
|
||||
}
|
||||
|
||||
// Is this the correct way to query for WMO?
|
||||
bool isWMO =
|
||||
Args.hasArg(OPT_wmo) ||
|
||||
Args.hasArg(OPT_whole_module_optimization);
|
||||
if (!isWMO && Opts.hasFeature(Feature::Embedded)) {
|
||||
Diags.diagnose(SourceLoc(), diag::wmo_with_embedded);
|
||||
HadError = true;
|
||||
}
|
||||
|
||||
return HadError || UnsupportedOS || UnsupportedArch;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user