[Caching] CASFS need to include blocklist

There are blocklist items can affect code-generation, thus the
block-list needs to be included in the CASFS for compilation.

rdar://134593841
This commit is contained in:
Steven Wu
2024-08-26 11:47:50 -07:00
parent bbcc3054d7
commit fd6707e312
4 changed files with 70 additions and 10 deletions

View File

@@ -612,10 +612,11 @@ swift::dependencies::registerBackDeployLibraries(
}
void SwiftDependencyTracker::addCommonSearchPathDeps(
const SearchPathOptions &Opts) {
const CompilerInvocation &CI) {
auto &SearchPathOpts = CI.getSearchPathOptions();
// Add SDKSetting file.
SmallString<256> SDKSettingPath;
llvm::sys::path::append(SDKSettingPath, Opts.getSDKPath(),
llvm::sys::path::append(SDKSettingPath, SearchPathOpts.getSDKPath(),
"SDKSettings.json");
FS->status(SDKSettingPath);
@@ -624,7 +625,7 @@ void SwiftDependencyTracker::addCommonSearchPathDeps(
"arm64", "arm64e", "x86_64", "i386",
"armv7", "armv7s", "armv7k", "arm64_32"};
for (auto RuntimeLibPath : Opts.RuntimeLibraryPaths) {
for (auto RuntimeLibPath : SearchPathOpts.RuntimeLibraryPaths) {
std::error_code EC;
for (auto &Arch : AllSupportedArches) {
SmallString<256> LayoutFile(RuntimeLibPath);
@@ -634,8 +635,12 @@ void SwiftDependencyTracker::addCommonSearchPathDeps(
}
// Add VFSOverlay file.
for (auto &Overlay: Opts.VFSOverlayFiles)
for (auto &Overlay: SearchPathOpts.VFSOverlayFiles)
FS->status(Overlay);
// Add blocklist file.
for (auto &File: CI.getFrontendOptions().BlocklistConfigFilePaths)
FS->status(File);
}
void SwiftDependencyTracker::startTracking() {