We pass -O2 to the backend when the build command to JS has -O2 in it. But that would disable all JS optimizations as well. We don't have a way to disable optimizations for the backend specifically, but you can hack it out in emscripten.py (search for backend_args += ['-O' + str(settings['OPT_LEVEL'])] ).
However, that error looks like a bug that we should fix. If you can create a standalone testcase, please file an issue. On Wed, Jul 29, 2015 at 2:46 AM, Dmitry Grechka <[email protected]> wrote: > Hi, > > I try to figure out why I get > > BUG root: emscript: llvm backend: C:/Program > Files/Emscripten/clang/e1.34.1_64bit\llc > c:\users\dmitry\appdata\local\temp\tmpxakjpx\tmppydkuz.bc -march=js > -filetype=asm -o > c:\users\dmitry\appdata\local\temp\emscripten_temp\tmph_eu8k.4.js -O2 > %218 = va_arg i32* %4, i64 > LLVM ERROR: 0 && "some i64 thing we can't legalize yet" > > and I wonder why the emcc does -O2 optimization. > > Can I disable it somehow? > > I think I will be able to localize the problematic c++ code faster if I > get these optimizations desabled. > > > > My enscripten is > > emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) > 1.34.1 > clang version 3.7.0 (https://github.com/kripken/emscripten-fastcomp-clang > d0bf10 > 4be3b7fb821711438ab9a26dabc3bc6cd9) ( > https://github.com/kripken/emscripten-fastc > omp.git 32ec1048f4a653bf4f353b2a7e91274affaf15c8) > Target: x86_64-pc-windows-msvc > Thread model: posix > > > Regards, > Dmitr. > > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
