mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add '-Fsystem' framework search option to indicate path for frameworks that should be treated as 'system'
This has the effect of propagating the search path to the clang importer as '-iframework'. It doesn't affect whether a swift module is treated as system or not, this can be done as follow-up enhancement.
This commit is contained in:
@@ -3511,12 +3511,15 @@ static int prepareForDump(const char *Main,
|
||||
if (!options::ResourceDir.empty()) {
|
||||
InitInvok.setRuntimeResourcePath(options::ResourceDir);
|
||||
}
|
||||
InitInvok.setFrameworkSearchPaths(options::FrameworkPaths);
|
||||
InitInvok.setImportSearchPaths(options::ModuleInputPaths);
|
||||
for (auto CCFrameworkPath : options::CCSystemFrameworkPaths) {
|
||||
InitInvok.getClangImporterOptions().ExtraArgs.push_back("-iframework");
|
||||
InitInvok.getClangImporterOptions().ExtraArgs.push_back(CCFrameworkPath);
|
||||
std::vector<SearchPathOptions::FrameworkSearchPath> FramePaths;
|
||||
for (const auto &path : options::FrameworkPaths) {
|
||||
FramePaths.push_back({path, /*isSystem=*/false});
|
||||
}
|
||||
for (const auto &path : options::CCSystemFrameworkPaths) {
|
||||
FramePaths.push_back({path, /*isSystem=*/true});
|
||||
}
|
||||
InitInvok.setFrameworkSearchPaths(FramePaths);
|
||||
InitInvok.setImportSearchPaths(options::ModuleInputPaths);
|
||||
|
||||
if (!options::ModuleList.empty()) {
|
||||
if (readFileLineByLine(options::ModuleList, Modules))
|
||||
|
||||
Reference in New Issue
Block a user