mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Use target triple for “universal” modules
When loading a module supporting multiple targets, the module loader now looks for a file named with a normalized version of the target triple first, and only falls back to the architecture name if the normalized triple is not found.
This commit is contained in:
@@ -74,6 +74,17 @@ namespace swift {
|
||||
///
|
||||
/// This is a stop-gap until full Triple support (ala Clang) exists within swiftc.
|
||||
StringRef getMajorArchitectureName(const llvm::Triple &triple);
|
||||
|
||||
/// Computes the normalized target triple used as the most preferred name for
|
||||
/// module loading.
|
||||
///
|
||||
/// For platforms with module stability, this canonicalizes architecture,
|
||||
/// vendor, and OS names, strips OS versions, and makes inferred environments
|
||||
/// explicit. For other platforms, it returns the unmodified triple.
|
||||
///
|
||||
/// The input triple should already be "normalized" in the sense that
|
||||
/// llvm::Triple::normalize() would not affect it.
|
||||
llvm::Triple getTargetSpecificModuleTriple(const llvm::Triple &triple);
|
||||
} // end namespace swift
|
||||
|
||||
#endif // SWIFT_BASIC_PLATFORM_H
|
||||
|
||||
Reference in New Issue
Block a user