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

Add s390x and make zip -d step more resilient #10798

Closed
wants to merge 2 commits into from
Closed
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
14 changes: 10 additions & 4 deletions third_party/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,14 @@ UNNECESSARY_DYNAMIC_LIBRARIES = select({
"//src/conditions:arm": "*.so *.jnilib *.dll",
"//src/conditions:linux_aarch64": "*.so *.jnilib *.dll",
"//src/conditions:linux_ppc": "*.so *.jnilib *.dll",
"//src/conditions:linux_s390x": "*.so *.jnilib *.dll",
"//src/conditions:freebsd": "*.so *.jnilib *.dll",
"//src/conditions:openbsd": "*.so *.jnilib *.dll",
# Play it safe -- better have a big binary than a slow binary
# zip -d does require an argument. Supply something bogus.
"//conditions:default": "*.bogusextension",
# Default is to play it safe -- better have a big binary than a slow binary
# The empty string means nothing is to be removed from the library;
# the rule command tests for the empty string explictly to avoid
# zip erroring when it finds nothing to remove.
"//conditions:default": "",
})

# Remove native libraries that are for a platform different from the one we are
Expand All @@ -482,7 +485,10 @@ genrule(
name = "filter_netty_dynamic_libs",
srcs = ["netty_tcnative/netty-tcnative-boringssl-static-2.0.24.Final.jar"],
outs = ["netty_tcnative/netty-tcnative-filtered.jar"],
cmd = "cp $< $@ && zip -qd $@ " + UNNECESSARY_DYNAMIC_LIBRARIES,
cmd = "cp $< $@ && " +
# End successfully if there is nothing to be deleted from the archive
"if [ -n '" + UNNECESSARY_DYNAMIC_LIBRARIES + "' ]; then " +
"zip -qd $@ " + UNNECESSARY_DYNAMIC_LIBRARIES + "; fi",
)

java_import(
Expand Down