Skip to content

Commit

Permalink
Remove pkg_tar targets for build Java tools tar gz
Browse files Browse the repository at this point in the history
Partial commit of third_party/*. See #7708.

Signed-off-by: iirina <elenairina@google.com>
  • Loading branch information
iirina committed Mar 19, 2019
1 parent bb9dae1 commit 707fbb6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 40 deletions.
58 changes: 19 additions & 39 deletions third_party/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -622,49 +622,29 @@ filegroup(
],
)

# Part of the Java tools remote archive. Not embedded or used in Bazel.
pkg_tar(
name = "zlib_pkg",
srcs = ["//third_party/zlib:embedded_tools"],
extension = "tar.gz",
mode = "755",
# Create a new pkg_tar to preserve the directory structure (zlib/).
package_dir = "zlib",
)

# Part of the Java tools remote archive. Not embedded or used in Bazel.
pkg_tar(
name = "ijar_pkg",
srcs = [
"//third_party/ijar",
"//third_party/ijar:embed_into_java_tools",
"//third_party/ijar:zipper",
],
extension = "tar.gz",
mode = "755",
# Create a new pkg_tar to preserve the directory structure (ijar/).
package_dir = "ijar",
)

# Builds the remote Java tools archive. Not embedded or used in Bazel, but used
# by the Java tools release process.
pkg_tar(
name = "java_tools_pkg-gz",
genrule(
name = "java_tools_zip",
srcs = [
"//third_party/java/java_tools",
"//third_party/java/jdk/langtools:java_compiler_jar",
"//third_party/java/jdk/langtools:javac_jar",
"//third_party/java/jdk/langtools:jdk_compiler_jar",
],
extension = "tar.gz",
mode = "755",
package_dir = "java_tools",
# Pass these as dependencies rather than srcs to preserve their directory
# structures and avoid packaging all the files under the same directory.
deps = [
":zlib_pkg",
"//third_party/ijar:ijar_with_deps_archive",
"//third_party/ijar:ijar_with_deps_zip",
"//third_party/java/java_tools:java_tools_zip",
":zlib_zip",
],
outs = ["java_tools.zip"],
cmd = "$(location //src:merge_zip_files) java_tools $@ $(SRCS)",
output_to_bindir = 1,
tools = ["//src:merge_zip_files"],
)

# Part of the Java tools remote archive. Not embedded or used in Bazel.
genrule(
name = "zlib_zip",
srcs = ["//third_party/zlib:embedded_tools"],
outs = ["zlib.zip"],
cmd = "$(location //src:zip_files) zlib $@ $(SRCS)",
tools = ["//src:zip_files"],
visibility = ["//visibility:private"],
)

load(":compiler_config_setting.bzl", "create_compiler_config_setting")
Expand Down
13 changes: 13 additions & 0 deletions third_party/java/java_tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,16 @@ filegroup(
"//conditions:default": [],
}),
)

genrule(
name = "java_tools_zip",
srcs = [
":java_tools",
"//third_party/java/jdk/langtools:java_compiler_jar",
"//third_party/java/jdk/langtools:javac_jar",
"//third_party/java/jdk/langtools:jdk_compiler_jar",
],
outs = ["java_tools.zip"],
cmd = "zip -q -j $@ $$(echo $(SRCS) | sort)",
visibility = ["//third_party:__pkg__"],
)
5 changes: 4 additions & 1 deletion third_party/zlib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ cc_library(
srcs = glob(["*.c"]),
hdrs = glob(["*.h"]),
# Use -Dverbose=-1 to turn off zlib's trace logging. (#3280)
copts = ["-w", "-Dverbose=-1"],
copts = [
"-w",
"-Dverbose=-1",
],
includes = ["."],
visibility = ["//visibility:public"],
)

0 comments on commit 707fbb6

Please sign in to comment.