Mac GN: Build flag differences in //v8 |
|||
Issue descriptionIn comparing the Mac GN and Mac GYP builds, I found the following differences in compilation flags: Missing in GN compared to GYP: -fstrict-aliasing It looks like this is turned on by the compiler at a certain -O level, but GYP explicitly set this for all optimization levels. If these differences are non-material to your project, you can close this as WontFix. Otherwise, please adjust the flags in BUILD.gn.
,
Jul 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/c70dc6acd7d3a7319277edd41740ce0e5926ad8d commit c70dc6acd7d3a7319277edd41740ce0e5926ad8d Author: machenbach <machenbach@chromium.org> Date: Tue Jul 12 13:20:56 2016 [gn] Add file needed for gn on mac to run BUG= chromium:474921 , chromium:626064 Review-Url: https://codereview.chromium.org/2134223003 Cr-Commit-Position: refs/heads/master@{#37679} [add] https://crrev.com/c70dc6acd7d3a7319277edd41740ce0e5926ad8d/build_overrides/build.gni
,
Jul 12 2016
Using a fake gn-step on v8 stand-alone, the build flag comparison looks like this (e.g. for mac64 debug): https://build.chromium.org/p/client.v8/builders/V8%20Mac64%20-%20debug/builds/8443/steps/compare%20build%20flags%20%28fyi%29/logs/stdio Relevant things: dash_f differ: In gyp, but not in GN: -fstrict-aliasing In GN, but not in gyp: -fstack-protector-strong other differ: In gyp, but not in GN: -O3 In GN, but not in gyp: -O2
,
Jul 14 2016
Updates: The -O2/-O3 difference seems to be fixed now. Another difference is (on v8 sources):
defines differ:
In gyp, but not in GN:
-DENABLE_GDB_JIT_INTERFACE
-DV8_IMMINENT_DEPRECATION_WARNINGS
,
Jul 15 2016
It looks like in gyp, for v8 objects on mac we passed -fno-strict-aliasing _and_ -fstrict-aliasing. I'm hesitating to remove -fno-strict-aliasing for v8 as this might change behavior. I suggest we keep the chromium wide default -fno-strict-aliasing without separate -fstrict-aliasing for subprojects and submit a bug for analyzing if 1) -fstrict-aliasing gives a performance improvement for v8 and 2) -fstrict-aliasing doesn't expose any undefined behavior in v8 code. If 1) is a "no" then we shouldn't waste time on 2).
,
Jul 15 2016
,
Jul 15 2016
As a result of the analysis in issue 628560 we can close this, because strict-aliasing was off on mac, as also no-strict-aliasing was passed as the last flag. Other mentioned differences are v8-standalone-only and don't block chromium's gn migration. Issue 628560 will analyze further if we might be able to switch on strict-aliasing in the future.
,
Jul 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/911ff2672e68285f39887cee18fece46145d87c9 commit 911ff2672e68285f39887cee18fece46145d87c9 Author: machenbach <machenbach@chromium.org> Date: Fri Jul 15 14:40:51 2016 [gn] Set correct defaults for some gn args This sets default values for v8_enable_gdbjit and v8_imminent_deprecation_warnings, while allowing to override them as gn args. Without this patch the project-specific overrides have no effect. BUG= chromium:474921 , chromium:626064 Review-Url: https://codereview.chromium.org/2153753002 Cr-Commit-Position: refs/heads/master@{#37797} [modify] https://crrev.com/911ff2672e68285f39887cee18fece46145d87c9/BUILD.gn [modify] https://crrev.com/911ff2672e68285f39887cee18fece46145d87c9/build_overrides/v8.gni |
|||
►
Sign in to add a comment |
|||
Comment 1 by hablich@chromium.org
, Jul 11 2016Owner: machenb...@chromium.org
Status: Assigned (was: Untriaged)