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:
@@ -996,8 +996,10 @@ ModuleFile::ModuleFile(
|
||||
}
|
||||
case input_block::SEARCH_PATH: {
|
||||
bool isFramework;
|
||||
input_block::SearchPathLayout::readRecord(scratch, isFramework);
|
||||
SearchPaths.push_back({blobData, isFramework});
|
||||
bool isSystem;
|
||||
input_block::SearchPathLayout::readRecord(scratch, isFramework,
|
||||
isSystem);
|
||||
SearchPaths.push_back({blobData, isFramework, isSystem});
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1187,8 +1189,9 @@ Status ModuleFile::associateWithFileContext(FileUnit *file,
|
||||
return error(Status::TargetTooNew);
|
||||
}
|
||||
|
||||
for (const auto &searchPathPair : SearchPaths)
|
||||
ctx.addSearchPath(searchPathPair.first, searchPathPair.second);
|
||||
for (const auto &searchPath : SearchPaths)
|
||||
ctx.addSearchPath(searchPath.Path, searchPath.IsFramework,
|
||||
searchPath.IsSystem);
|
||||
|
||||
auto clangImporter = static_cast<ClangImporter *>(ctx.getClangModuleLoader());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user