summaryrefslogtreecommitdiff
path: root/gyp/common.gypi
diff options
context:
space:
mode:
Diffstat (limited to 'gyp/common.gypi')
-rw-r--r--gyp/common.gypi75
1 files changed, 42 insertions, 33 deletions
diff --git a/gyp/common.gypi b/gyp/common.gypi
index 13565b04e6..118c75000e 100644
--- a/gyp/common.gypi
+++ b/gyp/common.gypi
@@ -88,47 +88,56 @@
],
'configurations': {
'Debug': {
- 'cflags_cc': [
- '-g',
- '-O0',
- '-fno-omit-frame-pointer',
- '-fwrapv',
- '-fstack-protector-all',
- '-fno-common',
- '--coverage',
- ],
'conditions': [
- ['enable_coverage=="1"', {
- 'cflags_cc': [ '<@(cflags_cc)', '--coverage' ],
+ ['OS=="mac"', {
+ 'xcode_settings': {
+ 'GCC_OPTIMIZATION_LEVEL': '0',
+ 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES',
+ 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
+ 'DEAD_CODE_STRIPPING': 'NO',
+ 'OTHER_CPLUSPLUSFLAGS': [ '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common' ],
+ 'conditions': [
+ ['coverage', {
+ 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES',
+ 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES',
+ 'OTHER_CPLUSPLUSFLAGS': [ '--coverage' ],
+ }],
+ ],
+ },
}, {
- 'ldflags': [ '--coverage' ],
+ 'cflags_cc': [ '-g', '-O0', '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common' ],
+ 'conditions': [
+ ['coverage', { 'cflags_cc': [ '--coverage' ] }],
+ ],
}],
],
'defines': [ 'DEBUG' ],
- 'xcode_settings': {
- 'GCC_OPTIMIZATION_LEVEL': '0',
- 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES',
- 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
- 'DEAD_CODE_STRIPPING': 'NO',
- 'OTHER_CPLUSPLUSFLAGS': [ '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common' ],
- 'conditions': [
- ['enable_coverage=="1"', {
- 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES',
- 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES',
- 'OTHER_CPLUSPLUSFLAGS': [ '<@(OTHER_CPLUSPLUSFLAGS)', '-fprofile-arcs', '-ftest-coverage' ],
- }],
- ],
- },
+ 'target_conditions': [
+ ['_type == "executable"', {
+ 'conditions': [
+ ['OS=="mac" and coverage', {
+ 'xcode_settings': { 'OTHER_LDFLAGS': [ '--coverage' ] },
+ }, {
+ 'ldflags': [ '--coverage' ],
+ }],
+ ],
+ }],
+ ],
},
'Release': {
- 'cflags_cc': [ '-g', '-O3' ],
'defines': [ 'NDEBUG' ],
- 'xcode_settings': {
- 'GCC_OPTIMIZATION_LEVEL': '3',
- 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES',
- 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
- 'DEAD_CODE_STRIPPING': 'NO',
- }
+ 'conditions': [
+ ['OS=="mac"', {
+ 'xcode_settings': {
+ 'GCC_OPTIMIZATION_LEVEL': '3',
+ 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES',
+ 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
+ 'DEAD_CODE_STRIPPING': 'NO',
+ },
+ }, {
+ 'cflags_cc': [ '-g', '-O3' ],
+ }],
+ ],
},
},
}