Closed Bug 1448978 Opened 2 years ago Closed 2 years ago
Split out Windows MOZ
_OPTIMIZE _FLAGS based on compiler
In my local clang-cl builds I just stomp over MOZ_OPTIMIZE_FLAGS. It would be cleaner if old-configure.in would say something like: if <clang-cl> MOZ_OPTIMIZE_FLAGS="-O2" else MOZ_OPTIMIZE_FLAGS="-O1 -Oi" endif
Do we really want -O2 for clang-cl? Why not -Os or -Oz, for consistency with what clang/gcc do?
Unless someone can show me better numbers, -O2 seems to be our only hope of even coming close to MSVC speed: bug 1443590 comment 8
We want to use clang-cl to ship Firefox, and the only way we can come close to MSVC numbers is to use -O2 here, for better or worse. dmajor, I see in bug 1443590 comment 8 that "binary sizes are much larger than MSVC's"; is that with using -O2 or some other settings? We'll probably need to push harder on that before we get to something shippable...
Comment on attachment 8962483 [details] [diff] [review] use more aggressive optimization flags for clang-cl Yes, this increases code size in order to get us better speed. And ThinLTO makes it a lot worse still. And yes, it will be a major factor to consider before shipping this.
Attachment #8962483 - Flags: feedback?(dmajor) → feedback+
2 years ago
Attachment #8962483 - Flags: review?(core-build-config-reviews) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/3619a41def16 use more aggressive optimization flags for clang-cl; r=chmanchester
FWIW I have a patch sitting here to move MOZ_OPTIMIZE_FLAGS into moz.configure, but I got hung up on the fact that js/src uses different defaults.
You need to log in before you can comment on or make changes to this bug.