Skip to content

Commit

Permalink
Singlejar: fix bad use of $(JAVA) and $(locations)
Browse files Browse the repository at this point in the history
I introduced these problems while editing the
Google-internal copy of #6248
that was later pushed as 68611b3.

See #2241

Change-Id: Icd981a0fcdcd451a00cbb2babd107f7abb4d5170

Closes #6404.

Change-Id: I33cc9c5890ec5236e7964846c158628c947c715d
PiperOrigin-RevId: 217304415
  • Loading branch information
laszlocsomor authored and Copybara-Service committed Oct 16, 2018
1 parent 3893f13 commit 8177f5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/tools/singlejar/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ cc_test(
cc_test(
name = "desugar_checking_test",
srcs = [
"combiners_test.cc",
"desugar_checking_test.cc",
":zip_headers",
":zlib_interface",
],
Expand Down Expand Up @@ -144,9 +144,7 @@ cc_test(
"input_jar_scan_entries_test.h",
"input_jar_scan_jartool_test.cc",
],
# TODO(@rongjiecomputer): update copts to handle Windows and add
# ".exe" extension.
copts = ["-DJAR_TOOL_PATH=$(JAVA)/bin/jar"],
copts = ["-DJAR_TOOL_PATH=\\\"$(JAVABASE)/bin/jar\\\""],
data = ["@bazel_tools//tools/jdk:current_java_runtime"],
# Timing out, see https://github.com/bazelbuild/bazel/issues/1555
tags = ["manual"],
Expand Down Expand Up @@ -218,7 +216,7 @@ cc_test(
],
# TODO(@rongjiecomputer): update copts to handle Windows and add
# ".exe" extension.
copts = ["-DJAR_TOOL_PATH=$(JAVA)/bin/jar"],
copts = ["-DJAR_TOOL_PATH=\\\"$(JAVABASE)/bin/jar\\\""],
data = [
":data1",
":data2",
Expand Down Expand Up @@ -487,7 +485,7 @@ genrule(
"@bazel_tools//tools/jdk:current_java_runtime",
],
outs = ["stored.jar"],
cmd = "$(location @bazel_tools//tools/jdk:current_java_runtime) -0cf \"$@\" $(location :output_jar.cc)",
cmd = "$(JAVABASE)/bin/jar -0cf \"$@\" $(location :output_jar.cc)",
toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = ["@bazel_tools//tools/jdk:current_java_runtime"],
)
1 change: 1 addition & 0 deletions tools/cpp/runfiles/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ cc_library(
# "tools/cpp/runfiles_src.h"
cc_library(
name = "runfiles_src_for_singlejar_only",
testonly = 1,
visibility = ["//src/tools/singlejar:__pkg__"],
deps = [":runfiles"],
)
Expand Down

0 comments on commit 8177f5c

Please sign in to comment.