From 7b443a3462be365f8e3159ba026a6a2d630d06b9 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Tue, 23 Jul 2024 09:00:39 +0200 Subject: [PATCH] Use bootclasspath jar in proguard genrule Previously, proguard may attempt to access the Java runtime jmods, which aren't declared as inputs. --- third_party/BUILD | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/third_party/BUILD b/third_party/BUILD index e6066647eacd3e..0f003c05d0a3b5 100644 --- a/third_party/BUILD +++ b/third_party/BUILD @@ -308,13 +308,14 @@ genrule( name = "fastutil_stripped_jar", srcs = [ "@maven//:it_unimi_dsi_fastutil_file", + "@rules_java//toolchains:platformclasspath", ], outs = ["fastutil-stripped.jar"], cmd = """ $(location :proguard) \ - -injars $< \ + -injars $(execpath @maven//:it_unimi_dsi_fastutil_file) \ -outjars $@ \ - -libraryjars '/jmods/java.base.jmod(!**.jar;!module-info.class)' \ + -libraryjars $(execpath @rules_java//toolchains:platformclasspath) \ @$(location //tools:fastutil.proguard) \ | tail -n +2 # Skip the "ProGuard, version X" line # Null out the file times stored in the jar to make the output reproducible.