aboutsummaryrefslogtreecommitdiffhomepage
path: root/BUILD
diff options
context:
space:
mode:
authorGravatar László Csomor <laszlocsomor@google.com>2017-08-11 10:28:36 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-08-11 12:56:56 +0200
commit0783b9e81328729353cfad7ec25391c03d7f772a (patch)
tree8c68cb2697f13359847814b1e4ecf8708ead37ea /BUILD
parent5f99fdab1485186292068d274411201e4fb9208f (diff)
Rewrite //:combine_distfiles.sh in Python
It can only pack to zip for now (packing to tar is not trivial and I haven't figured it out yet). This allows building //:bazel-distfile on Windows. Previously it was either timing out or taking so long that it was unbearable (over 10 minutes). I never waited long enough to see it build. The new Python version runs under just a few seconds. Change-Id: I3264eb7132dd58c581c4216e5bbab035a79d716d PiperOrigin-RevId: 164954162
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD15
1 files changed, 11 insertions, 4 deletions
diff --git a/BUILD b/BUILD
index e4064a44cb..3c506215c8 100644
--- a/BUILD
+++ b/BUILD
@@ -68,6 +68,13 @@ pkg_tar(
visibility = ["//:__subpackages__"],
)
+py_binary(
+ name = "combine_distfiles",
+ srcs = ["combine_distfiles.py"],
+ visibility = ["//visibility:private"],
+ deps = ["//src:create_embedded_tools_lib"],
+)
+
genrule(
name = "bazel-distfile",
srcs = [
@@ -75,8 +82,8 @@ genrule(
"//src:derived_java_srcs",
],
outs = ["bazel-distfile.zip"],
- cmd = "$(location :combine_distfiles.sh) $@ $(SRCS)",
- tools = ["combine_distfiles.sh"],
+ cmd = "$(location :combine_distfiles) $@ $(SRCS)",
+ tools = [":combine_distfiles"],
# Public but bazel-only visibility.
visibility = ["//:__subpackages__"],
)
@@ -88,8 +95,8 @@ genrule(
"//src:derived_java_srcs",
],
outs = ["bazel-distfile.tar"],
- cmd = "env USE_TAR=YES $(location :combine_distfiles.sh) $@ $(SRCS)",
- tools = ["combine_distfiles.sh"],
+ cmd = "$(location :combine_distfiles_to_tar.sh) $@ $(SRCS)",
+ tools = ["combine_distfiles_to_tar.sh"],
# Public but bazel-only visibility.
visibility = ["//:__subpackages__"],
)