Skip to content

Commit

Permalink
Skip debugInfoSize calculation on Darwin.
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Feb 13, 2025
1 parent 79a49ef commit 3781e81
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,12 @@ protected final void write(DebugContext context, Path outputFile) {
throw shouldNotReachHere(ex);
}
debugInfoSize = 0;
String debugIdentifier = OS.getCurrent() == OS.DARWIN ? "__debug" : ".debug";
for (Element e : objectFile.getElements()) {
String name = e.getName();
if (name.contains(debugIdentifier) && !name.startsWith(".rela")) {
debugInfoSize += e.getMemSize(objectFile.getDecisionsByElement());
if (!OS.DARWIN.isCurrent()) { // debug info not available on Darwin
for (Element e : objectFile.getElements()) {
String name = e.getName();
if (name.contains(".debug") && !name.startsWith(".rela")) {
debugInfoSize += e.getMemSize(objectFile.getDecisionsByElement());
}
}
}
if (NativeImageOptions.PrintImageElementSizes.getValue()) {
Expand Down

0 comments on commit 3781e81

Please sign in to comment.