diff options
author | Craig Tiller <ctiller@google.com> | 2016-01-08 07:49:06 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-01-08 07:49:06 -0800 |
commit | 5bf8e61ff7d31744fd2e77c73d94b80eff5bc1ad (patch) | |
tree | c83a9cb132840ccd34cd7519cdba92f4f0a6322d | |
parent | abf85d96481a35d26ecfd16575f0a13846d3b8e5 (diff) | |
parent | 3f42ea0869bbda64a8d1339542cfaa81df62a5be (diff) |
Merge pull request #4643 from murgatroid99/node_compiler_standard_c99
Compile Node extension with c99 and c++11
-rw-r--r-- | binding.gyp | 13 | ||||
-rw-r--r-- | templates/binding.gyp.template | 8 |
2 files changed, 17 insertions, 4 deletions
diff --git a/binding.gyp b/binding.gyp index 75e2f3c8de..e5b4b9722e 100644 --- a/binding.gyp +++ b/binding.gyp @@ -88,6 +88,11 @@ }, 'targets': [ { + 'cflags': [ + '-std=c99', + '-Wall', + '-Werror' + ], 'target_name': 'gpr', 'product_prefix': 'lib', 'type': 'static_library', @@ -145,6 +150,11 @@ ], }, { + 'cflags': [ + '-std=c99', + '-Wall', + '-Werror' + ], 'target_name': 'grpc', 'product_prefix': 'lib', 'type': 'static_library', @@ -316,7 +326,7 @@ "<!(node -e \"require('nan')\")" ], 'cflags': [ - '-std=c++0x', + '-std=c++11', '-Wall', '-pthread', '-g', @@ -332,7 +342,6 @@ 'xcode_settings': { 'MACOSX_DEPLOYMENT_TARGET': '10.9', 'OTHER_CFLAGS': [ - '-std=c++11', '-stdlib=libc++' ] } diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index be80750eb7..8014ff3718 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -93,6 +93,11 @@ % for lib in libs: % if lib.name in module.transitive_deps: { + 'cflags': [ + '-std=c99', + '-Wall', + '-Werror' + ], 'target_name': '${lib.name}', 'product_prefix': 'lib', 'type': 'static_library', @@ -121,7 +126,7 @@ "<!(node -e \"require('nan')\")" ], 'cflags': [ - '-std=c++0x', + '-std=c++11', '-Wall', '-pthread', '-g', @@ -137,7 +142,6 @@ 'xcode_settings': { 'MACOSX_DEPLOYMENT_TARGET': '10.9', 'OTHER_CFLAGS': [ - '-std=c++11', '-stdlib=libc++' ] } |