| Index: build/java_apk.gypi
|
| diff --git a/build/java_apk.gypi b/build/java_apk.gypi
|
| index d8a6cacf3e8e75fcd841a00990b0d3db3f5c47e5..41a82c3cd5cc236a162a44dd77fe5ef4d536bebd 100644
|
| --- a/build/java_apk.gypi
|
| +++ b/build/java_apk.gypi
|
| @@ -48,6 +48,8 @@
|
| # strings.xml files, if any.
|
| # library_manifest_paths'- Paths to additional AndroidManifest.xml files from
|
| # libraries.
|
| +# use_crazy_linker - Enable the crazy linker that allows sharing the RELRO
|
| +# section of the native libraries between the different processes.
|
|
|
| {
|
| 'variables': {
|
| @@ -116,6 +118,7 @@
|
| 'variables': {
|
| 'variables': {
|
| 'native_lib_target%': '',
|
| + 'use_crazy_linker%': 0,
|
| },
|
| 'conditions': [
|
| ['gyp_managed_install == 1 and native_lib_target != ""', {
|
| @@ -131,6 +134,7 @@
|
| ],
|
| },
|
| 'native_lib_target%': '',
|
| + 'use_crazy_linker%': 0,
|
| 'emma_instrument': '<(emma_coverage)',
|
| 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)',
|
| 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)',
|
| @@ -163,6 +167,11 @@
|
| '<(DEPTH)/build/android/setup.gyp:copy_system_libraries',
|
| ],
|
| }],
|
| + ['use_crazy_linker == 1', {
|
| + 'dependencies': [
|
| + '<(DEPTH)/base/base.gyp:crazy_linker',
|
| + ],
|
| + }],
|
| ['native_lib_target != ""', {
|
| 'variables': {
|
| 'compile_input_paths': [ '<(native_libraries_java_stamp)' ],
|
| @@ -188,7 +197,23 @@
|
| 'actions': [
|
| {
|
| 'variables': {
|
| - 'input_libraries': ['<@(native_libs_paths)'],
|
| + 'conditions': [
|
| + ['use_crazy_linker == 1', {
|
| + 'variables': {
|
| + 'linker_input_libraries': [
|
| + '<(PRODUCT_DIR)/lib/libcrazy_linker.>(android_product_extension)',
|
| + ],
|
| + }
|
| + }, {
|
| + 'variables': {
|
| + 'linker_input_libraries': [],
|
| + },
|
| + }],
|
| + ],
|
| + 'input_libraries': [
|
| + '<@(native_libs_paths)',
|
| + '<@(linker_input_libraries)',
|
| + ],
|
| },
|
| 'includes': ['../build/android/write_ordered_libraries.gypi'],
|
| },
|
| @@ -212,6 +237,24 @@
|
| },
|
| {
|
| 'action_name': 'native_libraries_<(_target_name)',
|
| + 'variables': {
|
| + 'conditions': [
|
| + ['use_crazy_linker == 1', {
|
| + 'variables': {
|
| + 'additional_gcc_preprocess_defines': [
|
| + '-D', 'ENABLE_CRAZY_LINKER',
|
| + ],
|
| + }
|
| + }, {
|
| + 'variables': {
|
| + 'additional_gcc_preprocess_defines': [],
|
| + },
|
| + }],
|
| + ],
|
| + 'gcc_preprocess_defines': [
|
| + '<@(additional_gcc_preprocess_defines)',
|
| + ],
|
| + },
|
| 'message': 'Creating NativeLibraries.java for <(_target_name).',
|
| 'inputs': [
|
| '<(DEPTH)/build/android/gyp/util/build_utils.py',
|
| @@ -228,6 +271,7 @@
|
| '--output=<(native_libraries_java_file)',
|
| '--template=<(native_libraries_template)',
|
| '--stamp=<(native_libraries_java_stamp)',
|
| + '<@(gcc_preprocess_defines)',
|
| ],
|
| },
|
| {
|
|
|