mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Besides saving some calls to stat(), this also causes problems when the user specifies a search path that Clang already adds by default, like $SDKROOT/Library/Frameworks/. Why? Because Swift adds its search paths after Clang has already configured its defaults, but Clang reconfigures its search paths from scratch when compiling a module to a PCM file to cache. This led to system search paths being found sooner in the primary Clang instance than in the PCM files, which in turn resulted in the PCM files being considered out of date. This isn't likely to affect people much in practice, but it's better to get right. (We ran into this during Doug's experiments in making /System/Library/PrivateFrameworks a default search path in Clang r313317; turns out that's problematic for other reasons as well.) rdar://problem/34664596
919 B
919 B