New issue
Advanced search Search tips

Issue 615039 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 332521



Sign in to add a comment

Different host x64 link flags for android target_cpu="arm" vs "x64"

Project Member Reported by agrieve@chromium.org, May 26 2016

Issue description

OS: Android

What steps will reproduce the problem?
gn gen --args='target_os="android" is_debug=false is_official_build=true is_chrome_branded=true target_cpu="x64"' out/Default
ninja -C out/Default clang_x64/bro

What is the expected output?
It should build

What do you see instead?
../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: /b/build/slave/official-x86_64/build/src/third_party/llvm-build/Release+Asserts/bin/../lib/LLVMgold.so: could not load plugin library: /b/build/slave/official-x86_64/build/src/third_party/llvm-build/Release+Asserts/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory


It looks like there are a few issues here:
1) The linker command has "-flto" for x64, but not for other arches. target_cpu for target_os="android" should not affect flags for host_toolchain.

2) The gold plugin is not present. Looks like for it to be downloaded still relies on GYP_DEFINES:
https://code.google.com/p/chromium/codesearch#chromium/src/tools/clang/scripts/update.py&q=download_gold_plugin&sq=package:chromium&dr=C&l=379

3) Why does this break when building "bro" but not for existing host binaries (md5sum, ijar, etc)

Please use labels and text to provide additional information.

 
Project Member

Comment 1 by bugdroid1@chromium.org, May 26 2016

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

commit 3ec265f1c1a76a6f5dfee6d860cf1a4b6e9ba79a
Author: agrieve <agrieve@chromium.org>
Date: Thu May 26 15:18:52 2016

Revert of Enable LTO on Linux for the official builds. (patchset #1 id:1 of https://codereview.chromium.org/2003733004/ )

Reason for revert:
Breaks android x64 builds.
https://bugs.chromium.org/p/chromium/issues/detail?id=615039

Original issue's description:
> Enable LTO on Linux for the official builds.
>
> This CL turns on Link-Time Optimization for official
> builds, which makes the resulting binaries to run faster.
>
> On the dark side, the change increases the link time by 3x-5x,
> and is also very memory-hungry. All official bots were
> upgraded to have 200+ GB RAM to handle LTO builds. Timeouts
> were also accordingly increased.
>
> This CL might cause timeouts / OOMs, if some slaves still
> have not enough RAM. Please, revert the CL with pointing
> out to the slaves / bots broken by this change.
>
> BUG= 453195 
>
> Committed: https://crrev.com/7c163521444b7277f2c33bc7bc05667673db7d48
> Cr-Commit-Position: refs/heads/master@{#395365}

TBR=dpranke@chromium.org,thestig@chromium.org,krasin@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 453195 , 615039 

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

[modify] https://crrev.com/3ec265f1c1a76a6f5dfee6d860cf1a4b6e9ba79a/build/common.gypi
[modify] https://crrev.com/3ec265f1c1a76a6f5dfee6d860cf1a4b6e9ba79a/build/toolchain/toolchain.gni

Looks like 3) is wrong. It did break for all other targets.
Project Member

Comment 3 by bugdroid1@chromium.org, May 26 2016

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

commit c8648b6aef59bf539251dc5242820a83b1a751f9
Author: agrieve <agrieve@chromium.org>
Date: Thu May 26 15:43:55 2016

Reland of Enable LTO on Linux for the official builds.

Reason for reland:
Uses target_os rather than is_linux

This CL turns on Link-Time Optimization for official
builds, which makes the resulting binaries to run faster.

On the dark side, the change increases the link time by 3x-5x,
and is also very memory-hungry. All official bots were
upgraded to have 200+ GB RAM to handle LTO builds. Timeouts
were also accordingly increased.

This CL might cause timeouts / OOMs, if some slaves still
have not enough RAM. Please, revert the CL with pointing
out to the slaves / bots broken by this change.

NOTRY=true
TBR=thakis
BUG= 453195 , 615039 

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

[modify] https://crrev.com/c8648b6aef59bf539251dc5242820a83b1a751f9/build/common.gypi
[modify] https://crrev.com/c8648b6aef59bf539251dc5242820a83b1a751f9/build/toolchain/toolchain.gni

Status: Fixed (was: Assigned)
Tried to address 2) in https://codereview.chromium.org/2011023002/, but looks like it's working-as-intended (you need to manually download the gold plugin if you want to use it).
Note to developers who might be as confused as I was: if you need to manually download the gold plugin as said previously, it is as simple as running in src directory:

python ./build/download_gold_plugin.py

(Tested on Ubuntu 16.04)

Sign in to add a comment