Skip to content

Commit

Permalink
tools: fix usage of inherited -fPIC and -fPIE
Browse files Browse the repository at this point in the history
PR-URL: #1340
Reviewed-By: Refael Ackermann <[email protected]>
  • Loading branch information
arrkiin authored and rvagg committed Apr 24, 2019
1 parent 8a83972 commit 6f5a408
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions addon.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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' ],
}]
}],
]
}
}

0 comments on commit 6f5a408

Please sign in to comment.