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

Unified Diff: build/java_apk.gypi

Issue 23717023: Android: Add chrome-specific dynamic linker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Trivial rebase. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/java_apk.gypi
diff --git a/build/java_apk.gypi b/build/java_apk.gypi
index 81984472af783bf1c63be267c3f08880ceeb777d..ce2f04a6f055ec4d4e58e81bd147e9d448fa92f8 100644
--- a/build/java_apk.gypi
+++ b/build/java_apk.gypi
@@ -48,7 +48,11 @@
# strings.xml files, if any.
# library_manifest_paths'- Paths to additional AndroidManifest.xml files from
# libraries.
-
+# use_chrome_linker - Enable the chrome dynamic linker that allows sharing the
+# RELRO section of the native libraries between the different processes.
+# enable_chrome_linker_tests - Enable the chrome dynamic linker test support
+# code. This allows a test APK to inject a Linker.TestRunner instance at
+# runtime. Should only be used by the content_linker_test_apk target!!
{
'variables': {
'additional_input_paths': [],
@@ -116,6 +120,8 @@
'variables': {
'variables': {
'native_lib_target%': '',
+ 'use_chrome_linker%': 0,
+ 'enable_chrome_linker_tests%': 0,
},
'conditions': [
['gyp_managed_install == 1 and native_lib_target != ""', {
@@ -131,6 +137,8 @@
],
},
'native_lib_target%': '',
+ 'use_chrome_linker%': 0,
+ 'enable_chrome_linker_tests%': 0,
'emma_instrument': '<(emma_coverage)',
'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)',
'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)',
@@ -164,6 +172,11 @@
'<(DEPTH)/build/android/setup.gyp:copy_system_libraries',
],
}],
+ ['use_chrome_linker == 1', {
+ 'dependencies': [
+ '<(DEPTH)/content/content.gyp:content_android_linker',
+ ],
+ }],
['native_lib_target != ""', {
'variables': {
'compile_input_paths': [ '<(native_libraries_java_stamp)' ],
@@ -190,9 +203,23 @@
'actions': [
{
'variables': {
+ 'conditions': [
+ ['use_chrome_linker == 1', {
+ 'variables': {
+ 'linker_input_libraries': [
+ '<(PRODUCT_DIR)/lib/libcontent_android_linker.>(android_product_extension)',
+ ],
+ }
+ }, {
+ 'variables': {
+ 'linker_input_libraries': [],
+ },
+ }],
+ ],
'input_libraries': [
'<@(native_libs_paths)',
'<@(extra_native_libs)',
+ '<@(linker_input_libraries)',
],
},
'includes': ['../build/android/write_ordered_libraries.gypi'],
@@ -217,6 +244,36 @@
},
{
'action_name': 'native_libraries_<(_target_name)',
+ 'variables': {
+ 'conditions': [
+ ['use_chrome_linker == 1', {
+ 'variables': {
+ 'linker_gcc_preprocess_defines': [
+ '-D', 'ENABLE_CHROME_LINKER',
+ ],
+ }
+ }, {
+ 'variables': {
+ 'linker_gcc_preprocess_defines': [],
+ },
+ }],
+ ['enable_chrome_linker_tests == 1', {
+ 'variables': {
+ 'linker_tests_gcc_preprocess_defines': [
+ '-D', 'ENABLE_CHROME_LINKER_TESTS',
+ ],
+ }
+ }, {
+ 'variables': {
+ 'linker_tests_gcc_preprocess_defines': [],
+ },
+ }],
+ ],
+ 'gcc_preprocess_defines': [
+ '<@(linker_gcc_preprocess_defines)',
+ '<@(linker_tests_gcc_preprocess_defines)',
+ ],
+ },
'message': 'Creating NativeLibraries.java for <(_target_name).',
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
@@ -233,6 +290,7 @@
'--output=<(native_libraries_java_file)',
'--template=<(native_libraries_template)',
'--stamp=<(native_libraries_java_stamp)',
+ '<@(gcc_preprocess_defines)',
],
},
{

Powered by Google App Engine
This is Rietveld 408576698