From 136b3da458316edfc2184c679902b6b580ff544a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 15 Jan 2015 17:02:04 -0800 Subject: [PATCH] Add -stdlib=libc++ for linking --- common.gypi | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/common.gypi b/common.gypi index 1d656c2dadca..fae82aaf2111 100644 --- a/common.gypi +++ b/common.gypi @@ -130,6 +130,14 @@ }], # OS=="linux" ], }], + ['_type in ["executable", "shared_library"]', { + # On some machines setting CLANG_CXX_LIBRARY doesn't work for linker. + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-stdlib=libc++' + ], + }, + }], ], 'msvs_cygwin_shell': 0, # Strangely setting it to 1 would make building under cygwin fail. 'msvs_disabled_warnings': [ @@ -189,9 +197,6 @@ 'xcode_settings': { 'CC': '/usr/bin/clang', 'LDPLUSPLUS': '/usr/bin/clang++', - 'OTHER_CPLUSPLUSFLAGS': [ - '$(inherited)', '-std=gnu++11' - ], 'OTHER_CFLAGS': [ '-fcolor-diagnostics', ],