Index: build/jar_file_jni_generator.gypi |
diff --git a/build/jar_file_jni_generator.gypi b/build/jar_file_jni_generator.gypi |
index dc43c49070d2efe5e1372ba2f62ac66a9beaa461..b5c6e68904d5c293f1bda40e75f602d8b9ddfc8a 100644 |
--- a/build/jar_file_jni_generator.gypi |
+++ b/build/jar_file_jni_generator.gypi |
@@ -27,6 +27,9 @@ |
'base/android/jni_generator/jni_generator_helper.h' |
), |
}, |
+ 'dependencies': [ |
+ '<(DEPTH)/build/linker_script_copy.gyp:linker_script_copy', |
+ ], |
'actions': [ |
{ |
'action_name': 'generate_jni_headers_from_jar_file', |
@@ -54,6 +57,7 @@ |
'<(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, |
@@ -62,4 +66,17 @@ |
# 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', |
+ ], |
+ }, |
+ }], |
+ ], |
} |