From 6ffdb9494b0b52248afda4b8dc8b34759ee2358a Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 22 Oct 2015 16:10:05 -0700 Subject: [PATCH] Modified Mac build fix for new binding.gyp structure --- binding.gyp | 30 ++++++++++++++++++++---------- templates/binding.gyp.template | 20 ++++++++++---------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/binding.gyp b/binding.gyp index 4c6a641b8c6..9b1dc7a90c3 100644 --- a/binding.gyp +++ b/binding.gyp @@ -73,16 +73,6 @@ ] ] }], - ['OS=="mac"', { - 'xcode_settings': { - 'MACOSX_DEPLOYMENT_TARGET': '10.9', - 'OTHER_CFLAGS': [ - '-fno-strict-aliasing', - '-std=c++11', - '-stdlib=libc++' - ] - } - }] ] }, 'targets': [ @@ -134,6 +124,16 @@ 'src/core/support/time_win32.c', 'src/core/support/tls_pthread.c', ], + "conditions": [ + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9', + 'OTHER_CFLAGS': [ + '-stdlib=libc++' + ] + } + }] + ], }, { 'target_name': 'grpc', @@ -292,6 +292,16 @@ 'src/core/census/operation.c', 'src/core/census/tracing.c', ], + "conditions": [ + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9', + 'OTHER_CFLAGS': [ + '-stdlib=libc++' + ] + } + }] + ], }, { 'include_dirs': [ diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index 982a9aeacee..2be275b5852 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -75,16 +75,6 @@ ] ] }], - ['OS=="mac"', { - 'xcode_settings': { - 'MACOSX_DEPLOYMENT_TARGET': '10.9', - 'OTHER_CFLAGS': [ - '-fno-strict-aliasing', - '-std=c++11', - '-stdlib=libc++' - ] - } - }] ] }, 'targets': [ @@ -104,6 +94,16 @@ '${source}', % endfor ], + "conditions": [ + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9', + 'OTHER_CFLAGS': [ + '-stdlib=libc++' + ] + } + }] + ], }, % endif % endfor