diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-10 10:54:10 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-10 10:54:10 -0800 |
commit | 60c6395d05545c8fd8ad277b026d79fe4ffdbd38 (patch) | |
tree | 28c887e58b89ce079fde29e55eb034e5d3e6952d /emcc | |
parent | a3c256bf34521cbb250e6a136b2a7c98d1b9b489 (diff) |
fix compiling of postrinsic memcpy when in forced c++ mode for the main file
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1106,7 +1106,10 @@ try: if need_memcpy and not has_memcpy: if DEBUG: print >> sys.stderr, 'memcpy intrinsic added in optimizations, linking in optimized memcpy' memcpy = in_temp('memcpy.bc') + force_cxx = os.environ.get('EMMAKEN_CXX') + if force_cxx is not None: del os.environ['EMMAKEN_CXX'] # memcpy must be compiled as C execute([shared.PYTHON, shared.EMCC, shared.path_from_root('system', 'lib', 'libc', 'musl', 'memcpy.c'), '-o', memcpy], stdout=stdout, stderr=stderr) + if force_cxx is not None: os.environ['EMMAKEN_CXX'] = force_cxx shared.Building.llvm_opt(memcpy, llvm_opts) # optimize it just like normal code; no point in lto though next = final + '.postrinsics.bc' shared.Building.link([final, memcpy], next) |