File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
clang/lib/Tooling/DependencyScanning Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,19 @@ static bool shouldCacheStatFailures(StringRef Filename) {
204
204
StringRef Ext = llvm::sys::path::extension (Filename);
205
205
if (Ext.empty ())
206
206
return false ; // This may be the module cache directory.
207
+
208
+ // rdar://127079541
209
+ // With Swift, misconfigured Xcode projects currently may fail with
210
+ // negative 'stat' caching of `.framework` directories enabled,
211
+ // because they do not always explicitly specify their target
212
+ // dependencies and may be either getting lucky wih build timing, or
213
+ // compiling against wrong dependenceis a lot of the time: e.g. an
214
+ // SDK variant of a dependency module, instead of one in the
215
+ // project's own build directory. Temporarily disable negative
216
+ // 'stat' caching here until all such projects are fixed.
217
+ if (Ext == " .framework" )
218
+ return false ;
219
+
207
220
return true ;
208
221
}
209
222
Original file line number Diff line number Diff line change @@ -211,6 +211,19 @@ static bool shouldCacheStatFailures(StringRef Filename) {
211
211
StringRef Ext = llvm::sys::path::extension (Filename);
212
212
if (Ext.empty ())
213
213
return false ; // This may be the module cache directory.
214
+
215
+ // rdar://127079541
216
+ // With Swift, misconfigured Xcode projects currently may fail with
217
+ // negative 'stat' caching of `.framework` directories enabled,
218
+ // because they do not always explicitly specify their target
219
+ // dependencies and may be either getting lucky wih build timing, or
220
+ // compiling against wrong dependenceis a lot of the time: e.g. an
221
+ // SDK variant of a dependency module, instead of one in the
222
+ // project's own build directory. Temporarily disable negative
223
+ // 'stat' caching here until all such projects are fixed.
224
+ if (Ext == " .framework" )
225
+ return false ;
226
+
214
227
return true ;
215
228
}
216
229
You can’t perform that action at this time.
0 commit comments