Skip to content

Commit

Permalink
Only allow RemoveUnusedSymbols enabled per default on Platform.LINUX
Browse files Browse the repository at this point in the history
  • Loading branch information
olpaw committed Oct 25, 2019
1 parent 0622968 commit 4691739
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ private static boolean removeUnusedSymbols() {
if (SubstrateOptions.RemoveUnusedSymbols.hasBeenSet()) {
return SubstrateOptions.RemoveUnusedSymbols.getValue();
}
return Platform.includedIn(InternalPlatform.PLATFORM_JNI.class);
/*
* The Darwin linker sometimes segfaults when option -dead_strip is used. Thus, Linux is the
* only platform were RemoveUnusedSymbols can be safely enabled per default.
*/
return Platform.includedIn(Platform.LINUX.class);
}

class BinutilsCCLinkerInvocation extends CCLinkerInvocation {
Expand Down

0 comments on commit 4691739

Please sign in to comment.