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

Issue 275703003: Make GN Android build link executables (Closed)

Created:
6 years, 7 months ago by brettw
Modified:
6 years, 7 months ago
Reviewers:
cjhopman, awong, scottmg
CC:
chromium-reviews, cc-bugs_chromium.org, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Make GN Android build link executables. Some minor tweaks in STL usage in GN itself to enable it to compile using the Android version of the STL. Enable this in the build (not so much because we need a GN binary on Android, but for build verification purposes). Moved the executable_ldconfig config from the linux file to the gcc one since its shared between the Linux and Android builds. Added "-Bdynamic" and "-Wl,-z,nocopyreloc" to this on Android. Moved some sysroot path components from sysroot.gni to android/config.gni (which sysroot uses) so it can be shared with the toolchain definitions. Added the android_full_debug build flag. Made the "optimize off" mode of the build match the GYP build's "light optimization" on Android contingent on this flag. Pulls out the optimize and optimize_max shared flags into one list to avoid duplication. Adds a bunch of linker optimization flags that should be passed on non-Mac Posix platforms, and turns on dead code stripping for Mac builds. Adds functionality to the gcc toolchain template to be able to insert strings before and after the libs. Adds a wrapper template for android toolchains that sets these accordingly to get the gross Android crtbegin/end files inserted in the right place on the linker line. Made the android_ndk_root variable relative to the source root rather than the system root. Uses of this now rebase according to their own needs which makes some of the arguments a lot easier to follow. Build file updates for base and libevent for Android. Implement ashmem library. The only change on desktop linux is the addition of -Wl,--fatal-warnings to the linker line. R=ajwong@chromium.org, cjhopman@chromium.org, scottmg@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270138

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : whitespace #

Total comments: 58

Patch Set 6 : #

Total comments: 7

Patch Set 7 : #

Patch Set 8 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+352 lines, -116 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 2 chunks +37 lines, -9 lines 0 comments Download
M build/config/BUILDCONFIG.gn View 1 chunk +1 line, -1 line 0 comments Download
M build/config/android/config.gni View 1 2 3 4 5 6 1 chunk +57 lines, -3 lines 1 comment Download
M build/config/compiler/BUILD.gn View 1 2 3 4 5 6 12 chunks +126 lines, -43 lines 0 comments Download
M build/config/gcc/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +18 lines, -0 lines 0 comments Download
M build/config/linux/BUILD.gn View 1 chunk +0 lines, -11 lines 0 comments Download
M build/config/sysroot.gni View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M build/toolchain/android/BUILD.gn View 1 2 3 4 5 6 1 chunk +46 lines, -29 lines 0 comments Download
M build/toolchain/gcc_toolchain.gni View 1 2 3 chunks +22 lines, -2 lines 0 comments Download
A third_party/ashmem/BUILD.gn View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
M third_party/libevent/BUILD.gn View 1 2 3 chunks +5 lines, -12 lines 0 comments Download
M tools/gn/args.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M tools/gn/escape.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/settings.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M tools/gn/target.cc View 1 2 3 4 5 6 1 chunk +8 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
brettw
Nico: Review. Chris: Sanity check for Androidy things.
6 years, 7 months ago (2014-05-09 19:44:46 UTC) #1
brettw
Nico is out this week. Scott, can you review?
6 years, 7 months ago (2014-05-12 16:21:54 UTC) #2
scottmg
https://codereview.chromium.org/275703003/diff/80001/base/BUILD.gn File base/BUILD.gn (right): https://codereview.chromium.org/275703003/diff/80001/base/BUILD.gn#newcode729 base/BUILD.gn:729: set_sources_assignment_filter([]) ick, how is this scoped? can you not ...
6 years, 7 months ago (2014-05-12 16:33:58 UTC) #3
brettw
New snap up https://codereview.chromium.org/275703003/diff/80001/base/BUILD.gn File base/BUILD.gn (right): https://codereview.chromium.org/275703003/diff/80001/base/BUILD.gn#newcode729 base/BUILD.gn:729: set_sources_assignment_filter([]) On 2014/05/12 16:33:58, scottmg wrote: ...
6 years, 7 months ago (2014-05-12 18:06:41 UTC) #4
scottmg
OK, if Chris is happy with build/config/android/config.gni build/config/compiler/BUILD.gn build/toolchain/android/BUILD.gn lgtm https://codereview.chromium.org/275703003/diff/100001/build/config/compiler/BUILD.gn File build/config/compiler/BUILD.gn (right): https://codereview.chromium.org/275703003/diff/100001/build/config/compiler/BUILD.gn#newcode639 ...
6 years, 7 months ago (2014-05-12 18:10:21 UTC) #5
cjhopman
https://codereview.chromium.org/275703003/diff/80001/base/BUILD.gn File base/BUILD.gn (right): https://codereview.chromium.org/275703003/diff/80001/base/BUILD.gn#newcode729 base/BUILD.gn:729: set_sources_assignment_filter([]) Maybe there should be a way that something ...
6 years, 7 months ago (2014-05-12 18:37:17 UTC) #6
awong
lots of comments. Feel free to push back on changing them within this CL, but ...
6 years, 7 months ago (2014-05-12 19:23:02 UTC) #7
brettw
New snap up. https://codereview.chromium.org/275703003/diff/80001/base/BUILD.gn File base/BUILD.gn (right): https://codereview.chromium.org/275703003/diff/80001/base/BUILD.gn#newcode729 base/BUILD.gn:729: set_sources_assignment_filter([]) On 2014/05/12 18:37:17, cjhopman wrote: ...
6 years, 7 months ago (2014-05-12 21:00:08 UTC) #8
cjhopman
Just adding a little bit of background on the Android flags ugliness. (Though I don't ...
6 years, 7 months ago (2014-05-12 21:04:19 UTC) #9
awong
LGTM w/ responses and nits (take them or leave them) https://codereview.chromium.org/275703003/diff/80001/build/config/android/config.gni File build/config/android/config.gni (right): https://codereview.chromium.org/275703003/diff/80001/build/config/android/config.gni#newcode66 ...
6 years, 7 months ago (2014-05-12 21:34:22 UTC) #10
cjhopman
lgtm
6 years, 7 months ago (2014-05-13 16:26:47 UTC) #11
brettw
https://codereview.chromium.org/275703003/diff/80001/build/config/compiler/BUILD.gn File build/config/compiler/BUILD.gn (right): https://codereview.chromium.org/275703003/diff/80001/build/config/compiler/BUILD.gn#newcode712 build/config/compiler/BUILD.gn:712: "-Wl,-O1", Will do this in a followup. I have ...
6 years, 7 months ago (2014-05-13 17:39:21 UTC) #12
brettw
6 years, 7 months ago (2014-05-13 17:41:12 UTC) #13
Message was sent while issue was closed.
Committed patchset #8 manually as r270138 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698