Skip to content

Commit

Permalink
Merge pull request #437 from tweag/fix-add-resource-share-dir
Browse files Browse the repository at this point in the history
Add clang resource share directory to search path
  • Loading branch information
mergify[bot] authored Oct 27, 2023
2 parents ff70910 + 5200c9b commit 3e21df2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions toolchains/cc/cc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ pkgs.runCommand "bazel-${cc.orignalName or cc.name}-toolchain"
| xargs -0 -r realpath -ms
}
CXX_BUILTIN_INCLUDE_DIRECTORIES=($({
if is_compiler_option_supported -print-resource-dir; then
resource_dir="$( $cc -print-resource-dir )"
if [ -d "$resource_dir/share" ]; then
echo "$resource_dir/share"
fi
fi
include_dirs_for c
include_dirs_for c++
if is_compiler_option_supported -fno-canonical-system-headers; then
Expand Down

0 comments on commit 3e21df2

Please sign in to comment.