-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We would copy the Clang builtin headers by replicating one of Clang's targets (clang-resource-headers), poorly. Instead, build a -resource-dir argument implicitly on IWYU startup to point directly to the Clang headers. The path to the headers are computed by the Clang Driver, based on the Clang binary path, resolved by CMake. The recipe for getting the Clang binary path varies a bit between build modes: * In standalone mode, we can get it using get_property(... LOCATION) * In external-project mode, we can get it using <$TARGET_FILE> In external-project mode, the binary path points inside the build tree, so make sure we depend on the clang-resource-headers target there, so the headers are copied into the build tree before IWYU is built.
- Loading branch information
Showing
2 changed files
with
24 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters