mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Frontend: allow directory layout for Swift on non-Darwin platforms
Adjust the serialized module loader to allow directory layouts for the Swift module on non-Darwin targets, unifying the layout across all the platforms. It also eases cross-architecture and cross-platform development by having the same layout, which can enable more similar flag usage.
This commit is contained in:
@@ -137,10 +137,14 @@ static void updateRuntimeLibraryPaths(SearchPathOptions &SearchPathOpts,
|
||||
if (SearchPathOpts.SkipRuntimeLibraryImportPaths)
|
||||
return;
|
||||
|
||||
if (!Triple.isOSDarwin())
|
||||
llvm::sys::path::append(LibPath, swift::getMajorArchitectureName(Triple));
|
||||
SearchPathOpts.RuntimeLibraryImportPaths.push_back(std::string(LibPath.str()));
|
||||
|
||||
// This is compatibility for <=5.3
|
||||
if (!Triple.isOSDarwin()) {
|
||||
llvm::sys::path::append(LibPath, swift::getMajorArchitectureName(Triple));
|
||||
SearchPathOpts.RuntimeLibraryImportPaths.push_back(std::string(LibPath.str()));
|
||||
}
|
||||
|
||||
if (!SearchPathOpts.SDKPath.empty()) {
|
||||
if (tripleIsMacCatalystEnvironment(Triple)) {
|
||||
LibPath = SearchPathOpts.SDKPath;
|
||||
|
||||
Reference in New Issue
Block a user