external/bazel_tools
is a header search directory for all cc compile actions
#8955
Labels
P2
We'll consider working on this in future. (Assignee optional)
team-Rules-CPP
Issues for C++ rules
type: bug
By default, every cc_library and cc_binary depends on
@bazel_tools//tools/cpp:malloc
, this is causing every cc compilation to haveexternal/bazel_tools
as a header search directory. In non-sandboxed build, the compiler will always see headers fromexternal/bazel_tools
first. If you have the same header path (eg.src/main/cpp/util/file.h
) in other directory, it will be ignored and the code will be compiled against the wrong header and fail with a header check error.@oquenchil @hlopko
Related issue #8614 #8954
The text was updated successfully, but these errors were encountered: