Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building ijar_cc_binary and singlejar_cc_bin without sandbox by removing dependency on @bazel_tools//tools/cpp:malloc #8954

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/test/shell/bazel/bazel_java_tools_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ EOF
}

function test_java_tools_singlejar_builds() {
if "$is_windows"; then
echo "Skipping test on Windows." && return
fi
local java_tools_rlocation=$(rlocation io_bazel/src/java_tools_${JAVA_TOOLS_JAVA_VERSION}.zip)
local java_tools_zip_file_url="file://${java_tools_rlocation}"
if "$is_windows"; then
Expand All @@ -209,9 +206,6 @@ EOF
}

function test_java_tools_ijar_builds() {
if "$is_windows"; then
echo "Skipping test on Windows." && return
fi
local java_tools_rlocation=$(rlocation io_bazel/src/java_tools_${JAVA_TOOLS_JAVA_VERSION}.zip)
local java_tools_zip_file_url="file://${java_tools_rlocation}"
if "$is_windows"; then
Expand Down
10 changes: 10 additions & 0 deletions tools/jdk/BUILD.java_tools
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,19 @@ filegroup(
}),
)

cc_library(
name = "malloc",
)

cc_binary(
name = "ijar_cc_binary",
srcs = [
"java_tools/ijar/classfile.cc",
"java_tools/ijar/ijar.cc",
],
# Remove dependency on @bazel_tools//tools/cpp:malloc, which avoid /Iexternal/tools being used
# in compiling actions.
malloc = ":malloc",
deps = [":zip"],
)

Expand Down Expand Up @@ -569,6 +576,9 @@ cc_binary(
"//conditions:default": [],
}),
linkstatic = 1,
# Remove dependency on @bazel_tools//tools/cpp:malloc, which avoid /Iexternal/tools being used
# in compiling actions.
malloc = ":malloc",
visibility = ["//visibility:public"],
deps = [
":options",
Expand Down