Index: build/jni_generator.gypi |
diff --git a/build/jni_generator.gypi b/build/jni_generator.gypi |
index da99331ec522bfc27a3e544c40614bdd025c76ea..9feed28e7016c2e1dde81f4e52c5ff04bbc5b712 100644 |
--- a/build/jni_generator.gypi |
+++ b/build/jni_generator.gypi |
@@ -37,6 +37,9 @@ |
'base/android/jni_generator/jni_generator_helper.h' |
), |
}, |
+ 'dependencies': [ |
+ '<(DEPTH)/build/linker_script_copy.gyp:linker_script_copy', |
+ ], |
'rules': [ |
{ |
'rule_name': 'generate_jni_headers', |
@@ -61,6 +64,7 @@ |
'<(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, |
@@ -81,4 +85,18 @@ |
# This target exports a hard dependency because it generates header |
# files. |
'hard_dependency': 1, |
+ 'conditions': [ |
+ ['component=="static_library"', { |
+ 'link_settings': { |
+ 'ldflags': [ |
+ # Only export symbols that are specified in version script. |
+ '-Wl,--version-script=<(android_linker_script)', |
+ ], |
+ 'ldflags!': [ |
+ '-Wl,--exclude-libs=ALL', |
+ ], |
+ }, |
+ }], |
+ ], |
} |
+ |