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

Issue 12939021: Make the build control what library(/ies) to load (Closed)

Created:
7 years, 9 months ago by cjhopman
Modified:
7 years, 8 months ago
Reviewers:
bulach, Yaron, joth, brettw
CC:
chromium-reviews, jam, android-webview-reviews_chromium.org, joi+watch-content_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, darin-cc_chromium.org, klundberg+watch_chromium.org, ilevy+watch_chromium.org, jochen+watch_chromium.org, frankf+watch_chromium.org, aberent, Andrew Hayden (chromium.org), Torne
Base URL:
https://chromium.googlesource.com/chromium/src.git@antpy
Visibility:
Public.

Description

Make the build control what library(/ies) to load At build time, we know what native libraries an apk needs to load. Instead of requiring those .apks to specify this again in code, instead generate a .java file containing a list of the libraries to load. This is done using a pattern similar to resources, content_java is built with a placeholder NativeLibraries.java (i.e. without an actual value for its libraries list). The corresponding .class file is not included in content_java.jar. Then, when building an apk we generate the "real" NativeLibraries.java (with the real String[]) and include that in the .apk. This is designed to also support the component build, where, we will have to calculate the list of libraries at build time, and sort them in dependency order (because Android's linker, for some reason, doesn't do that itself). BUG=158821 TBR=brettw@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=191695

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Patch Set 3 : Fix indent #

Patch Set 4 : Remove stray print #

Total comments: 14

Patch Set 5 : #

Patch Set 6 : Rebase #

Patch Set 7 : Fix webview build #

