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.

Review URL: https://chromiumcodereview.appspot.com/11262003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ulan@chromium.org 2012-10-24 12:11:15 +00:00
parent 7fe6eb5c8e
commit cb7645b43b
2 changed files with 8 additions and 2 deletions

View File

@ -53,6 +53,7 @@ Sanjoy Das <sanjoy@playingwithpointers.com>
Subrato K De <subratokde@codeaurora.org>
Tobias Burnus <burnus@net-b.de>
Vlad Burlik <vladbph@gmail.com>
Xi Qian <xi.qian@intel.com>
Yuqiang Xian <yuqiang.xian@intel.com>
Zaheer Ahmad <zahmad@codeaurora.org>
Zhongping Wang <kewpie.w.zp@gmail.com>

View File

@ -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,6 +217,13 @@
['_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',
],
}],
],