Граф коммитов

106 Коммитов

Автор SHA1 Сообщение Дата
torne 1f6e035226 Remove most android_webview_build conditions from build.
Remove most references to android_webview_build from the build directory
now that we no longer support that build configuration. Fold conditions
into their parents where appropriate. Leave the variable itself defined
to 0 as not all uses in the tree have been removed yet.

A few references are left alone here and will be removed separately in
later changes that will be larger refactorings to eliminate other
variables.

BUG=440793

Review URL: https://codereview.chromium.org/1043913002

Cr-Original-Commit-Position: refs/heads/master@{#323013}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c6fe7a775af41cd98533e89a902b8b67044caa87
2015-03-31 11:51:32 +00:00
jbudorick 06dd23c42b [Android] Incorporate findbugs into android builds.
BUG=431823

Review URL: https://codereview.chromium.org/1000793002

Cr-Original-Commit-Position: refs/heads/master@{#321927}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 45816be817451773244bf491806806be2cbab1cf
2015-03-24 03:15:40 +00:00
cjhopman 0074e21ef1 Add native lib version name to chrome_shell_apk
This is checked on startup to ensure that the native lib is the right
version (used to workaround a platform bug that falied to extract the
native lib during updates).

Review URL: https://codereview.chromium.org/1007053002

Cr-Original-Commit-Position: refs/heads/master@{#320617}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 460d30e0297ece99ff070f0a5df9cc9eda25d0ee
2015-03-14 00:19:18 +00:00
aurimas a8813db8ea Roll Android SDK to API 22
Updated the following:
- Android SDK Platform API 22
- Android SDK Tools 24.1.2
- Android SDK Platform-tools 22
- Android SDK Build-tools 22
- Android SDK Sources 22
- Android Support Library 21.0.3

BUG=440601

Review URL: https://codereview.chromium.org/1000463002

Cr-Original-Commit-Position: refs/heads/master@{#320395}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e2a21a01b60eb329e61499458f51ebae7a0951ad
2015-03-12 22:41:47 +00:00
jamesr 333d1e0eb2 Don't check includes in generate_jar_jni target
'gn check' for ui/gl:* in an android build currently fails with the
error message:

ERROR at //base/android/jni_generator/jni_generator_helper.h:11:11: Include not allowed.
          ^-------------------------
It is not in any dependency of //ui/gl:surface_jni_headers__jni_Surface
The include file is in the target(s):
  //base:base
which should somehow be reachable from //ui/gl:surface_jni_headers__jni_Surface

This target does not produce files that compile, so checking includes is
less useful.

R=brettw@chromium.org

Review URL: https://codereview.chromium.org/961033003

Cr-Original-Commit-Position: refs/heads/master@{#318983}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 63e12fcc153d47463432954d1826c393c0962600
2015-03-04 00:52:05 +00:00
scottmg b7d78d14bf Apply gn format with 'sources' sorting to src/
Application of https://codereview.chromium.org/962003002/.

TBR=keybuk@chromium.org
R=brettw@chromium.org
BUG=456014

Review URL: https://codereview.chromium.org/960413003

Cr-Original-Commit-Position: refs/heads/master@{#318574}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7c7296f4dcb7e32fa4440b333a40a37699f517b1
2015-02-28 02:24:07 +00:00
jbudorick bb47de9677 [Android] Remove TestServerSpawner dependency from ChromeNativeTestInstrumentationTestRunner.
BUG=462239

Review URL: https://codereview.chromium.org/963643002

Cr-Original-Commit-Position: refs/heads/master@{#318568}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6b2d16b5072558e38155bb727e4de041e176aac8
2015-02-28 01:47:00 +00:00
qsr 2c00d89567 Allow to exlude jar in android_standalone_library.
R=cjhopman@chromium.org

Review URL: https://codereview.chromium.org/951353003

Cr-Original-Commit-Position: refs/heads/master@{#318214}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cd6ee6d5ce5a42c50d0284daeaa7bd664f58b8fb
2015-02-26 10:53:46 +00:00
torne ff2539c14d Make combined native/manual JNI registration work for clang.
Since clang has trouble with aliases for static functions, go back to
using a trivial wrapper function instead of an alias. Since there is
only one caller of the wrapped, static function, and its address is no
longer taken to generate the manual JNI registration table (the
wrapper's address is already being taken instead), there's no actual
benefit to using an alias anyway, since the compiler will simply inline
the static function into the wrapper.

BUG=442327,460857
TBR=cjhopman@chromium.org

Review URL: https://codereview.chromium.org/953523003

Cr-Original-Commit-Position: refs/heads/master@{#317787}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cab875835ac9e39183ba0ac4fe30e96d1bdfec45
2015-02-24 12:55:37 +00:00
mnaganov e1c04e42ea Improve CLI interface of C++ enums to Java generator
1. Print error if input file doesn't have any annotated enums.

2. Convert "mandatory option" 'output_dir' into a positional argument.

3. Fix 'print_output_only' when running from command line.

BUG=458562

Review URL: https://codereview.chromium.org/934873002

Cr-Original-Commit-Position: refs/heads/master@{#317783}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4e3301c82c48ac22439d1b9dc34ba05a0599e3e9
2015-02-24 11:56:59 +00:00
torne 22ad692dfd Use combined native/manual JNI registration.
Add a new mode to the JNI generator which emits both native JNI exports
and manual registration code, and use this as the default mode (except
when compiling with clang as a clang bug prevents this from working at
present).

Native JNI exports are stripped from binaries by default to enforce that
the correct manual registration code is called (and to save increasing
the dynamic symbol table size), except for binaries that explicitly opt
in to using native exports (i.e. libwebviewchromium). Native exports are
not compatible with the crazy linker, so cannot be used universally.

The WebView-specific call to InitReplacementClassLoader, required by
native export mode, has been moved to base to make it easy for other
binaries to experiment with that mode.

Manual JNI registration can be disabled with a call to
base::android::DisableManualJniRegistration at the beginning of
JNI_OnLoad and this has been added to WebView. We plan to refactor the
Android library entry points to make it possible to avoid needing this
flag by just not calling JNI registration but the work is still ongoing;
the flag gets us the desired WebView startup time improvement in the
meantime.

BUG=442327

Review URL: https://codereview.chromium.org/920883002

Cr-Original-Commit-Position: refs/heads/master@{#317434}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 103bf19477cc121eee7a3c2bdc221f2874c971c3
2015-02-20 23:07:22 +00:00
brettw 99b3ec1638 Add more targets to GN check.
Fix errors. Most of the problems were in net. Moves CreateAndConnectStreamForTesting's declaration to the header corresponding to the file it's implemented in.

Adds the other directories that don't pass yet to the list commented out so
it's easier to see what's still left.

TBR=armansito@chromium.org

Review URL: https://codereview.chromium.org/936953004

Cr-Original-Commit-Position: refs/heads/master@{#317425}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bc44c0a95e9904154e2af47fb2dba8c37e169a13
2015-02-20 22:31:36 +00:00
dpranke 6b94cd7a12 Update Chomium's build files to work w/ latest GN binaries.
The latest GN binaries rename cpu_arch to current_cpu and/or target_cpu
as appropriate, build_cpu_arch to host_cpu, and os to current_os and target_os as appropriate.

R=brettw@chromium.org
TBR=ddorwin@chromium.org
EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
BUG=344767

Review URL: https://codereview.chromium.org/913373002

Cr-Original-Commit-Position: refs/heads/master@{#317223}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4327621a322c964a8bc6d1ef5a4534f0f877d63e
2015-02-20 02:56:07 +00:00
torne 84b157fe6d android: Hide JNI exports by default.
Hide JNI exported functions in Android binaries by default, unless the
target in question has explicitly set "use_native_jni_exports" to
indicate that it relies on the JVM's automatic symbol lookup mechanism.

The functions are simply demoted to hidden visibility; the code will
remain unless the linker determines that it is unreferenced and strips
it via --gc-sections.

This ensures that binaries by default actually test the explicit JNI
registration codepaths, which are required for compatibility with the
crazy linker, while still allowing binaries that do not require crazy
linker compatibility to choose to use the automatic mechanism in future.

BUG=442327

Review URL: https://codereview.chromium.org/843103003

Cr-Original-Commit-Position: refs/heads/master@{#316896}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9d90d85f73ca46847047ccbda270f25b637ccc86
2015-02-18 21:37:59 +00:00
brettw e432a315a0 Add //ipc to "gn check", work on base
This fixes the header issues in these directories and adds them to the list of targets to be checked.

Review URL: https://codereview.chromium.org/926593007

Cr-Original-Commit-Position: refs/heads/master@{#316705}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e75311d05a5839a37e20dbf8998080f2db9627ab
2015-02-17 23:57:20 +00:00
etiennej ffc31fc61e Change in android Java build rules for Mojo Java content handler
See https://codereview.chromium.org/898853006 for motivation

Review URL: https://codereview.chromium.org/910143003

Cr-Original-Commit-Position: refs/heads/master@{#315959}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 32a8a141c605f608f158801ea863784683e4dd2f
2015-02-12 11:30:13 +00:00
halton.huo ecccd44736 Add GN build support for Android 64-bit platforms.
gn now run with arg target_arch = "x64", arm64 and mips64el
releated changes are added as well but not verified.

BUG=none

Review URL: https://codereview.chromium.org/864173006

Cr-Original-Commit-Position: refs/heads/master@{#315680}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 98de73d11797b1b0ac7ac0b2f4234cb8f57bd2fc
2015-02-11 00:09:18 +00:00
aberent 272178b22a Make Chrome for Android dependent on Google Play Services
Various bits of Chrome for Android that are being upstreamed
(in particular Cast support) require Google Play Services.
This adds Google Play Services to the Android chrome_java
target.

Note that this uses a variable so that one can use an
alternative version of Google Play Services. This is
required for Chrome for Android development.

TBR=sky@chromium.org
BUG=450675

Review URL: https://codereview.chromium.org/865733002

Cr-Original-Commit-Position: refs/heads/master@{#315538}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c8db3ccbde213d09fac41060c0bf81d4a0020cda
2015-02-10 11:18:48 +00:00
jam b71a43c4fc Revert of Enable libc++ on Android (patchset #16 id:460001 of https://codereview.chromium.org/835633003/)
Reason for revert:
Slows down the slowest bot on CQ by 20 minutes.

BUG=456396

Original issue's description:
> Enable libc++ on Android
>
> Switch Chrome on Android to use libc++ instead of stlport. WebView AOSP
> builds will continue to use stlport for the time being.
>
> Note that this change is exploratory, and likely to be reverted before
> branch point (ensuring WebView and Chrome remain in lockstep with
> respect to standard library dependencies).
>
> BUG=427718
> TBR=cpu@chromium.org
>
> Committed: https://crrev.com/8681920fa22ded465054301ce96657a4ddaf2a04
> Cr-Commit-Position: refs/heads/master@{#315085}

TBR=fdegans@chromium.org,pasko@chromium.org,jamesr@chromium.org,thakis@chromium.org,boliu@chromium.org,davidben@chromium.org,cpu@chromium.org,piman@chromium.org,jdduke@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=427718

Review URL: https://codereview.chromium.org/903323002

Cr-Original-Commit-Position: refs/heads/master@{#315174}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f43ab9ce5b48ed622736d96c9fba9e8fa57858a3
2015-02-07 03:27:49 +00:00
jdduke 291fe204c7 Enable libc++ on Android
Switch Chrome on Android to use libc++ instead of stlport. WebView AOSP
builds will continue to use stlport for the time being.

Note that this change is exploratory, and likely to be reverted before
branch point (ensuring WebView and Chrome remain in lockstep with
respect to standard library dependencies).

BUG=427718
TBR=cpu@chromium.org

Review URL: https://codereview.chromium.org/835633003

Cr-Original-Commit-Position: refs/heads/master@{#315085}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8681920fa22ded465054301ce96657a4ddaf2a04
2015-02-06 19:33:41 +00:00
jbudorick 4f2c5356a5 [Android] Add a java version of the test server spawner.
BUG=448626

Review URL: https://codereview.chromium.org/867073002

Cr-Original-Commit-Position: refs/heads/master@{#313532}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e1799e662af4e87b1e6d501e3511628f8579174d
2015-01-28 17:11:41 +00:00
cjhopman 3d204626c7 Add apk native libs to the inputs of appropriate actions
Review URL: https://codereview.chromium.org/870093002

Cr-Original-Commit-Position: refs/heads/master@{#312933}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2a452669e7f48d4e163ffc5c8d7afbad73945bdd
2015-01-23 21:33:43 +00:00
qsr 4bd61eb9cd Move the test template to //testing/test.gni (part 2)
This CL move the test target from build/config/BUILDCONFIG.gn to testing/test.gni

It also update the test template to automatically build an apk on Android.

R=cjhopman@chromium.org,brettw@chromium.org

Review URL: https://codereview.chromium.org/824263004

Cr-Original-Commit-Position: refs/heads/master@{#312396}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fb5251d1ff4f36ea296da4be72ddf26a9e3e5643
2015-01-21 15:58:20 +00:00
jbudorick b8e0b2f124 [Android] Rename [Chromium -> Chrome]NativeTestInstrumentationTestRunner.
Motivated by http://www.chromium.org/developers/coding-style#Naming

BUG=428729

Review URL: https://codereview.chromium.org/804753005

Cr-Original-Commit-Position: refs/heads/master@{#310877}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7b40b73fea4cad08630bb87caeee64c5a8a061fe
2015-01-09 22:58:44 +00:00
qsr d0009ad748 Update unittest_apk target to allow specifying the name of the apk.
This is useful when we want to build a template that will automatically
construct a test on desktop platforms and a test apk on Android.

R=cjhopman@chromium.org

Review URL: https://codereview.chromium.org/833003004

Cr-Original-Commit-Position: refs/heads/master@{#310479}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e97f885871e033274a60af0d5fcd4e94f62ef92f
2015-01-08 11:41:00 +00:00
jbudorick 17a5f2e42e [Android] Create a dummy app to upload to Appurify for gtests.
BUG=428729

Review URL: https://codereview.chromium.org/833403002

Cr-Original-Commit-Position: refs/heads/master@{#310159}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 335cbe5177b3d0ec5d5564b646cb1a7b814c26d2
2015-01-06 22:27:36 +00:00
qsr 59870f85d8 Allow to add assets to test apks
R=cjhopman@chromium.org

Review URL: https://codereview.chromium.org/797503003

Cr-Original-Commit-Position: refs/heads/master@{#309414}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9bdb24aa8d920e57b81341a912dc18a7d24be5df
2014-12-22 10:38:27 +00:00
cjhopman 3e87889ec8 Fix some android configuration
This adds //chrome/test:test_support_unit to the root build targets for
Android. This target is used by downstream things and so adding it to
the root will ensure that it is buildable upstream. This requires making
the sync integration/performance stuff be not defined if !is_android
(since they depend on things that aren't defined on that platform).

Changes the internal configuration hooks to not require setting the sdk
information.

Makes unittest_apk actually forward datadeps.

BUG=359249
TBR=cpu

Review URL: https://codereview.chromium.org/758473002

Cr-Original-Commit-Position: refs/heads/master@{#307589}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 907644b0a7ddae52e3ef74a670df647fe61da5d9
2014-12-10 00:01:45 +00:00
ppi 22dd633466 GN + Android: extract android_standalone_library rule.
This patch extracts the rule needed to produce a standalone .dex.jar for
a set of Java dependencies into a separate rule. This allows to package
any android library into a standalone .dex.jar file without affecting
the target being packaged.

BUG=437290

Review URL: https://codereview.chromium.org/778093004

Cr-Original-Commit-Position: refs/heads/master@{#307575}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7d7c32ec12774eaf22c901194ff9f788a1dcc9b2
2014-12-09 23:09:35 +00:00
scottmg 317bbea2be gn format // (the rest, except mojo)
Excluded mojo because I think that needs to happen on the other side.

At gn --version = 306668 for which roll is in CQ.

R=brettw@chromium.org
TBR=scherkus@chromium.org
BUG=348474

Review URL: https://codereview.chromium.org/774353003

Cr-Original-Commit-Position: refs/heads/master@{#306708}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 34fb7e5919ed42dc800acf3961fe6a2bf9e7d6eb
2014-12-03 23:27:41 +00:00
pasko 80cd1adaa5 Revert "Use thumb versions of external libraries with ARMv7."
This reverts commit 3572927ce7c9ce6d528820f9575a93985f9309bf.

Reason: 9% regression on thread_renderer_compositor_cpu_time_per_frame/http___slashdot.org_.

BUG=431612
TBR=brettw

Review URL: https://codereview.chromium.org/772123003

Cr-Original-Commit-Position: refs/heads/master@{#306589}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e7f4fa57138c2ed44235456d8bcfbe165ad1938c
2014-12-03 11:47:39 +00:00
ppi 6f81a9f1aa GN + Android: support standalone .dex.jar output of Android libraries.
This patch allows to set .standalone_dex_path as a variable in the
android_library target. This puts all dependencies together with the
library code in one dex.jar file.

This is needed to produce bundles of Java code packaged as Mojo
applications on Android.

BUG=437290

Review URL: https://codereview.chromium.org/772493003

Cr-Original-Commit-Position: refs/heads/master@{#306455}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cc9dcc51638870318f1db8a8ef7b2b6440406292
2014-12-02 21:17:48 +00:00
scottmg fd96972e70 gn format //build
A starting point for doing all of src, and adding a PRESUBMIT.

Includes https://codereview.chromium.org/772663002/ and https://codereview.chromium.org/770053002/.
I haven't pushed new binaries yet.

Generated via:
> cd build
> git ls-files *.gn *.gni | sed -e "s/^/@..\\\\out\\\\Debug\\\\gn format --in-place /" >x.bat && x.bat

The only things that I don't love in the current output are:

1. Turning

    args = [
      "--depfile", rebase_path(depfile, root_build_dir),
      "--android-sdk-tools", rebased_android_sdk_build_tools,
      "--dex-path", rebased_output,
    ]

into:

    args = [
      "--depfile",
      rebase_path(depfile, root_build_dir),
      "--android-sdk-tools",
      rebased_android_sdk_build_tools,
      "--dex-path",
      rebased_output,
    ]

The heuristic for this isn't trivial though, and it also affects e.g. '-Xclang' in cflags, as well
as assignments to temporaries that are later assigned to args.

2. Turning single line

    if (defined(invoker.inputs)) { inputs = invoker.inputs }

into

    if (defined(invoker.inputs)) {
      inputs = invoker.inputs
    }

This could be argued to be an improvement, but as it's very boilerplate-y perhaps an exception to
allow single line in this case is worthwhile. I think there was discussion of new syntax for this
case too, something like "inputs ?= invoker.inputs" maybe.

In both cases, I think it's worthwhile to get formatting turned on, and then go back and special
case these if we decide it's worthwhile.

R=brettw@chromium.org
BUG=348474

Review URL: https://codereview.chromium.org/766573003

Cr-Original-Commit-Position: refs/heads/master@{#306305}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b199254f481c5db36d56e83fce40594b06d2b81f
2014-12-02 00:25:35 +00:00
ppi a1ca3c5715 GN + Android: allow to set visibility on android_library targets.
R=cjhopman@chromium.org
BUG=None

Review URL: https://codereview.chromium.org/755183004

Cr-Original-Commit-Position: refs/heads/master@{#305717}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 97ce2aed19d80cb905bdf7a165fd212fbdde54da
2014-11-25 23:01:42 +00:00
ppi bbdfb491b5 GN + Android: quick fix for stale assets in Android APKs.
BUG=433330
R=cjhopman@chromium.org

Review URL: https://codereview.chromium.org/757023003

Cr-Original-Commit-Position: refs/heads/master@{#305678}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fd44e88197169b5ca073e28efaa7016c2881e921
2014-11-25 20:03:16 +00:00
cjhopman da0f4fcf8d Add bypass_platform_checks option to java_library/binary
This allows a target to disable checks that prevent a java library from
depending on an android_library. This is required for the current way
that we build java unittests.

Also, remove provides_android_platform option. This was planned to
support unit tests, but it doesn't really work (at the top-level we want
to depend on both targets that require Android and ones that don't
support Android).

Also fixes some minor target definition issues.

TBR=cpu
BUG=359249

Review URL: https://codereview.chromium.org/739383004

Cr-Original-Commit-Position: refs/heads/master@{#305326}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7aac92d873502f8a9676bf6b3a95cdfa8cce82c5
2014-11-22 00:11:16 +00:00
cjhopman 6f30472a54 Greatly improve (non-android) java support
This change fixes java_library and java_prebuilt to actually construct a
classpath based on their dependents. It adds java_binary that is similar
to java_library but also creates a script in $root_build_dir/bin/ to
actually run a java jar (it builds in the classpath and main class so
that it can just be run like a normal executable).

Adds the flags "android" and "has_android_platform" to the java_library
template. An android_library can depend on a java_library only if the
java_libary has "android == true". A java_library can depend on an
android_library only if the java_libary has
"has_android_platform == true".

This merges several of the paths for compiling java between android and
non-android implementations into a single one that just takes a flag
controlling it's behavior (enabling/disabling dex, for example).

Adds a very simple java_binary target. This can be run to ensure it works,
output is printed, and exit code is propagated.

TBR=brettw
BUG=359249,383646,417843

Review URL: https://codereview.chromium.org/687633003

Cr-Original-Commit-Position: refs/heads/master@{#304555}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3d85c6dd6a6540699d3baf583780577327a0cd13
2014-11-18 03:40:00 +00:00
qsr f3ea4c93b7 GN: Have android_apk always look for stripped libraries.
R=cjhopman@chromium.org
TBR=tedchoc@chromium.org

Review URL: https://codereview.chromium.org/721123002

Cr-Original-Commit-Position: refs/heads/master@{#304405}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: acc3fd852e38c4df2246412376c6429926c99a8c
2014-11-17 10:59:39 +00:00
mkosiba 97de8b769b Add support for shared library resources to java_apk build rules for real.
In https://crrev.com/f90b7151cb809d8ec9ab31f7be9e9f8f575fd4d0 I added support
for the process_resources rule but support in package_resources is needed to
generate a compatible .apk file.

BUG=430997

Review URL: https://codereview.chromium.org/724933002

Cr-Original-Commit-Position: refs/heads/master@{#304097}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e5c9c76ba67333b430debcaaa5d4880e801114d5
2014-11-13 22:38:15 +00:00
mkosiba 477078ea61 Add support for shared library resources to java_apk build rules.
BUG=430997

Review URL: https://codereview.chromium.org/708883003

Cr-Original-Commit-Position: refs/heads/master@{#303351}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f90b7151cb809d8ec9ab31f7be9e9f8f575fd4d0
2014-11-08 02:08:53 +00:00
fdegans a6cfe58448 Use thumb versions of external libraries with ARMv7.
Previously, we were using the non-thumb versions of these libraries.
This should save around 60 kiB in binary size.
This also includes some minor style fix in build/common.gypi

Review URL: https://codereview.chromium.org/695333003

Cr-Original-Commit-Position: refs/heads/master@{#303015}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3572927ce7c9ce6d528820f9575a93985f9309bf
2014-11-06 12:28:25 +00:00
qsr a3df1ca722 [Android] Fix gn build for instrumentation tests.
This fixes the following issue:
- allow forwarder2 to compile with clang
- Makes android executables position independant so that they can be run
  on android devices
- Add missing BUILD.gn

TBR=brettw@chromium.org

Review URL: https://codereview.chromium.org/684133002

Cr-Original-Commit-Position: refs/heads/master@{#302429}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cad816ee8f32cdec09c26bdc8fbbe881ceeb053d
2014-11-03 15:37:41 +00:00
torne 048586999d Remove obsolete "android_src" gyp/gn variable.
Now that the android webview build uses the NDK there is no longer any
need to refer to the root of the android source tree; remove the
variable to prevent any new uses being introduced.

BUG=

Review URL: https://codereview.chromium.org/692503002

Cr-Original-Commit-Position: refs/heads/master@{#301863}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dcdc0932a5809b3e8bdebb81051b429bbf9786fc
2014-10-29 17:27:18 +00:00
fdegans 67078467e8 Reland Roll android_tools and breakpad to the latest.
Compared to the previous CL, this picks up in breakpad:
Fix breakpad on mips and x86_64 for the NDK r10c update.

Original issue's description:
> Revert of Roll android_tools and breakpad to the latest. (patchset #5 id:80001 of https://codereview.chromium.org/671633003/)
>
> Reason for revert:
> Downstream x64 and mips bots didn't like it.
>
> Original issue's description:
> > Roll android_tools and breakpad to the latest.
> >
> > This picks up in android_tools:
> > Updated SDK build tools to 21.0.1 and removed old versions.
> > Upgrade NDK to r10c.
> >
> > And in breakpad:
> > Update breakpad to support Android NDK r10c
> > Fixing the Mac Inspector build by adding the launch_report dependency to the breakpadUtilities dylib project after it got pulled out from Inspector.mm.
> > Refactor .so name detection logic in minidump/linux_dumper.
> > The process uptime computation when the Windows out-of-process Crash Generation Server is used is done by subtracting the crashing process creation time from the current time when the crash is generated.
> > Linux multiprocess crash reporter: use pipe instead of socketpair in the client.
> > Remove workaround for Linux credential-passing bug.
> >
> > TBR=brettw, danakj
> > NOTRY=true
> > BUG=424680, 425077, 358831
> >
> > Committed: https://crrev.com/79bd5f12620f81dd241984d925b87a888e1dc37b
> > Cr-Commit-Position: refs/heads/master@{#300671}
>
> TBR=brettw@chromium.org,primiano@chromium.org,rmcilroy@chromium.org,aurimas@chromium.org,danakj@chromium.org,fdegans@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=424680, 425077, 358831
>
> Committed: https://crrev.com/e6319d7f7d5c2fc96c9cb1f5a81ae16bde19f068
> Cr-Commit-Position: refs/heads/master@{#300688}

TBR=brettw@chromium.org,primiano@chromium.org,rmcilroy@chromium.org,aurimas@chromium.org,danakj@chromium.org,ppi@chromium.org
BUG=424680, 425077, 358831

Review URL: https://codereview.chromium.org/676483002

Cr-Original-Commit-Position: refs/heads/master@{#301087}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 27660a3c6e308e9293745697433747e0a4fafae0
2014-10-24 13:00:37 +00:00
cjhopman aca1725e50 GN: Some small changes to support chrome android internal stuff
This actually hooks up (i.e. passes from invoker) several variables
controlling apk creation (version name, version code,
use_relocation_packer, use_chromium_linker, unzip_libraries_from_apk).

Adds support for overriding some configuration in the private repo.

Adds support for public_configs in grit_rule.gni.

Adds some junit targets (these are built as android libraries currently
instead of host libraries, but that just means we do a bit extra work
that we don't really need).

BUG=359249

Review URL: https://codereview.chromium.org/659703002

Cr-Original-Commit-Position: refs/heads/master@{#301039}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ca675d3ec565477b2e3bae8b0709a412d029fa21
2014-10-24 03:51:23 +00:00
cjhopman 42abe1e4b2 GN: make relocation packing work
This adds pretty straightforward conversion of the relocation package
gyp targets.

The android_apk template is updated to use pack_arm_relocations.py
instead of copy_ex.py for copying native libraries into the directory
used to build the apk.  This script will copy the files when relocation
packing is disabled and otherwise will do the relocation packing (just
like it does in gyp).

BUG=359249

Review URL: https://codereview.chromium.org/650933003

Cr-Original-Commit-Position: refs/heads/master@{#300969}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 284a11b8e10b24d85247dc447dfb3ae812b75f91
2014-10-23 23:03:46 +00:00
mkosiba c43826dafd Final step of the java_cpp_template -> java_cpp_enum migration.
This CL migrates the remaining gyp/gn rules away from the
java_cpp_template rule.

BUG=405532

Review URL: https://codereview.chromium.org/659493003

Cr-Original-Commit-Position: refs/heads/master@{#300881}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dfdc7fb2bcde7ea4a9458967fdc5f7fa15abb3fa
2014-10-23 13:56:31 +00:00
cjhopman e6fc4f17db GN: Enable loading libraries from apks
This enables all the bits for an apk that uses uncompressed native
libraries that are loaded directly from the apk without being extracted
on the device.

BUG=359249
TBR=brettw
NOTRY=true

Review URL: https://codereview.chromium.org/654383002

Cr-Original-Commit-Position: refs/heads/master@{#300814}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3151133068b2d1cfd44af0e8a546b640989aeb3d
2014-10-23 01:05:36 +00:00
ppi 5e474c8d62 Revert of Roll android_tools and breakpad to the latest. (patchset #5 id:80001 of https://codereview.chromium.org/671633003/)
Reason for revert:
Downstream x64 and mips bots didn't like it.

Original issue's description:
> Roll android_tools and breakpad to the latest.
>
> This picks up in android_tools:
> Updated SDK build tools to 21.0.1 and removed old versions.
> Upgrade NDK to r10c.
>
> And in breakpad:
> Update breakpad to support Android NDK r10c
> Fixing the Mac Inspector build by adding the launch_report dependency to the breakpadUtilities dylib project after it got pulled out from Inspector.mm.
> Refactor .so name detection logic in minidump/linux_dumper.
> The process uptime computation when the Windows out-of-process Crash Generation Server is used is done by subtracting the crashing process creation time from the current time when the crash is generated.
> Linux multiprocess crash reporter: use pipe instead of socketpair in the client.
> Remove workaround for Linux credential-passing bug.
>
> TBR=brettw, danakj
> NOTRY=true
> BUG=424680, 425077, 358831
>
> Committed: https://crrev.com/79bd5f12620f81dd241984d925b87a888e1dc37b
> Cr-Commit-Position: refs/heads/master@{#300671}

TBR=brettw@chromium.org,primiano@chromium.org,rmcilroy@chromium.org,aurimas@chromium.org,danakj@chromium.org,fdegans@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=424680, 425077, 358831

Review URL: https://codereview.chromium.org/676453002

Cr-Original-Commit-Position: refs/heads/master@{#300688}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e6319d7f7d5c2fc96c9cb1f5a81ae16bde19f068
2014-10-22 16:41:32 +00:00
fdegans e0463104af Roll android_tools and breakpad to the latest.
This picks up in android_tools:
Updated SDK build tools to 21.0.1 and removed old versions.
Upgrade NDK to r10c.

And in breakpad:
Update breakpad to support Android NDK r10c
Fixing the Mac Inspector build by adding the launch_report dependency to the breakpadUtilities dylib project after it got pulled out from Inspector.mm.
Refactor .so name detection logic in minidump/linux_dumper.
The process uptime computation when the Windows out-of-process Crash Generation Server is used is done by subtracting the crashing process creation time from the current time when the crash is generated.
Linux multiprocess crash reporter: use pipe instead of socketpair in the client.
Remove workaround for Linux credential-passing bug.

TBR=brettw, danakj
NOTRY=true
BUG=424680, 425077, 358831

Review URL: https://codereview.chromium.org/671633003

Cr-Original-Commit-Position: refs/heads/master@{#300671}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 79bd5f12620f81dd241984d925b87a888e1dc37b
2014-10-22 12:58:41 +00:00