Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ClangImporter] Drop the version from Clang's resource directory.
Background: Clang has a set of base headers distributed with the compiler that contain things like vector operations, stddef.h, and tgmath.h. Swift also needs these headers in order to import C and Objective-C (not really a surprise), so we symlink to them from lib/swift/clang/. When we build installable packages, we actually copy them in. Now the tricky part. Clang's headers are actually at a path like "include/clang/3.6.0/include/tgmath.h". That "3.6.0" is the Clang version, which allows multiple Clangs to be installed on a single system. Swift currently links to the top-level directory, but of course it's only guaranteed to work with a specific version of the Clang headers. So the version number here is always the version of Clang we use to build Swift. Rather than leave the (relatively meaningless) version number here, just make the symlink point at the "3.6.0" directory rather than the "clang" directory. This means Swift doesn't have to think about the version number here at all. rdar://problem/23223066
- Loading branch information