Fix building ijar_cc_binary and singlejar_cc_bin without sandbox by removing dependency on @bazel_tools//tools/cpp:malloc #8954
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As @laszlocsomor explained, building
ijar_cc_binary
andsinglejar_cc_bin
on Windows (where sandbox is not available yet) will have header conflict due to the same headers are shipped in both @bazel_tools and @local_java_tools.ijar_cc_binary
andsinglejar_cc_bin
only declare headers in @local_java_tools as dependency, but it will searchexternal/bazel_tools
first because every cc targets depend on@bazel_tools//tools/cpp:malloc
implicitly.This change remove the dependency on
@bazel_tools//tools/cpp:malloc
to avoid this confusion.@lberki I believe cc targets depending on
@bazel_tools//tools/cpp:malloc
is a behavior that exists for a long time, is it still necessary? Looks like it's leaking/Iexternal/tools
to all cc compilation and causing some header conflicts in non-sandboxed build. This is not the first time I've seen such error.FYI @oquenchil
This change replaces #8945 and we no longer have to do a patch release for Bazel, just a new release for the java tools.