diff options
author | 2017-07-19 15:58:40 -0700 | |
---|---|---|
committer | 2017-07-19 15:58:40 -0700 | |
commit | e929547d48d645cb5fbf3cf0db1663435c899800 (patch) | |
tree | ce161e0159e72ef529d388efab743ee763f80f4a | |
parent | 6331bcf12f0690d7dc07de5d41515985506c5058 (diff) |
Fix issues with Node Mac build
-rw-r--r-- | binding.gyp | 60 | ||||
-rw-r--r-- | templates/binding.gyp.template | 45 |
2 files changed, 79 insertions, 26 deletions
diff --git a/binding.gyp b/binding.gyp index d11a60a68a..705b8f22c0 100644 --- a/binding.gyp +++ b/binding.gyp @@ -175,21 +175,27 @@ }], ['OS == "mac"', { 'xcode_settings': { - 'MACOSX_DEPLOYMENT_TARGET': '10.9' + 'OTHER_CFLAGS': [ + '-g', + '-Wall', + '-Wextra', + '-Werror', + '-Wno-long-long', + '-Wno-unused-parameter', + '-DOSATOMIC_USE_INLINED=1', + ], + 'OTHER_CPLUSPLUSFLAGS': [ + '-g', + '-Wall', + '-Wextra', + '-Werror', + '-Wno-long-long', + '-Wno-unused-parameter', + '-DOSATOMIC_USE_INLINED=1', + '-stdlib=libc++', + '-std=c++11' + ], }, - 'OTHER_CFLAGS': [ - '-g', - '-Wall', - '-Wextra', - '-Werror', - '-Wno-long-long', - '-Wno-unused-parameter', - '-DOSATOMIC_USE_INLINED=1', - ], - 'OTHER_CPLUSPLUSFLAGS': [ - '-stdlib=libc++', - '-std=c++11' - ], }] ] }, @@ -508,6 +514,13 @@ 'third_party/boringssl/ssl/tls_method.c', 'third_party/boringssl/ssl/tls_record.c', ], + 'conditions': [ + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9' + } + }] + ] }, ], }], @@ -626,6 +639,13 @@ 'src/core/lib/support/tmpfile_windows.c', 'src/core/lib/support/wrap_memcpy.c', ], + 'conditions': [ + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9' + } + }] + ] }, { 'target_name': 'grpc', @@ -889,6 +909,13 @@ 'src/core/ext/filters/workarounds/workaround_utils.c', 'src/core/plugin_registry/grpc_plugin_registry.c', ], + 'conditions': [ + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9' + } + }] + ] }, { 'include_dirs': [ @@ -914,6 +941,11 @@ 'ldflags': [ '-Wl,-wrap,memcpy' ] + }], + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9' + } }] ], "target_name": "grpc_node", diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index b7560fe7df..b1e1374249 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -165,19 +165,21 @@ }], ['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': [ + % for item in defaults['global'].get('CPPFLAGS').split(): + '${item}', + % endfor + '-stdlib=libc++', + '-std=c++11' + ], + % endif }, - % 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 }] ] }, @@ -201,6 +203,13 @@ '${source}', % endfor ], + 'conditions': [ + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9' + } + }] + ] }, % endif % endfor @@ -282,6 +291,13 @@ '${source}', % endfor ], + 'conditions': [ + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9' + } + }] + ] }, % endif % endfor @@ -317,6 +333,11 @@ 'ldflags': [ '-Wl,-wrap,memcpy' ] + }], + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9' + } }] ], "target_name": "${module.name}", |