diff options
-rwxr-xr-x | emcc | 10 | ||||
-rwxr-xr-x | tests/fuzz/test.sh | 2 |
2 files changed, 9 insertions, 3 deletions
@@ -1685,10 +1685,10 @@ try: link_opts += shared.Building.get_safe_internalize() + ['-globaldce'] # Simplify LLVM bitcode for fastcomp - if os.environ.get('EMCC_FAST_COMPILER'): + if os.environ.get('EMCC_FAST_COMPILER') and not AUTODEBUG: link_opts += ['-pnacl-abi-simplify-preopt', '-pnacl-abi-simplify-postopt'] - if not save_bc and not os.environ.get('EMCC_FAST_COMPILER') and not AUTODEBUG: + if (not save_bc and not os.environ.get('EMCC_FAST_COMPILER')) or AUTODEBUG: # let llvm opt directly emit ll, to skip writing and reading all the bitcode link_opts += ['-S'] shared.Building.llvm_opt(final, link_opts, final + '.link.ll') @@ -1715,6 +1715,12 @@ try: final += '.ad.ll' if DEBUG: save_intermediate('autodebug', 'll') + # Simplify bitcode after autodebug + if os.environ.get('EMCC_FAST_COMPILER') and AUTODEBUG: + shared.Building.llvm_opt(final, ['-pnacl-abi-simplify-preopt', '-pnacl-abi-simplify-postopt'], final + '.adsimp.bc') + final += '.adsimp.bc' + if DEBUG: save_intermediate('adsimp', 'bc') + # Emscripten logging.debug('LLVM => JS') extra_args = [] if not js_libraries else ['--libraries', ','.join(map(os.path.abspath, js_libraries))] diff --git a/tests/fuzz/test.sh b/tests/fuzz/test.sh index 60815c9f..99dedd97 100755 --- a/tests/fuzz/test.sh +++ b/tests/fuzz/test.sh @@ -14,7 +14,7 @@ gcc -O1 $1 -I/home/alon/Dev/csmith/runtime mozjs a.out.js echo "2" gcc -O2 $1 -I/home/alon/Dev/csmith/runtime -~/Dev/emscripten/emcc -O2 $1 -I/home/alon/Dev/csmith/runtime +~/Dev/emscripten/emcc -O2 -g2 $1 -I/home/alon/Dev/csmith/runtime ./a.out mozjs a.out.js |