Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 65e67cb

Browse filesBrowse files
gcampaxtargos
authored andcommitted
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: #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>
1 parent 70dc7a2 commit 65e67cb
Copy full SHA for 65e67cb

File tree

Expand file treeCollapse file tree

2 files changed

+9
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+9
-6
lines changed
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@
161161
'ldflags': [ '-Wl,-bbigtoc' ],
162162
}],
163163
['OS == "android"', {
164-
'cflags': [ '-fPIE' ],
165-
'ldflags': [ '-fPIE', '-pie' ]
164+
'cflags': [ '-fPIC' ],
165+
'ldflags': [ '-fPIC' ]
166166
}],
167167
],
168168
'msvs_settings': {
@@ -221,8 +221,8 @@
221221
],
222222
},],
223223
['OS == "android"', {
224-
'cflags': [ '-fPIE' ],
225-
'ldflags': [ '-fPIE', '-pie' ]
224+
'cflags': [ '-fPIC' ],
225+
'ldflags': [ '-fPIC' ]
226226
}],
227227
],
228228
'msvs_settings': {
Collapse file

‎configure.py‎

Copy file name to clipboardExpand all lines: configure.py
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,14 +1089,17 @@ def configure_node(o):
10891089
o['variables']['node_shared'] = b(options.shared)
10901090
node_module_version = getmoduleversion.get_version()
10911091

1092-
if sys.platform == 'darwin':
1092+
if options.dest_os == 'android':
1093+
shlib_suffix = 'so'
1094+
elif sys.platform == 'darwin':
10931095
shlib_suffix = '%s.dylib'
10941096
elif sys.platform.startswith('aix'):
10951097
shlib_suffix = '%s.a'
10961098
else:
10971099
shlib_suffix = 'so.%s'
1100+
if '%s' in shlib_suffix:
1101+
shlib_suffix %= node_module_version
10981102

1099-
shlib_suffix %= node_module_version
11001103
o['variables']['node_module_version'] = int(node_module_version)
11011104
o['variables']['shlib_suffix'] = shlib_suffix
11021105

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.