Add java agent and socket library to the minimal JDK.
This is necessary to make --host_jvm_debug work again.
Note, that this is only the first half of the fix for #7118, the second is to
update the hashes after we built the new minimal JDK on buildkite.
RELNOTES: None
Closes #7141.
PiperOrigin-RevId: 229539020
diff --git a/src/minimize_jdk.sh b/src/minimize_jdk.sh
index 7408b8b..bc7f182 100755
--- a/src/minimize_jdk.sh
+++ b/src/minimize_jdk.sh
@@ -35,6 +35,8 @@
--output reduced
cp DISCLAIMER readme.txt legal/java.base/ASSEMBLY_EXCEPTION \
reduced/
+ # These are necessary for --host_jvm_debug to work.
+ cp bin/dt_socket.dll bin/jdwp.dll reduced/bin
zip -r -9 ../reduced.zip reduced/
cd ..
mv reduced.zip "$out"
@@ -46,6 +48,12 @@
--output reduced
cp DISCLAIMER readme.txt legal/java.base/ASSEMBLY_EXCEPTION \
reduced/
+ # These are necessary for --host_jvm_debug to work.
+ if [[ "$UNAME" =~ darwin ]]; then
+ cp lib/libdt_socket.dylib lib/libjdwp.dylib reduced/lib
+ else
+ cp lib/libdt_socket.so lib/libjdwp.so reduced/lib
+ fi
GZIP=-9 tar -zcf ../reduced.tgz reduced
cd ..
mv reduced.tgz "$out"