Split out Windows MOZ_OPTIMIZE_FLAGS based on compiler

RESOLVED FIXED in Firefox 61

Status

enhancement
RESOLVED FIXED
a year ago
5 months ago

People

(Reporter: dmajor, Assigned: froydnj)

Tracking

3 Branch
mozilla61
Dependency tree / graph

Firefox Tracking Flags

(firefox61 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

a year ago
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
Assignee

Comment 1

a year ago
Do we really want -O2 for clang-cl?  Why not -Os or -Oz, for consistency with what clang/gcc do?
Flags: needinfo?(dmajor)
Reporter

Comment 2

a year ago
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
Flags: needinfo?(dmajor)
Assignee

Comment 3

a year ago
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...
Attachment #8962483 - Flags: review?(core-build-config-reviews)
Attachment #8962483 - Flags: feedback?(dmajor)
Assignee

Updated

a year ago
Assignee: nobody → nfroyd
Reporter

Comment 4

a year ago
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+
Attachment #8962483 - Flags: review?(core-build-config-reviews) → review+

Comment 5

a year ago
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3619a41def16
use more aggressive optimization flags for clang-cl; r=chmanchester

Comment 6

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3619a41def16
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
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.
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.