Total comments: 8

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -85 lines) Patch
M android_webview/Android.mk View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
A android_webview/java/generated_src/org/chromium/content/app/NativeLibraries.java View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java View 2 chunks +0 lines, -6 lines 0 comments Download
A build/android/create_native_libraries_header.py View 1 2 3 4 5 6 7 1 chunk +52 lines, -0 lines 0 comments Download
A build/android/gcc_preprocess.py View 1 2 3 4 1 chunk +52 lines, -0 lines 0 comments Download
M build/android/java_cpp_template.gypi View 1 3 chunks +16 lines, -12 lines 0 comments Download
A build/android/write_ordered_libraries.py View 1 2 3 4 5 6 7 1 chunk +43 lines, -0 lines 0 comments Download
M build/java_apk.gypi View 1 2 3 4 3 chunks +76 lines, -0 lines 0 comments Download
M chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellApplication.java View 2 chunks +0 lines, -2 lines 0 comments Download
M content/content.gyp View 1 2 2 chunks +17 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/app/ChildProcessService.java View 3 chunks +0 lines, -9 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/app/LibraryLoader.java View 1 2 3 4 3 chunks +16 lines, -41 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java View 2 chunks +1 line, -6 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java View 2 chunks +1 line, -5 lines 0 comments Download
A content/public/android/java/templates/NativeLibraries.template View 1 2 3 4 5 6 7 1 chunk +17 lines, -0 lines 0 comments Download
A content/public/android/java/templates/native_libraries_array.h View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
M content/shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsApplication.java View 2 chunks +0 lines, -2 lines 0 comments Download
M content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellApplication.java View 2 chunks +0 lines, -2 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
cjhopman
7 years, 9 months ago (2013-03-26 18:44:20 UTC) #1
bulach
this a great idea, thanks chris! I have some suggestions below to be more inline ...
7 years, 9 months ago (2013-03-26 19:02:15 UTC) #2
bulach
On 2013/03/26 19:02:15, bulach wrote: > this a great idea, thanks chris! I have some ...
7 years, 9 months ago (2013-03-26 19:03:13 UTC) #3
joth
Nice idea. ...In "other things that would be great to improve" I've always thought the ...
7 years, 9 months ago (2013-03-26 19:16:26 UTC) #4
cjhopman
https://codereview.chromium.org/12939021/diff/1/content/public/android/java/src/org/chromium/content/app/NativeLibraries.java File content/public/android/java/src/org/chromium/content/app/NativeLibraries.java (right): https://codereview.chromium.org/12939021/diff/1/content/public/android/java/src/org/chromium/content/app/NativeLibraries.java#newcode7 content/public/android/java/src/org/chromium/content/app/NativeLibraries.java:7: public class NativeLibraries { On 2013/03/26 19:16:26, joth wrote: ...
7 years, 9 months ago (2013-03-26 21:15:37 UTC) #5
bulach
On 2013/03/26 21:15:37, cjhopman wrote: > https://codereview.chromium.org/12939021/diff/1/content/public/android/java/src/org/chromium/content/app/NativeLibraries.java > File > content/public/android/java/src/org/chromium/content/app/NativeLibraries.java > (right): > > ...
7 years, 9 months ago (2013-03-27 10:44:24 UTC) #6
cjhopman
If we are currently using java_cpp_template.gypi for anything other than generating a .java file from ...
7 years, 9 months ago (2013-03-27 15:28:05 UTC) #7
bulach
On 2013/03/27 15:28:05, cjhopman wrote: > If we are currently using java_cpp_template.gypi for anything other ...
7 years, 9 months ago (2013-03-27 16:42:43 UTC) #8
cjhopman
First, why have two generators/preprocessors? There are two distinct cases that we would like to ...
7 years, 9 months ago (2013-03-27 18:13:28 UTC) #9
bulach
On Wed, Mar 27, 2013 at 6:13 PM, Chris Hopman <cjhopman@chromium.org> wrote: > First, why ...
7 years, 9 months ago (2013-03-27 18:37:59 UTC) #10
cjhopman
On Wed, Mar 27, 2013 at 11:37 AM, Marcus Bulach <bulach@chromium.org> wrote: > > > ...
7 years, 9 months ago (2013-03-27 20:10:00 UTC) #11
cjhopman
I just thought of another way to think about this. For the current cases where ...
7 years, 9 months ago (2013-03-27 20:38:58 UTC) #12
bulach
On Wed, Mar 27, 2013 at 8:38 PM, Chris Hopman <cjhopman@chromium.org> wrote: > I just ...
7 years, 9 months ago (2013-03-28 10:00:36 UTC) #13
cjhopman
On Thu, Mar 28, 2013 at 3:00 AM, Marcus Bulach <bulach@chromium.org> wrote: > > > ...
7 years, 9 months ago (2013-03-28 15:57:02 UTC) #14
bulach
On Thu, Mar 28, 2013 at 3:56 PM, Chris Hopman <cjhopman@chromium.org> wrote: > > > ...
7 years, 9 months ago (2013-03-28 16:10:44 UTC) #15
cjhopman
On Thu, Mar 28, 2013 at 9:10 AM, Marcus Bulach <bulach@chromium.org> wrote: > > > ...
7 years, 9 months ago (2013-03-28 17:06:35 UTC) #16
bulach
On Thu, Mar 28, 2013 at 5:06 PM, Chris Hopman <cjhopman@chromium.org> wrote: > > On ...
7 years, 9 months ago (2013-03-28 17:19:51 UTC) #17
cjhopman
Ok, please take another look. This has been updated as discussed: gcc preprocessing has been ...
7 years, 9 months ago (2013-03-29 00:35:09 UTC) #18
Yaron
Just a few minor comments. lgtm https://codereview.chromium.org/12939021/diff/38001/build/android/gcc_preprocess.py File build/android/gcc_preprocess.py (right): https://codereview.chromium.org/12939021/diff/38001/build/android/gcc_preprocess.py#newcode28 build/android/gcc_preprocess.py:28: subprocess.check_call(gcc_cmd) CheckCallDie https://codereview.chromium.org/12939021/diff/38001/build/java_apk.gypi ...
7 years, 8 months ago (2013-03-29 20:37:32 UTC) #19
cjhopman
https://codereview.chromium.org/12939021/diff/38001/build/android/gcc_preprocess.py File build/android/gcc_preprocess.py (right): https://codereview.chromium.org/12939021/diff/38001/build/android/gcc_preprocess.py#newcode28 build/android/gcc_preprocess.py:28: subprocess.check_call(gcc_cmd) On 2013/03/29 20:37:32, Yaron wrote: > CheckCallDie Done. ...
7 years, 8 months ago (2013-03-29 22:29:31 UTC) #20
cjhopman
brettw: TBR for content/content.gyp OWNERS
7 years, 8 months ago (2013-04-01 18:28:17 UTC) #21
joth
lgtm % nits thanks! https://codereview.chromium.org/12939021/diff/62001/build/android/create_native_libraries_header.py File build/android/create_native_libraries_header.py (right): https://codereview.chromium.org/12939021/diff/62001/build/android/create_native_libraries_header.py#newcode6 build/android/create_native_libraries_header.py:6: add either a file or ...
7 years, 8 months ago (2013-04-01 18:46:36 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cjhopman@chromium.org/12939021/63002
7 years, 8 months ago (2013-04-01 18:59:41 UTC) #23
cjhopman
https://codereview.chromium.org/12939021/diff/62001/build/android/create_native_libraries_header.py File build/android/create_native_libraries_header.py (right): https://codereview.chromium.org/12939021/diff/62001/build/android/create_native_libraries_header.py#newcode6 build/android/create_native_libraries_header.py:6: On 2013/04/01 18:46:37, joth wrote: > add either a ...
7 years, 8 months ago (2013-04-01 20:11:13 UTC) #24
commit-bot: I haz the power
Change committed as 191695
7 years, 8 months ago (2013-04-01 23:12:34 UTC) #25
bulach
7 years, 8 months ago (2013-04-02 14:28:07 UTC) #26
Message was sent while issue was closed.
lgtm, it was public holidays in my timezone, but thanks for pushing this
through! :)

I have some truly small nits but rather than bothering you with my comments, I
thought it was easier to just send you a review. :) ptal at
https://codereview.chromium.org/13469003/

thanks!

Powered by Google App Engine
This is Rietveld 408576698