aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-01 10:20:25 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-01 10:20:25 -0700
commit8dd0ed8704676e8031083dc3e0110f3cac1c545a (patch)
tree85e0d3e6e47b104b35d597d19fc427732f39cf8e /tools
parent2c4d6f0150de7a44ec284f0b9138b70cf1095b76 (diff)
only emit -nostdinc++ when calling clang to build a file ending in a cpp-style suffix
Diffstat (limited to 'tools')
-rw-r--r--tools/shared.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 0732842d..5c19efa8 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -517,7 +517,7 @@ USE_EMSDK = not os.environ.get('EMMAKEN_NO_SDK')
if USE_EMSDK:
# Disable system C and C++ include directories, and add our own (using -idirafter so they are last, like system dirs, which
# allows projects to override them)
- EMSDK_OPTS = ['-nostdinc', '-nostdinc++', '-Xclang', '-nobuiltininc', '-Xclang', '-nostdsysteminc',
+ EMSDK_OPTS = ['-nostdinc', '-Xclang', '-nobuiltininc', '-Xclang', '-nostdsysteminc',
'-Xclang', '-isystem' + path_from_root('system', 'local', 'include'),
'-Xclang', '-isystem' + path_from_root('system', 'include', 'libcxx'),
'-Xclang', '-isystem' + path_from_root('system', 'include'),
@@ -530,9 +530,11 @@ if USE_EMSDK:
] + [
'-U__APPLE__', '-U__linux__'
]
+ EMSDK_CXX_OPTS = ['-nostdinc++']
COMPILER_OPTS += EMSDK_OPTS
else:
EMSDK_OPTS = []
+ EMSDK_CXX_OPTS = []
#print >> sys.stderr, 'SDK opts', ' '.join(EMSDK_OPTS)
#print >> sys.stderr, 'Compiler opts', ' '.join(COMPILER_OPTS)