summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authortorne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-09 11:33:38 +0000
committertorne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-09 11:33:38 +0000
commitb4193654b32b8d35e8f77d1a57317db1ef489c88 (patch)
tree9f35f414b4c8564301696bb26fa73a1e32c229ab /build
parente78fc02f46d81ffef419abcbece034ff55871105 (diff)
downloadchromium_src-b4193654b32b8d35e8f77d1a57317db1ef489c88.zip
chromium_src-b4193654b32b8d35e8f77d1a57317db1ef489c88.tar.gz
chromium_src-b4193654b32b8d35e8f77d1a57317db1ef489c88.tar.bz2
Revert 275652 "Remove unneeded JNI registrations."
This has broken the Android WebView build by introducing an absolute path into the generated makefiles, rendering them nonportable. > Remove unneeded JNI registrations. > > Rather than registering all jni bindings at startup, only get references > to the class object for those files which require bindings. All others > are satisfied by exporting symbols which can be found automatically by > dalvik. > > This patch replaces excldue-libs=ALL with ld version script to strip unwanted > symbols: https://sourceware.org/binutils/docs-2.24/ld/VERSION.html#VERSION > > BUG= > > Review URL: https://codereview.chromium.org/147533004 TBR=sl.ostapenko@samsung.com Review URL: https://codereview.chromium.org/326603002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/android/android_exports.lst14
-rw-r--r--build/common.gypi19
-rw-r--r--build/jar_file_jni_generator.gypi1
-rw-r--r--build/jni_generator.gypi1
4 files changed, 8 insertions, 27 deletions
diff --git a/build/android/android_exports.lst b/build/android/android_exports.lst
deleted file mode 100644
index 820d6ec..0000000
--- a/build/android/android_exports.lst
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Default exports specification for chromium shared libraries on android.
-# Check ld version script manual:
-# https://sourceware.org/binutils/docs-2.24/ld/VERSION.html#VERSION
-
-{
- global:
- Java_*_native*;
- JNI_OnLoad;
- local: *;
-};
diff --git a/build/common.gypi b/build/common.gypi
index a1a9b79..73c2a44 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1731,9 +1731,6 @@
# Copy it out one scope.
'android_webview_build%': '<(android_webview_build)',
-
- # Default android linker script for shared library exports.
- 'android_linker_script%': '<!(cd <(DEPTH) && pwd -P)/build/android/android_exports.lst',
}], # OS=="android"
['android_webview_build==1', {
# When building the WebView in the Android tree, jarjar will remap all
@@ -4153,13 +4150,7 @@
},
'target_conditions': [
['_type=="shared_library"', {
- 'product_extension': '<(android_product_extension)',
- }],
- ['_toolset=="target" and component=="static_library" and _type=="shared_library"', {
- 'ldflags': [
- # Only export symbols that are specified in version script.
- '-Wl,--version-script=<(android_linker_script)',
- ],
+ 'product_extension': '<(android_product_extension)',
}],
# Settings for building device targets using Android's toolchain.
@@ -4225,7 +4216,8 @@
'ldflags': [
'-nostdlib',
'-Wl,--no-undefined',
-
+ # Don't export symbols from statically linked libraries.
+ '-Wl,--exclude-libs=ALL',
],
'libraries': [
'-l<(android_stlport_library)',
@@ -4236,6 +4228,11 @@
'-lm',
],
'conditions': [
+ ['component=="shared_library"', {
+ 'ldflags!': [
+ '-Wl,--exclude-libs=ALL',
+ ],
+ }],
['clang==1', {
'cflags': [
# Work around incompatibilities between bionic and clang
diff --git a/build/jar_file_jni_generator.gypi b/build/jar_file_jni_generator.gypi
index 59ab64e..dc43c49 100644
--- a/build/jar_file_jni_generator.gypi
+++ b/build/jar_file_jni_generator.gypi
@@ -54,7 +54,6 @@
'<(jni_generator_includes)',
'--optimize_generation',
'<(optimize_jni_generation)',
- '--native_exports',
],
'message': 'Generating JNI bindings from <(input_jar_file)/<(input_java_class)',
'process_outputs_as_sources': 1,
diff --git a/build/jni_generator.gypi b/build/jni_generator.gypi
index da4b880..da99331 100644
--- a/build/jni_generator.gypi
+++ b/build/jni_generator.gypi
@@ -61,7 +61,6 @@
'<(jni_generator_jarjar_file)',
'--ptr_type',
'<(jni_generator_ptr_type)',
- '--native_exports',
],
'message': 'Generating JNI bindings from <(RULE_INPUT_PATH)',
'process_outputs_as_sources': 1,