mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ModuleInterface: sanitize arch when interface file name and encoded flags disagree
It's a known issue that we are using arm64e interfaces contents for the arm64 target, meaning the encoded module flags are specifying -target arm64e-x-x instead of -target arm64-x-x. Fortunately, we can tell the target arch from the interface file name, so we could sanitize the target to use by inferring arch from the file name.
This commit is contained in:
@@ -1346,7 +1346,7 @@ bool InterfaceSubContextDelegateImpl::extractSwiftInterfaceVersionAndArgs(
|
||||
diag::error_extracting_version_from_module_interface);
|
||||
return true;
|
||||
}
|
||||
if (extractCompilerFlagsFromInterface(SB, ArgSaver, SubArgs)) {
|
||||
if (extractCompilerFlagsFromInterface(interfacePath, SB, ArgSaver, SubArgs)) {
|
||||
diagnose(interfacePath, diagnosticLoc,
|
||||
diag::error_extracting_version_from_module_interface);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user