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.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
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).
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.