aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-08 20:42:36 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-03-08 20:42:36 -0800
commit5c5a9dd4bf35d95ffe83e655fe2a237241f0a96a (patch)
treebea91a5b9e020381d70a642dbd930d2e021e2a31 /emcc
parent49970438a39d7f61d8591aca3f5f2d2d2ada748b (diff)
make sure we use a C compiler to build libc. fixes #937, #938
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc4
1 files changed, 4 insertions, 0 deletions
diff --git a/emcc b/emcc
index 58d49972..ca23adf0 100755
--- a/emcc
+++ b/emcc
@@ -1084,10 +1084,14 @@ try:
os.path.join('libc', 'stdlib', 'strtod.c'),
];
+ prev_cxx = os.environ.get('EMMAKEN_CXX')
+ if prev_cxx: os.environ['EMMAKEN_CXX'] = ''
for src in libc_files:
o = in_temp(os.path.basename(src) + '.o')
execute([shared.PYTHON, shared.EMCC, shared.path_from_root('system', 'lib', src), '-o', o], stdout=stdout, stderr=stderr)
o_s.append(o)
+ if prev_cxx: os.environ['EMMAKEN_CXX'] = prev_cxx
+
shared.Building.link(o_s, in_temp('libc.bc'))
return in_temp('libc.bc')