summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.gypi6
1 files changed, 4 insertions, 2 deletions
diff --git a/common.gypi b/common.gypi
index 7d7715e84..ced418cf5 100644
--- a/common.gypi
+++ b/common.gypi
@@ -61,7 +61,8 @@
'v8_enable_handle_zapping': 1,
},
'defines': [ 'DEBUG', '_DEBUG' ],
- 'cflags': [ '-g', '-O0' ],
+ 'cflags': [ '-g', '-O0', '-fPIE' ],
+ 'ldflags': [ '-pie' ],
'conditions': [
['target_arch=="x64"', {
'msvs_configuration_platform': 'x64',
@@ -91,7 +92,8 @@
'variables': {
'v8_enable_handle_zapping': 0,
},
- 'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections' ],
+ 'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections', '-fPIE' ],
+ 'ldflags': [ '-pie' ],
'conditions': [
['target_arch=="x64"', {
'msvs_configuration_platform': 'x64',