You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:272 throw new JS_Parse_Error(message, line, col, pos); ^ TypeError: {} is not a function at new JS_Parse_Error (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:261:21) at js_error (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:272:15) at croak (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:742:17) at token_error (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:749:17) at unexpected (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:755:17) at Arguments.semicolon (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:775:51) at prog1 (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:1314:29) at simple_statement (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:906:35) at /Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:816:35 at block_ (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:999:32) Traceback (most recent call last): File "/Users/altanozlu/emsdk/emscripten/1.38.0/emcc", line 11, in <module> python_selector.run(__file__) File "/Users/altanozlu/emsdk/emscripten/1.38.0/tools/python_selector.py", line 38, in run sys.exit(run_by_import(filename, main) if on_allowed_version() else run_by_subprocess(filename)) File "/Users/altanozlu/emsdk/emscripten/1.38.0/tools/python_selector.py", line 13, in run_by_import return getattr(importlib.import_module(os.path.basename(filename)), main)() File "/Users/altanozlu/emsdk/emscripten/1.38.0/emcc.py", line 1902, in run wasm_text_target, misc_temp_files, optimizer) File "/Users/altanozlu/emsdk/emscripten/1.38.0/emcc.py", line 2442, in do_binaryen emit_symbol_map=emit_symbol_map) File "/Users/altanozlu/emsdk/emscripten/1.38.0/tools/shared.py", line 2236, in minify_wasm_js js_file = Building.js_optimizer_no_asmjs(js_file, ['noPrintMetadata'] + passes) File "/Users/altanozlu/emsdk/emscripten/1.38.0/tools/shared.py", line 2105, in js_optimizer_no_asmjs subprocess.check_call(NODE_JS + [js_optimizer.JS_OPTIMIZER, filename] + passes, stdout=open(next, 'w')) File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/Users/altanozlu/emsdk/node/8.9.1_64bit/bin/node', '/Users/altanozlu/emsdk/emscripten/1.38.0/tools/js-optimizer.js', '/tmp/tmpg07KHy/a.bc.o.js.mem.js', 'noPrintMetadata', 'JSDCE', 'minifyWhitespace']' returned non-zero exit status 1
I get this error when i try to enable O2 or O3
this works : emcc deneme.cpp -s WASM=1 -o a.js -std=c++11 -s --llvm-opts "['-O3']" -O1
this doesn't work : emcc deneme.cpp -s WASM=1 -o a.js -std=c++11 -s --llvm-opts "['-O3']" -O2
The text was updated successfully, but these errors were encountered:
There are a few more differences too, like passing the higher optimization level to the LLVM optimizer.
You may be able to disable just the js opts part with -O2 --js-opts 0, but without those opts your JS will be much much bigger. Refactoring the tricky ES6 code to not be seen by the optimizer is usually better.
/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:272 throw new JS_Parse_Error(message, line, col, pos); ^ TypeError: {} is not a function at new JS_Parse_Error (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:261:21) at js_error (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:272:15) at croak (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:742:17) at token_error (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:749:17) at unexpected (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:755:17) at Arguments.semicolon (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:775:51) at prog1 (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:1314:29) at simple_statement (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:906:35) at /Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:816:35 at block_ (/Users/altanozlu/emsdk/emscripten/1.38.0/tools/eliminator/node_modules/uglify-js/lib/parse-js.js:999:32) Traceback (most recent call last): File "/Users/altanozlu/emsdk/emscripten/1.38.0/emcc", line 11, in <module> python_selector.run(__file__) File "/Users/altanozlu/emsdk/emscripten/1.38.0/tools/python_selector.py", line 38, in run sys.exit(run_by_import(filename, main) if on_allowed_version() else run_by_subprocess(filename)) File "/Users/altanozlu/emsdk/emscripten/1.38.0/tools/python_selector.py", line 13, in run_by_import return getattr(importlib.import_module(os.path.basename(filename)), main)() File "/Users/altanozlu/emsdk/emscripten/1.38.0/emcc.py", line 1902, in run wasm_text_target, misc_temp_files, optimizer) File "/Users/altanozlu/emsdk/emscripten/1.38.0/emcc.py", line 2442, in do_binaryen emit_symbol_map=emit_symbol_map) File "/Users/altanozlu/emsdk/emscripten/1.38.0/tools/shared.py", line 2236, in minify_wasm_js js_file = Building.js_optimizer_no_asmjs(js_file, ['noPrintMetadata'] + passes) File "/Users/altanozlu/emsdk/emscripten/1.38.0/tools/shared.py", line 2105, in js_optimizer_no_asmjs subprocess.check_call(NODE_JS + [js_optimizer.JS_OPTIMIZER, filename] + passes, stdout=open(next, 'w')) File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/Users/altanozlu/emsdk/node/8.9.1_64bit/bin/node', '/Users/altanozlu/emsdk/emscripten/1.38.0/tools/js-optimizer.js', '/tmp/tmpg07KHy/a.bc.o.js.mem.js', 'noPrintMetadata', 'JSDCE', 'minifyWhitespace']' returned non-zero exit status 1
I get this error when i try to enable O2 or O3
this works :
emcc deneme.cpp -s WASM=1 -o a.js -std=c++11 -s --llvm-opts "['-O3']" -O1
this doesn't work :
emcc deneme.cpp -s WASM=1 -o a.js -std=c++11 -s --llvm-opts "['-O3']" -O2
The text was updated successfully, but these errors were encountered: