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

**URL:** https://qa.fmod.com/t/failed-to-run-llvm-optimizations-when-building-webgl-player-on-unity-2017-4/14714
**Category:** Unity
**Created:** [May 24, 2019, 3:27am UTC](https://qa.fmod.com/t/failed-to-run-llvm-optimizations-when-building-webgl-player-on-unity-2017-4/14714 "2019-05-24T03:27:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![oukaitou](https://avatars.discourse-cdn.com/v4/letter/o/9de0a6/32.png) [@oukaitou](https://qa.fmod.com/u/oukaitou)
#### Post date: [May 24, 2019, 3:27am UTC](https://qa.fmod.com/t/failed-to-run-llvm-optimizations-when-building-webgl-player-on-unity-2017-4/14714/1 "2019-05-24T03:27:25Z")

</div>

Unity: 2017.4.27f1  
FMOD: 20.00.01  
Platform: WebGL

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

stdout:  
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   
emcc.run()  
File “D:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py”, 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\shared.py”, 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)

---

<div class="post-metadata">

### Author: ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)
#### Post date: [May 27, 2019, 1:00am UTC](https://qa.fmod.com/t/failed-to-run-llvm-optimizations-when-building-webgl-player-on-unity-2017-4/14714/2 "2019-05-27T01:00:58Z")

</div>

Did you follow the guide here [https://fmod.com/resources/documentation-unity?version=2.0&page=platform-specifics.html#html5webgl](https://fmod.com/resources/documentation-unity?version=2.0&page=platform-specifics.html#html5webgl)

---

<div class="post-metadata">

### Author: ![oukaitou](https://avatars.discourse-cdn.com/v4/letter/o/9de0a6/32.png) [@oukaitou](https://qa.fmod.com/u/oukaitou)
#### Post date: [May 27, 2019, 1:26am UTC](https://qa.fmod.com/t/failed-to-run-llvm-optimizations-when-building-webgl-player-on-unity-2017-4/14714/3 "2019-05-27T01:26:54Z")

</div>

> [@brett](#):
>
> Did you follow the guide here [https://fmod.com/resources/documentation-unity?version=2.0&page=platform-specifics.html#html5webgl](https://fmod.com/resources/documentation-unity?version=2.0&page=platform-specifics.html#html5webgl)

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.

---

<div class="post-metadata">

### Author: ![douglaz.c](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@douglaz.c](https://qa.fmod.com/u/douglaz.c)
#### Post date: [July 12, 2019, 12:09pm UTC](https://qa.fmod.com/t/failed-to-run-llvm-optimizations-when-building-webgl-player-on-unity-2017-4/14714/4 "2019-07-12T12:09:03Z")

</div>

Hi FMOD,

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+.

---

<div class="post-metadata">

### Author: ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)
#### Post date: [July 14, 2019, 11:55pm UTC](https://qa.fmod.com/t/failed-to-run-llvm-optimizations-when-building-webgl-player-on-unity-2017-4/14714/5 "2019-07-14T23:55:21Z")

</div>

According to [https://fmod.com/resources/documentation-api?version=2.0&page=welcome-revision-history.html](https://fmod.com/resources/documentation-api?version=2.0&page=welcome-revision-history.html) 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.
