From 00e18bea1b1a3ab82cfb0771a397ca366b5d6313 Mon Sep 17 00:00:00 2001 From: Vojin Jovanovic Date: Mon, 28 Apr 2025 16:05:23 +0200 Subject: [PATCH] Enable RemoveUnusedSymbols on darwin --- .../src/com/oracle/svm/core/SubstrateOptions.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateOptions.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateOptions.java index bf5c380a3d0b..03cd84231bd7 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateOptions.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateOptions.java @@ -934,12 +934,8 @@ public static boolean useLIRBackend() { return "lir".equals(CompilerBackend.getValue()); } - /* - * RemoveUnusedSymbols is not enabled on Darwin by default, because the linker sometimes - * segfaults when the -dead_strip option is used. - */ @Option(help = "Use linker option to prevent unreferenced symbols in image.")// - public static final HostedOptionKey RemoveUnusedSymbols = new HostedOptionKey<>(OS.getCurrent() != OS.DARWIN); + public static final HostedOptionKey RemoveUnusedSymbols = new HostedOptionKey<>(true); @Option(help = "Use linker option to remove all local symbols from image.")// public static final HostedOptionKey DeleteLocalSymbols = new HostedOptionKey<>(true); @Option(help = "Compatibility option to make symbols used for the image heap global. " +