tools: fix usage of inherited -fPIC and -fPIE

PR-URL: https://github.com/nodejs/node-gyp/pull/1340
Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
Jens 2018-10-20 23:14:58 +02:00 committed by Rod Vagg
parent 8a83972743
commit 6f5a408934
No known key found for this signature in database
GPG key ID: C273792F7D83545D

View file

@ -55,6 +55,14 @@
'standalone_static_library': '<(standalone_static_library)'
}],
['_type!="executable"', {
'conditions': [
[ 'OS=="android"', {
'cflags!': [ '-fPIE' ],
}]
]
}],
['_win_delay_load_hook=="true"', {
# If the addon specifies `'win_delay_load_hook': 'true'` in its
# binding.gyp, link a delay-load hook into the DLL. This hook ensures
@ -138,10 +146,10 @@
'_FILE_OFFSET_BITS=64'
],
}],
[ 'OS in "freebsd openbsd netbsd solaris" or \
[ 'OS in "freebsd openbsd netbsd solaris android" or \
(OS=="linux" and target_arch!="ia32")', {
'cflags': [ '-fPIC' ],
}]
}],
]
}
}