From bc56d6eee02b637c96a18127e4f58e5476b2a885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Thu, 18 Jun 2015 13:31:34 +0300 Subject: [PATCH] Work around OS X Xcode(?) build bug by adding -stdlib=libc++ to CXXFLAGS when building. --- emsdk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/emsdk b/emsdk index b8b3f67..ee57264 100755 --- a/emsdk +++ b/emsdk @@ -457,6 +457,15 @@ def fastcomp_build_bin_dir(tool): make_env = os.environ.copy() +cxxflags = '' +if hasattr(make_env, 'CXXFLAGS'): cxxflags = make_env['CXXFLAGS'] + ' ' + +# To work around a build issue with older Mac OS X builds, add -stdlib=libc++ to all builds. +# See https://groups.google.com/forum/#!topic/emscripten-discuss/5Or6QIzkqf0 +if OSX: cxxflags += '-stdlib=libc++' + +make_env['CXXFLAGS'] = cxxflags + def find_msbuild(sln_file): search_paths_vs2013 = [os.path.join(os.environ['ProgramFiles'], 'MSBuild/12.0/Bin/amd64'), os.path.join(os.environ['ProgramFiles(x86)'], 'MSBuild/12.0/Bin/amd64'),