This is an archive of the discontinued LLVM Phabricator instance.

Support -fno-omit-frame-pointer with -pg.
ClosedPublic

Authored by srhines on Sep 5 2018, 7:35 PM.

Details

Summary

Previously, any instance of -fomit-frame-pointer would make it such that
-pg was an invalid flag combination. If -fno-omit-frame-pointer is
passed later on the command line (such that it actually takes effect),
-pg should be allowed.

Diff Detail

Repository
rL LLVM

Event Timeline

srhines created this revision.Sep 5 2018, 7:35 PM

This was discovered in the Android build system (which passes -fomit-frame-pointer by default for ARM configurations. This leads to the inability to specify -pg, since there is no way to override the mere presence of -fomit-frame-pointer.

http://b/32510864 was the internal bug request, so I am noting it here for future reference, but I think that the patch itself is pretty self-explanatory (rather than filing a distinct upstream bug about this issue).

nickdesaulniers accepted this revision.Sep 6 2018, 9:45 AM
This revision is now accepted and ready to land.Sep 6 2018, 9:45 AM

What is the call generated with -pg for AMR32, gnu_mcount_nc or _mount? gnu_mcount_nc with "-pg" is known to be broken ( https://bugs.llvm.org/show_bug.cgi?id=33845)

What is the call generated with -pg for AMR32, gnu_mcount_nc or _mount? gnu_mcount_nc with "-pg" is known to be broken ( https://bugs.llvm.org/show_bug.cgi?id=33845)

I CCed myself on that issue as we are trying to do a better job of supporting code coverage, but I don't think this bug is relevant for this patch.

Unless there are any additional reviews, I will likely submit this patch in a few hours.

What is the call generated with -pg for AMR32, gnu_mcount_nc or _mount? gnu_mcount_nc with "-pg" is known to be broken ( https://bugs.llvm.org/show_bug.cgi?id=33845)

I CCed myself on that issue as we are trying to do a better job of supporting code coverage, but I don't think this bug is relevant for this patch.

Unless there are any additional reviews, I will likely submit this patch in a few hours.

Yes, Submitting this patch is totally fine, I just wanted to warn you about the potential issue you may run into with "-pg" and ARM32.

This revision was automatically updated to reflect the committed changes.