Skip to content

Commit

Permalink
Add the share directory to fix sanitized builds
Browse files Browse the repository at this point in the history
Referencing this issue on bazelbuild/bazel:

bazelbuild/bazel#10510

The output of `clang --print-resource-dir` needs to be used to determine
the share directory to be added to the include path. Since we can
predict the path, we don't need to run clang to figure it out, but we do
need to add it to cxx_builtin_include_directories.
  • Loading branch information
trevor-stripe committed Feb 3, 2021
1 parent ff9ded6 commit 0c3130d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions toolchain/cc_toolchain_config.bzl.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ def _impl(ctx):
cxx_builtin_include_directories = [
"%{toolchain_path_prefix}include/c++/v1",
"%{toolchain_path_prefix}lib/clang/%{llvm_version}/include",
"%{toolchain_path_prefix}/lib/clang/%{llvm_version}/share",
"%{toolchain_path_prefix}lib64/clang/%{llvm_version}/include",
]
if (ctx.attr.cpu == "k8"):
Expand Down

0 comments on commit 0c3130d

Please sign in to comment.