New issue
Advanced search Search tips

Issue 626064 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocking:
issue 622889



Sign in to add a comment

Mac GN: Build flag differences in //v8

Project Member Reported by rsesek@chromium.org, Jul 6 2016

Issue description

In 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.

 
Cc: jochen@chromium.org
Owner: machenb...@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, 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

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
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
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).
Blockedon: 628560
Blockedon: -628560
Status: WontFix (was: Assigned)
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.
Project Member

Comment 8 by bugdroid1@chromium.org, 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