New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 625353 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Chrome
Pri: 2
Type: Bug

Blocked on:
issue 629825

Blocking:
issue 621581



Sign in to add a comment

Rework v8_target_cpu handling

Project Member Reported by dpranke@chromium.org, Jul 2 2016

Issue description

Currently the way v8_target_cpu and target_cpu interact is crufty and doesn't work properly in the "hybrid" configuration on the LKGR builders where we want x86 target_cpu + arm v8_target_cpu, and it won't work well with fat binary builds for monochrome.

This needs to all be cleaned up.

Some design notes are captured in 

https://docs.google.com/document/d/1xtYnqcVayBeYgqSUuPJasGEnOCmQq0yQrNVLgBpd6d4/edit

(google-only doc, sorry)

but the results will be documented here and in the accompanying CLs.


 
Labels: -Pri-3 Pri-2
Work in progress CLs:

https://codereview.chromium.org/2116183002 (chromium/build-side)
https://codereview.chromium.org/2116913002 (v8-side)

I'm still playing around with these a lot; I think they're getting close to working and doing the right thing, but this isn't going to be the final form and I'll probably want to post/land some clean up CLs first.
I've cleaned up the CLs listed in #1 and I think they're ready for review now.
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8a2de90db035b90a891f0b980ab6162fd3995499

commit 8a2de90db035b90a891f0b980ab6162fd3995499
Author: dpranke <dpranke@chromium.org>
Date: Thu Jul 14 20:08:37 2016

Land chromium-side work to clean up handling of v8_target_cpu in the GN build.

Currently v8_target_cpu can only be set to one particular architecture,
and that won't work for monochrome/webview builds where we need
to be able to build two different snapshots for two different architectures.

The way things are set are also confusing for when you need to do builds
for a target_cpu that is different from the host_cpu and the value of the
v8_target_cpu might get out of sync between target and host.

This change changes all that by making the cpu that v8 targets
a function of the current toolchain (thus declaring a v8_current_cpu
and using that instead).

R=brettw@chromium.org, jochen@chromium.org, michaelbai@chromium.org

BUG= 625353 

Review-Url: https://codereview.chromium.org/2116183002
Cr-Commit-Position: refs/heads/master@{#405551}

[modify] https://crrev.com/8a2de90db035b90a891f0b980ab6162fd3995499/BUILD.gn
[modify] https://crrev.com/8a2de90db035b90a891f0b980ab6162fd3995499/build/config/arm.gni
[modify] https://crrev.com/8a2de90db035b90a891f0b980ab6162fd3995499/build/config/mips.gni
[modify] https://crrev.com/8a2de90db035b90a891f0b980ab6162fd3995499/build/config/sanitizers/sanitizers.gni
[modify] https://crrev.com/8a2de90db035b90a891f0b980ab6162fd3995499/build/config/v8_target_cpu.gni
[modify] https://crrev.com/8a2de90db035b90a891f0b980ab6162fd3995499/build/toolchain/gcc_toolchain.gni
[modify] https://crrev.com/8a2de90db035b90a891f0b980ab6162fd3995499/build/toolchain/linux/BUILD.gn
[modify] https://crrev.com/8a2de90db035b90a891f0b980ab6162fd3995499/chrome/test/base/js2gtest.gni

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d3e00ac37e3722cc93d102164b23629e8cc6af31

commit d3e00ac37e3722cc93d102164b23629e8cc6af31
Author: dpranke <dpranke@chromium.org>
Date: Sat Jul 16 04:28:28 2016

Delete the v8_target_cpu/v8_current_cpu hack in the GN build.

This finishes the work in  bug 625353  to make
v8_target_cpu/v8_current_cpu work correctly across multiple
toolchains, by deleting the workaround that was needed to
get the changes to land across repos.

TBR=machenbach@chromium.org
BUG= 625353 

Review-Url: https://codereview.chromium.org/2157733002
Cr-Commit-Position: refs/heads/master@{#405933}

[modify] https://crrev.com/d3e00ac37e3722cc93d102164b23629e8cc6af31/build/toolchain/gcc_toolchain.gni

Status: Fixed (was: Started)
This should be complete now.
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/702414254eea4221cc4d36eb1ca4c1f9636699c1

commit 702414254eea4221cc4d36eb1ca4c1f9636699c1
Author: dpranke <dpranke@chromium.org>
Date: Mon Jul 18 22:03:11 2016

Re-land r405933 w/ fix for CrOS.

This CL re-lands r405933 and removes the hack that was needed while
rolling in the reworked v8_target_cpu code, but this adds the missing
line that was needed for CrOS to work correctly with their custom
toolchain.

TBR=machenbach@chromium.org, llozano@chromium.org
BUG=593461,  625353 

Review-Url: https://codereview.chromium.org/2158143002
Cr-Commit-Position: refs/heads/master@{#406115}

[modify] https://crrev.com/702414254eea4221cc4d36eb1ca4c1f9636699c1/build/toolchain/cros/BUILD.gn
[modify] https://crrev.com/702414254eea4221cc4d36eb1ca4c1f9636699c1/build/toolchain/gcc_toolchain.gni

Project Member

Comment 7 by bugdroid1@chromium.org, Jul 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fb1cadc07b5b8f97f1ef5ee9800a47ce6f6fe902

commit fb1cadc07b5b8f97f1ef5ee9800a47ce6f6fe902
Author: dpranke <dpranke@chromium.org>
Date: Tue Jul 19 01:54:15 2016

Fix the v8 snapshots in the GN mipsel, mips64el builds.

This also deletes references to gcc-based snapshot toolchains that
don't actually exist. Let's find out if they're actually needed anywhere ;).
The mips build was broken by the v8_target_cpu changes for 625353.

TBR=machenbach@chromium.org
BUG= 625353 ,  629057 

Review-Url: https://codereview.chromium.org/2159003002
Cr-Commit-Position: refs/heads/master@{#406174}

[modify] https://crrev.com/fb1cadc07b5b8f97f1ef5ee9800a47ce6f6fe902/build/config/v8_target_cpu.gni
[modify] https://crrev.com/fb1cadc07b5b8f97f1ef5ee9800a47ce6f6fe902/build/toolchain/linux/BUILD.gn

Blockedon: 629825
Attaching test cases in v8_snapshot_test.py; these should take priority over the examples listed in the docs in the description, in case there are conflicts.
v8_snapshot_test.py
4.7 KB View Download
Attaching test cases in v8_snapshot_test.py; these should take priority over the examples listed in the docs in the description, in case there are conflicts.
v8_snapshot_test.py
4.7 KB View Download

Sign in to add a comment