Failed to run llvm optimizations when building WebGL Player on Unity 2017.4

Unity: 2017.4.27f1
FMOD: 20.00.01
Platform: WebGL

Failed running “D:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\\python.exe” “D:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc” @“D:\Workspace\FMODTest\Assets…\Temp\emcc_arguments.resp”

stderr:WARNING:root:–separate-asm works best when compiling to HTML. otherwise, you must yourself load the ‘.asm.js’ file that is emitted separately, and must do so before loading the main '.js` file
error: Invalid value (Producer: ‘LLVM6.0.1’ Reader: ‘LLVM 3.9.0’)
error: Invalid value (Producer: ‘LLVM6.0.1’ Reader: ‘LLVM 3.9.0’)
Traceback (most recent call last):
File “D:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc”, line 13, in
File “D:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\”, line 1640, in run
final = shared.Building.llvm_opt(final, link_opts, DEFAULT_FINAL)
File “D:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\”, line 1637, in llvm_opt
assert os.path.exists(target), 'Failed to run llvm optimizations: ’ + output
AssertionError: Failed to run llvm optimizations:

(Filename: C:\buildslave\unity\build\artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Did you follow the guide here

Thank you for the reply.

Yes, I’ve tested it on both Win and Mac, same error.

I tried the old version of fmod, 1.10.09 is ok, 1.10.10 not work.

And I found from 1.10.10 it built with Emscripten v1.38.15, I doubt that’s the problem but not sure.


We are having the exact same issue.
We are using Unity 2017.4 as well and get the same error when building for WebGL using FMOD Unity 1.10.10+.

According to 1.10.10 was built with Emscripten 1.38.15 , i’ll have to check the compatibility between what unity uses and what we use, but we can’t start building multiple emscripten bulids for every version we release to match unity.
Ie from what I can see in the same fmod release it said
" * HTML5 - Add Web Assembly support (WASM) to HTML5 version of FMOD Core API and Studio API. Memory usage halved, CPU speed improvements of about 30%" which needed the new version.

If they’re using a newer version than us we can match that.