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
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
'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
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
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
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
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.orgTBR=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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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