Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Issue 10381032: ninja windows: fix mapping of optimization flags (Closed)

Created:
8 years, 7 months ago by scottmg
Modified:
8 years, 7 months ago
Reviewers:
Nico
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

ninja windows: fix mapping of optimization flags "FavorSizeOrSpeed" should map to Os/Ot. These were backwards. "Optimization" can also be set to Disabled/Size/Speed/Max which maps to Od/O1/O2/Ox. Seems a bit silly, but that's how VS exposes the compiler settings. Previously, Size/Speed here were incorrectly duplicating the Os/Ot setting rather than O1/O2. So, before we were basically doing some random set of optimizing flags. (I have no idea what the compiler actually attempts to do when you set O1+Ot or O2+Os. I guess it must be macro vs. micro level, but it's not very clear from the names. Chromium sets them consistently.) R=thakis@chromium.org BUG=126315 Committed: https://code.google.com/p/gyp/source/detail?r=1363

Patch Set 1 #

Patch Set 2 : fix Os/Ot map #

Total comments: 2

Patch Set 3 : neither test, and reorder #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -9 lines) Patch
M pylib/gyp/msvs_emulation.py View 1 1 chunk +3 lines, -2 lines 0 comments Download
M test/win/compiler-flags/optimizations.gyp View 1 2 4 chunks +33 lines, -3 lines 0 comments Download
M test/win/gyptest-cl-optimizations.py View 1 2 2 chunks +16 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
scottmg
8 years, 7 months ago (2012-05-06 19:54:54 UTC) #1
Nico
LGTM, thanks for looking into this :-) (ps: I note that this happened in the ...
8 years, 7 months ago (2012-05-06 20:16:47 UTC) #2
scottmg
8 years, 7 months ago (2012-05-07 00:58:04 UTC) #3
On 2012/05/06 20:16:47, Nico wrote:
> LGTM, thanks for looking into this :-)
> 
> (ps: I note that this happened in the one test file that doesn't compare
results
> with cl.exe)

Yeah :/ I looked at it a little, but with all the various flags it gets very
complex. Maybe if we only supported one Windows compiler version instead of 2-3
versions it'd be reasonable.

> 
>
https://chromiumcodereview.appspot.com/10381032/diff/3001/test/win/compiler-f...
> File test/win/compiler-flags/optimizations.gyp (right):
> 
>
https://chromiumcodereview.appspot.com/10381032/diff/3001/test/win/compiler-f...
> test/win/compiler-flags/optimizations.gyp:125: },
> nit: I read http://msdn.microsoft.com/en-us/library/aa652267%28v=vs.71%29.aspx
to
> review this; maybe there should be a test for '0' too. Not very important.

Done.

> 
>
https://chromiumcodereview.appspot.com/10381032/diff/3001/test/win/gyptest-cl...
> File test/win/gyptest-cl-optimizations.py (right):
> 
>
https://chromiumcodereview.appspot.com/10381032/diff/3001/test/win/gyptest-cl...
> test/win/gyptest-cl-optimizations.py:40: test.must_not_contain(ninja_file,
> '/Od')
> nit: Od, O1, O2, Ox (to match order above)

Done.

Powered by Google App Engine
This is Rietveld 408576698