distfile: pack the archives needed later in the build
...and point --experimental_distdir there, so that offline builds
are again possible out of the distribution archive.
Related #5175.
Fixes #5202.
To be cherry-picked for #5056.
Change-Id: I634296e9d83e4e18ed966b42f35acc63061259d9
PiperOrigin-RevId: 197866998
diff --git a/BUILD b/BUILD
index 3687a2e..2af8643 100644
--- a/BUILD
+++ b/BUILD
@@ -40,7 +40,7 @@
filegroup(
name = "workspace-file",
- srcs = [":WORKSPACE"],
+ srcs = [":WORKSPACE", ":distdir.bzl"],
visibility = [
"//src/test/shell/bazel:__subpackages__",
],
@@ -83,6 +83,7 @@
":bazel-srcs",
"//src:derived_java_srcs",
"//src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec:bootstrap_autocodec.tar",
+ "@additional_distfiles//:archives.tar",
],
outs = ["bazel-distfile.zip"],
cmd = "$(location :combine_distfiles) $@ $(SRCS)",
@@ -97,6 +98,7 @@
":bazel-srcs",
"//src:derived_java_srcs",
"//src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec:bootstrap_autocodec.tar",
+ "@additional_distfiles//:archives.tar",
],
outs = ["bazel-distfile.tar"],
cmd = "$(location :combine_distfiles_to_tar.sh) $@ $(SRCS)",