mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #78303 from ian-twilightcoder/clang-importer-search-paths
[ClangImporter] clang's -iframework comes before builtin usr/local/include, but Swift's -Fsystem comes after
This commit is contained in:
@@ -2475,7 +2475,7 @@ public:
|
||||
if (!ResourceDir.empty()) {
|
||||
InitInvoke.setRuntimeResourcePath(ResourceDir);
|
||||
}
|
||||
std::vector<SearchPathOptions::FrameworkSearchPath> FramePaths;
|
||||
std::vector<SearchPathOptions::SearchPath> FramePaths;
|
||||
for (const auto &path : CCSystemFrameworkPaths) {
|
||||
FramePaths.push_back({path, /*isSystem=*/true});
|
||||
}
|
||||
@@ -2483,12 +2483,20 @@ public:
|
||||
for (const auto &path : BaselineFrameworkPaths) {
|
||||
FramePaths.push_back({path, /*isSystem=*/false});
|
||||
}
|
||||
InitInvoke.setImportSearchPaths(BaselineModuleInputPaths);
|
||||
std::vector<SearchPathOptions::SearchPath> ImportPaths;
|
||||
for (const auto &path : BaselineModuleInputPaths) {
|
||||
ImportPaths.push_back({path, /*isSystem=*/false});
|
||||
}
|
||||
InitInvoke.setImportSearchPaths(ImportPaths);
|
||||
} else {
|
||||
for (const auto &path : FrameworkPaths) {
|
||||
FramePaths.push_back({path, /*isSystem=*/false});
|
||||
}
|
||||
InitInvoke.setImportSearchPaths(ModuleInputPaths);
|
||||
std::vector<SearchPathOptions::SearchPath> ImportPaths;
|
||||
for (const auto &path : ModuleInputPaths) {
|
||||
ImportPaths.push_back({path, /*isSystem=*/false});
|
||||
}
|
||||
InitInvoke.setImportSearchPaths(ImportPaths);
|
||||
}
|
||||
InitInvoke.setFrameworkSearchPaths(FramePaths);
|
||||
if (!ModuleList.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user