aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
authorGravatar Michael Lumish <mlumish@google.com>2017-07-11 16:17:43 -0700
committerGravatar GitHub <noreply@github.com>2017-07-11 16:17:43 -0700
commite908821d242c4435ab5973a824b48ad544763ce3 (patch)
treeab16d103166d2daa1420198becd443e21eca9bed /templates
parent1941c736ac9ae494bab9fca2f207ffd6b1249346 (diff)
parent32de20ca49b03314a224d653170792a245498b04 (diff)
Merge pull request #11708 from murgatroid99/node_enable_werror
Node: re-enable -Werror, clean up binding.gyp
Diffstat (limited to 'templates')
-rw-r--r--templates/binding.gyp.template68
1 files changed, 24 insertions, 44 deletions
diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template
index b304011fdc..b7560fe7df 100644
--- a/templates/binding.gyp.template
+++ b/templates/binding.gyp.template
@@ -64,6 +64,14 @@
],
% endif
% endfor
+ 'cflags_c': [
+ '-Werror',
+ '-std=c99'
+ ],
+ 'cflags_cc': [
+ '-Werror',
+ '-std=c++11'
+ ],
'include_dirs': [
'.',
'include'
@@ -154,6 +162,22 @@
'<(node_root_dir)/deps/zlib',
'<(node_root_dir)/deps/cares/include'
]
+ }],
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'MACOSX_DEPLOYMENT_TARGET': '10.9'
+ },
+ % if defaults['global'].get('CPPFLAGS', None) is not None:
+ 'OTHER_CFLAGS': [
+ % for item in defaults['global'].get('CPPFLAGS').split():
+ '${item}',
+ % endfor
+ ],
+ 'OTHER_CPLUSPLUSFLAGS': [
+ '-stdlib=libc++',
+ '-std=c++11'
+ ],
+ % endif
}]
]
},
@@ -164,12 +188,6 @@
% for lib in libs:
% if lib.name in module.transitive_deps and lib.name == 'boringssl':
{
- 'cflags': [
- '-std=c++11',
- '-std=c99',
- '-Wall',
- '-Werror'
- ],
'target_name': '${lib.name}',
'product_prefix': 'lib',
'type': 'static_library',
@@ -183,17 +201,6 @@
'${source}',
% endfor
],
- 'conditions': [
- ['OS=="mac"', {
- 'xcode_settings': {
- 'MACOSX_DEPLOYMENT_TARGET': '10.9',
- 'OTHER_CPLUSPLUSFLAGS': [
- '-stdlib=libc++',
- '-std=c++11'
- ],
- }
- }],
- ],
},
% endif
% endfor
@@ -237,11 +244,6 @@
% for lib in libs:
% if lib.name in module.transitive_deps and lib.name == 'z':
{
- 'cflags': [
- '-std=c99',
- '-Wall',
- '-Werror'
- ],
'target_name': '${lib.name}',
'product_prefix': 'lib',
'type': 'static_library',
@@ -267,11 +269,6 @@
% for lib in libs:
% if lib.name in module.transitive_deps and lib.name not in ('boringssl', 'z'):
{
- 'cflags': [
- '-std=c99',
- '-Wall',
- '-Werror'
- ],
'target_name': '${lib.name}',
'product_prefix': 'lib',
'type': 'static_library',
@@ -285,13 +282,6 @@
'${source}',
% endfor
],
- "conditions": [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'MACOSX_DEPLOYMENT_TARGET': '10.9'
- }
- }]
- ]
},
% endif
% endfor
@@ -300,7 +290,6 @@
"<!(node -e \"require('nan')\")"
],
'cflags': [
- '-std=c++11',
'-pthread',
'-zdefs',
'-Wno-error=deprecated-declarations'
@@ -315,15 +304,6 @@
% endfor
]
}],
- ['OS=="mac"', {
- 'xcode_settings': {
- 'MACOSX_DEPLOYMENT_TARGET': '10.9',
- 'OTHER_CFLAGS': [
- '-stdlib=libc++',
- '-std=c++11'
- ]
- }
- }],
['OS=="win"', {
'dependencies': [
% for dep in getattr(module, 'deps', []):