summaryrefslogtreecommitdiff
path: root/configure.py
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagn@cs.stanford.edu>2017-09-24 16:11:48 -0700
committerMyles Borins <mylesborins@google.com>2019-12-13 10:50:39 -0500
commitd1c4fccde2c667e69bbd5cf1f83f76f64c90e198 (patch)
tree1679b053765365d0a88cedd258a28baa91b039a9 /configure.py
parent0379fb65c17fa0a9aa67d43c7b08e4507b440ece (diff)
downloadnode-new-d1c4fccde2c667e69bbd5cf1f83f76f64c90e198.tar.gz
build: fix library version and compile flags on Android
Compiling a library with -fPIE won't do, and on Android libraries are not versioned. PR-URL: https://github.com/nodejs/node/pull/29388 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.py b/configure.py
index a5e5610ba7..fb6a316118 100755
--- a/configure.py
+++ b/configure.py
@@ -1122,14 +1122,17 @@ def configure_node(o):
o['variables']['node_shared'] = b(options.shared)
node_module_version = getmoduleversion.get_version()
- if sys.platform == 'darwin':
+ if options.dest_os == 'android':
+ shlib_suffix = 'so'
+ elif sys.platform == 'darwin':
shlib_suffix = '%s.dylib'
elif sys.platform.startswith('aix'):
shlib_suffix = '%s.a'
else:
shlib_suffix = 'so.%s'
+ if '%s' in shlib_suffix:
+ shlib_suffix %= node_module_version
- shlib_suffix %= node_module_version
o['variables']['node_module_version'] = int(node_module_version)
o['variables']['shlib_suffix'] = shlib_suffix