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

Issue 666813002: GN: Fix Android component build (Closed)

Created:
6 years, 2 months ago by cjhopman
Modified:
6 years, 1 month ago
CC:
chromium-reviews, avayvod+watch_chromium.org, qsr+mojo_chromium.org, Aaron Boodman, tfarina, tdresser+watch_chromium.org, viettrungluu+watch_chromium.org, jam, klundberg+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, feature-media-reviews_chromium.org, darin-cc_chromium.org, yfriedman+watch_chromium.org, piman+watch_chromium.org, cc-bugs_chromium.org, erikwright+watch_chromium.org, ben+mojo_chromium.org, darin (slow to review), DaleCurtis
Base URL:
https://chromium.googlesource.com/chromium/src.git@gn-clank
Project:
chromium
Visibility:
Public.

Description

GN: Fix Android component build This change makes all libraries in the Android component build link successfully (including fixing and enabling libchrome_shell). This also makes all the libraries link in a component build for Linux, but without bot coverage for that platform it'll surely regress. This is almost entirely just fixing some missing/incorrect dependencies and adding missing source files for Android. Some targets were depending on an internal source_set/static_library when they should have been (or already were) depending on the corresponding component. In these cases, I added some visibility restrictions to those internal targets to try to prevent those types of dependencies from coming back. BUG=359249 Committed: https://crrev.com/09981a9eb8bff00e2644f3174e5651b5734eed9a Cr-Commit-Position: refs/heads/master@{#301386}

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : Undo gyp fix #

Patch Set 7 : Actually undo gyp change #

Total comments: 12

Patch Set 8 : #

Total comments: 6

Patch Set 9 : #

Total comments: 11

Patch Set 10 : #

Total comments: 4

