Reviewers: Jakob, ulan,
Message:
Hi, Jakob and ulan
The shared library version will fail due to link error for android. This
change
adds necessary objects and exports symbols for shared library to fix the
failures. Would you please review it?
Thanks,
-Xi
Description:
Enable shared library on android
This change fixed link errors in building shared library
for android. crtbegin_so.o is added to resolve dso_handle
and exclude-libs option is removed for shared library.
Please review this at
https://codereview.chromium.org/11262003/
SVN Base:
http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M AUTHORS
M build/android.gypi
Index: AUTHORS
===================================================================
--- AUTHORS (revision 12799)
+++ AUTHORS (working copy)
@@ -25,6 +25,7 @@
Fedor Indutny <
fe...@indutny.com>
Filipe David Manana <
fdma...@gmail.com>
Haitao Feng <
haita...@intel.com>
+Xi Qian <
xi....@intel.com>
Ioseb Dzmanashvili <
ioseb.dzm...@gmail.com>
Jan de Mooij <
jande...@gmail.com>
Jay Freeman <
sau...@saurik.com>
Index: build/android.gypi
===================================================================
--- build/android.gypi (revision 12799)
+++ build/android.gypi (working copy)
@@ -122,8 +122,6 @@
'ldflags': [
'-nostdlib',
'-Wl,--no-undefined',
- # Don't export symbols from statically linked libraries.
- '-Wl,--exclude-libs=ALL',
],
'libraries!': [
'-lrt', # librt is built into Bionic.
@@ -219,8 +217,15 @@
['_type=="shared_library"', {
'ldflags': [
'-Wl,-shared,-Bsymbolic',
+ '<(android_lib)/crtbegin_so.o',
],
}],
+ ['_type=="static_library"', {
+ 'ldflags': [
+ # Don't export symbols from statically linked libraries.
+ '-Wl,--exclude-libs=ALL',
+ ],
+ }],
],
}], # _toolset=="target"
# Settings for building host targets using the system toolchain.