Enable shared library on android (issue 11262003)

11 views
Skip to first unread message

xi....@intel.com

unread,
Oct 23, 2012, 10:42:02 PM10/23/12
to jkum...@chromium.org, ul...@chromium.org, v8-...@googlegroups.com
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.


jkum...@chromium.org

unread,
Oct 24, 2012, 4:41:44 AM10/24/12
to xi....@intel.com, ul...@chromium.org, v8-...@googlegroups.com
Two comments, otherwise LGTM.

Ulan, any comments?


https://codereview.chromium.org/11262003/diff/1/AUTHORS
File AUTHORS (right):

https://codereview.chromium.org/11262003/diff/1/AUTHORS#newcode28
AUTHORS:28: Xi Qian <xi....@intel.com>
Please keep this list sorted alphabetically.

https://codereview.chromium.org/11262003/diff/1/build/android.gypi
File build/android.gypi (right):

https://codereview.chromium.org/11262003/diff/1/build/android.gypi#newcode226
build/android.gypi:226: '-Wl,--exclude-libs=ALL',
nit: indentation (align with the line above please)

https://codereview.chromium.org/11262003/

ul...@chromium.org

unread,
Oct 24, 2012, 4:49:16 AM10/24/12
to xi....@intel.com, jkum...@chromium.org, v8-...@googlegroups.com
> Ulan, any comments?
LGTM too.

https://codereview.chromium.org/11262003/

xi....@intel.com

unread,
Oct 24, 2012, 4:53:29 AM10/24/12
to jkum...@chromium.org, ul...@chromium.org, v8-...@googlegroups.com
On 2012/10/24 08:49:16, ulan wrote:
> > Ulan, any comments?
> LGTM too.

Thank you, Jakob and Ulan. I just updated the files according to your
suggestions. Would you please review it again?

Thanks,
-Xi

https://codereview.chromium.org/11262003/

ul...@chromium.org

unread,
Oct 24, 2012, 5:42:24 AM10/24/12
to xi....@intel.com, jkum...@chromium.org, v8-...@googlegroups.com
Thanks, I will land it for you.

https://codereview.chromium.org/11262003/

xi....@intel.com

unread,
Oct 24, 2012, 9:49:42 PM10/24/12
to jkum...@chromium.org, ul...@chromium.org, v8-...@googlegroups.com
On 2012/10/24 09:42:24, ulan wrote:
> Thanks, I will land it for you.

Thank you, Ulan.

-Xi

https://codereview.chromium.org/11262003/
Reply all
Reply to author
Forward
0 new messages