Patch Set 11 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -40 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M base/third_party/nspr/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M cc/surfaces/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -10 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 4 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/BUILD.gn View 2 chunks +1 line, -1 line 0 comments Download
M components/bookmarks.gypi View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M components/bookmarks/common/BUILD.gn View 1 chunk +5 lines, -0 lines 0 comments Download
M components/bookmarks/common/android/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -0 lines 0 comments Download
M components/cdm/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M components/dom_distiller/core/BUILD.gn View 2 chunks +5 lines, -1 line 4 comments Download
M components/keyed_service/content/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M components/sessions/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/app/BUILD.gn View 1 2 3 4 3 chunks +7 lines, -3 lines 0 comments Download
M content/common/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/BUILD.gn View 1 chunk +8 lines, -5 lines 0 comments Download
M media/audio/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M media/base/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M media/base/android/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M media/blink/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -6 lines 0 comments Download
M mojo/converters/surfaces/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/gles2/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/services/html_viewer/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M mojo/services/native_viewport/BUILD.gn View 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/BUILD.gn View 3 chunks +4 lines, -0 lines 0 comments Download
M testing/android/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A + third_party/android_opengl/etc1/BUILD.gn View 1 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/android_opengl/etc1/etc1.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/cld/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download
M ui/base/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M ui/events/ipc/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M ui/gfx/ipc/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/x/BUILD.gn View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 51 (8 generated)
cjhopman
jamesr: ptal for high-level + OWNERS of cc/ mojo/ This touches a lot of places ...
6 years, 2 months ago (2014-10-20 23:04:03 UTC) #5
jamesr
I don't think making component default is a good idea. https://codereview.chromium.org/666813002/diff/80001/build/config/BUILDCONFIG.gn File build/config/BUILDCONFIG.gn (right): https://codereview.chromium.org/666813002/diff/80001/build/config/BUILDCONFIG.gn#newcode29 ...
6 years, 2 months ago (2014-10-20 23:11:24 UTC) #6
cjhopman
https://codereview.chromium.org/666813002/diff/80001/build/config/BUILDCONFIG.gn File build/config/BUILDCONFIG.gn (right): https://codereview.chromium.org/666813002/diff/80001/build/config/BUILDCONFIG.gn#newcode29 build/config/BUILDCONFIG.gn:29: is_component_build = os == "android" On 2014/10/20 23:11:24, jamesr ...
6 years, 2 months ago (2014-10-21 00:19:06 UTC) #7
jamesr
On 2014/10/21 00:19:06, cjhopman wrote: > https://codereview.chromium.org/666813002/diff/80001/build/config/BUILDCONFIG.gn > File build/config/BUILDCONFIG.gn (right): > > https://codereview.chromium.org/666813002/diff/80001/build/config/BUILDCONFIG.gn#newcode29 > ...
6 years, 2 months ago (2014-10-21 00:22:34 UTC) #8
cjhopman
On 2014/10/21 00:22:34, jamesr wrote: > On 2014/10/21 00:19:06, cjhopman wrote: > > > https://codereview.chromium.org/666813002/diff/80001/build/config/BUILDCONFIG.gn ...
6 years, 2 months ago (2014-10-21 01:31:42 UTC) #9
cjhopman
On 2014/10/21 01:31:42, cjhopman wrote: > On 2014/10/21 00:22:34, jamesr wrote: > > That seems ...
6 years, 2 months ago (2014-10-21 01:48:13 UTC) #10
cjhopman
On 2014/10/21 01:48:13, cjhopman wrote: > On 2014/10/21 01:31:42, cjhopman wrote: > > On 2014/10/21 ...
6 years, 2 months ago (2014-10-21 02:55:24 UTC) #11
jamesr
Could you update the patch description? It still says it's making component be default on ...
6 years, 2 months ago (2014-10-21 19:47:50 UTC) #12
cjhopman
On 2014/10/21 19:47:50, jamesr wrote: > Could you update the patch description? It still says ...
6 years, 2 months ago (2014-10-21 19:50:38 UTC) #13
jamesr
Thanks, I'll try to get to this later today.
6 years, 2 months ago (2014-10-21 19:51:24 UTC) #14
jamesr
https://codereview.chromium.org/666813002/diff/180001/base/third_party/nspr/BUILD.gn File base/third_party/nspr/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/180001/base/third_party/nspr/BUILD.gn#newcode6 base/third_party/nspr/BUILD.gn:6: visibility = [ "//base:base" ] //base is the same ...
6 years, 2 months ago (2014-10-22 00:28:19 UTC) #15
cjhopman
https://codereview.chromium.org/666813002/diff/180001/base/third_party/nspr/BUILD.gn File base/third_party/nspr/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/180001/base/third_party/nspr/BUILD.gn#newcode6 base/third_party/nspr/BUILD.gn:6: visibility = [ "//base:base" ] On 2014/10/22 00:28:18, jamesr ...
6 years, 2 months ago (2014-10-23 00:15:49 UTC) #16
cjhopman
Ok, adding in OWNERS for everything. Here's the breakdown: jamesr: cc/surfaces/BUILD.gn mojo/converters/surfaces/BUILD.gn mojo/gles2/BUILD.gn mojo/services/html_viewer/BUILD.gn mojo/services/native_viewport/BUILD.gn ...
6 years, 2 months ago (2014-10-24 02:08:39 UTC) #18
ddorwin
media/ rs lgtm +dalecurtis FYI
6 years, 2 months ago (2014-10-24 02:14:18 UTC) #19
jamesr
mojo/ lgtm cc/ looks fishy https://codereview.chromium.org/666813002/diff/190001/cc/surfaces/BUILD.gn File cc/surfaces/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/190001/cc/surfaces/BUILD.gn#newcode35 cc/surfaces/BUILD.gn:35: "//ui/events:events_base", hmm, cc/surfaces doesn't ...
6 years, 2 months ago (2014-10-24 02:16:23 UTC) #20
cjhopman
https://codereview.chromium.org/666813002/diff/190001/cc/surfaces/BUILD.gn File cc/surfaces/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/190001/cc/surfaces/BUILD.gn#newcode35 cc/surfaces/BUILD.gn:35: "//ui/events:events_base", On 2014/10/24 02:16:23, jamesr wrote: > hmm, cc/surfaces ...
6 years, 2 months ago (2014-10-24 02:26:33 UTC) #21
Lei Zhang
https://codereview.chromium.org/666813002/diff/190001/build/config/BUILD.gn File build/config/BUILD.gn (left): https://codereview.chromium.org/666813002/diff/190001/build/config/BUILD.gn#oldcode35 build/config/BUILD.gn:35: "ENABLE_BACKGROUND=1", This is out of date. I just moved ...
6 years, 2 months ago (2014-10-24 02:27:44 UTC) #22
cjhopman
On 2014/10/24 02:27:44, Lei Zhang wrote: > https://codereview.chromium.org/666813002/diff/190001/build/config/BUILD.gn > File build/config/BUILD.gn (left): > > https://codereview.chromium.org/666813002/diff/190001/build/config/BUILD.gn#oldcode35 ...
6 years, 2 months ago (2014-10-24 02:31:11 UTC) #23
mattm
safe_browsing_service.cc lgtm
6 years, 2 months ago (2014-10-24 02:34:56 UTC) #24
cjhopman
I've confirmed that the extensions-y things we pull in are extension_constants and component_extensions_resources (in gn ...
6 years, 2 months ago (2014-10-24 02:48:02 UTC) #25
David Trainor- moved to gerrit
chrome/android lgtm third_party/android_opengl/etc1/ lgtm
6 years, 2 months ago (2014-10-24 02:49:04 UTC) #26
Lei Zhang
https://codereview.chromium.org/666813002/diff/210001/base/third_party/nspr/BUILD.gn File base/third_party/nspr/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/210001/base/third_party/nspr/BUILD.gn#newcode6 base/third_party/nspr/BUILD.gn:6: visibility = [ "//base" ] willchan is on leave, ...
6 years, 2 months ago (2014-10-24 02:55:51 UTC) #27
jamesr
Ah yes, that's right about latency info.
6 years, 2 months ago (2014-10-24 03:08:24 UTC) #28
Andrew Hayden (chromium.org)
third_party/cld LGTM, but hopefully we'll be off of it in the very near future when ...
6 years, 2 months ago (2014-10-24 07:35:15 UTC) #29
Avi (use Gerrit)
https://codereview.chromium.org/666813002/diff/210001/content/app/BUILD.gn File content/app/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/210001/content/app/BUILD.gn#newcode70 content/app/BUILD.gn:70: content_app_deps += [ "//content/gpu" ] I'm not sure how ...
6 years, 2 months ago (2014-10-24 15:24:58 UTC) #30
cjhopman
https://codereview.chromium.org/666813002/diff/210001/base/third_party/nspr/BUILD.gn File base/third_party/nspr/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/210001/base/third_party/nspr/BUILD.gn#newcode6 base/third_party/nspr/BUILD.gn:6: visibility = [ "//base" ] On 2014/10/24 02:55:51, Lei ...
6 years, 2 months ago (2014-10-24 21:41:12 UTC) #31
cjhopman
blundell for components/ since jochen is OOO
6 years, 2 months ago (2014-10-24 21:44:07 UTC) #33
Avi (use Gerrit)
On 2014/10/24 21:44:07, cjhopman wrote: > blundell for components/ since jochen is OOO OK then. ...
6 years, 2 months ago (2014-10-24 21:45:49 UTC) #34
Lei Zhang
chrome/ and base/ lgtm https://codereview.chromium.org/666813002/diff/210001/chrome/renderer/BUILD.gn File chrome/renderer/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/210001/chrome/renderer/BUILD.gn#newcode43 chrome/renderer/BUILD.gn:43: "//components/plugins/renderer", On 2014/10/24 21:41:12, cjhopman ...
6 years, 2 months ago (2014-10-24 21:57:04 UTC) #35
cjhopman
sievers@ for gpu/BUILD.gn
6 years, 2 months ago (2014-10-24 22:12:11 UTC) #37
no sievers
https://codereview.chromium.org/666813002/diff/230001/gpu/BUILD.gn File gpu/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/230001/gpu/BUILD.gn#newcode126 gpu/BUILD.gn:126: libs += [ "android" ] Should this move to ...
6 years, 2 months ago (2014-10-24 22:25:07 UTC) #38
cjhopman
https://codereview.chromium.org/666813002/diff/230001/gpu/BUILD.gn File gpu/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/230001/gpu/BUILD.gn#newcode126 gpu/BUILD.gn:126: libs += [ "android" ] On 2014/10/24 22:25:07, sievers ...
6 years, 2 months ago (2014-10-24 22:27:58 UTC) #39
no sievers
On 2014/10/24 22:27:58, cjhopman wrote: > https://codereview.chromium.org/666813002/diff/230001/gpu/BUILD.gn > File gpu/BUILD.gn (right): > > https://codereview.chromium.org/666813002/diff/230001/gpu/BUILD.gn#newcode126 > ...
6 years, 2 months ago (2014-10-24 22:34:51 UTC) #40
raymes
rubberstamp lgtm for ppapi/BUILD.gn
6 years, 1 month ago (2014-10-26 23:58:09 UTC) #41
blundell
https://codereview.chromium.org/666813002/diff/250001/components/dom_distiller/core/BUILD.gn File components/dom_distiller/core/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/250001/components/dom_distiller/core/BUILD.gn#newcode6 components/dom_distiller/core/BUILD.gn:6: source_set("core") { why this change?
6 years, 1 month ago (2014-10-27 07:10:40 UTC) #42
jamesr
https://codereview.chromium.org/666813002/diff/250001/components/dom_distiller/core/BUILD.gn File components/dom_distiller/core/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/250001/components/dom_distiller/core/BUILD.gn#newcode6 components/dom_distiller/core/BUILD.gn:6: source_set("core") { On 2014/10/27 07:10:39, blundell wrote: > why ...
6 years, 1 month ago (2014-10-27 07:14:46 UTC) #43
blundell
https://codereview.chromium.org/666813002/diff/250001/components/dom_distiller/core/BUILD.gn File components/dom_distiller/core/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/250001/components/dom_distiller/core/BUILD.gn#newcode6 components/dom_distiller/core/BUILD.gn:6: source_set("core") { On 2014/10/27 07:14:46, jamesr wrote: > On ...
6 years, 1 month ago (2014-10-27 07:31:47 UTC) #44
cjhopman
https://codereview.chromium.org/666813002/diff/230001/chrome/android/BUILD.gn File chrome/android/BUILD.gn (right): https://codereview.chromium.org/666813002/diff/230001/chrome/android/BUILD.gn#newcode173 chrome/android/BUILD.gn:173: ldflags = [ "-Wl,--gc-sections" ] On 2014/10/24 21:57:04, Lei ...
6 years, 1 month ago (2014-10-27 07:32:08 UTC) #45
blundell
LGTM As I said, I don't understand the usage of "source_set" instead of "component", but ...
6 years, 1 month ago (2014-10-27 07:40:34 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/666813002/250001
6 years, 1 month ago (2014-10-27 15:30:54 UTC) #48
commit-bot: I haz the power
Committed patchset #11 (id:250001)
6 years, 1 month ago (2014-10-27 17:11:29 UTC) #49
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/09981a9eb8bff00e2644f3174e5651b5734eed9a Cr-Commit-Position: refs/heads/master@{#301386}
6 years, 1 month ago (2014-10-27 17:12:09 UTC) #50
jamesr
6 years, 1 month ago (2014-10-27 17:33:50 UTC) #51
Message was sent while issue was closed.
On 2014/10/27 07:40:34, blundell wrote:
> As I said, I don't understand the usage of "source_set" instead of
"component",
> but it appears it's done in lots of BUILD.gn files under //components, so
> there's probably just something incorrect in my limited understanding of gn.

Component vs not doesn't have to do with GN, it has to do with how the code is
linked.  This code is not a component because it does not link as a separate DLL
in the component build.  It has no _export header and no _IMPLEMENTATION macro,
which are used to set up dll exports / symbol visibility for things that do link
as DLLs in the component build.  It's the same as GYP in this aspect.

GYP doesn't have the notion of source_sets, so it uses static_library in some
places but it causes issues with symbols getting dropped when linked into
intermediate targets which requires somewhat nasty workarounds with gypi files. 
See the things that link into content for an example.  GN does have source_sets,
so we use them.

Powered by Google App Engine
This is Rietveld 408576698