diff options
-rwxr-xr-x | emcc | 3 | ||||
-rwxr-xr-x | tests/runner.py | 1 |
2 files changed, 4 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) diff --git a/tests/runner.py b/tests/runner.py index ea124c30..24fbee95 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -7992,6 +7992,7 @@ Options that are modified or new in %s include: # dlmalloc. dlmalloc is special in that it is the only part of libc that is (1) hard to write well, and # very speed-sensitive. So we do not implement it in JS in library.js, instead we compile it from source for source, has_malloc in [('hello_world' + suffix, False), ('hello_malloc.cpp', True)]: + print source, has_malloc self.clear() output = Popen([PYTHON, compiler, path_from_root('tests', source)], stdout=PIPE, stderr=PIPE).communicate() assert os.path.exists('a.out.js'), '\n'.join(output) |