Skip to content

Commit 6f5a408

Browse files
arrkiinrvagg
authored andcommitted
tools: fix usage of inherited -fPIC and -fPIE
PR-URL: #1340 Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent 8a83972 commit 6f5a408

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

addon.gypi

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@
5555
'standalone_static_library': '<(standalone_static_library)'
5656
}],
5757

58+
['_type!="executable"', {
59+
'conditions': [
60+
[ 'OS=="android"', {
61+
'cflags!': [ '-fPIE' ],
62+
}]
63+
]
64+
}],
65+
5866
['_win_delay_load_hook=="true"', {
5967
# If the addon specifies `'win_delay_load_hook': 'true'` in its
6068
# binding.gyp, link a delay-load hook into the DLL. This hook ensures
@@ -138,10 +146,10 @@
138146
'_FILE_OFFSET_BITS=64'
139147
],
140148
}],
141-
[ 'OS in "freebsd openbsd netbsd solaris" or \
149+
[ 'OS in "freebsd openbsd netbsd solaris android" or \
142150
(OS=="linux" and target_arch!="ia32")', {
143151
'cflags': [ '-fPIC' ],
144-
}]
152+
}],
145153
]
146154
}
147155
}

0 commit comments

Comments
 (0)