I'm guessing that I deleted the optimizer via git clean. Maybe tools/optimizer_build/ should be in Emscripten's .gitignore?
The SDK can successfully build the optimizer; I never saw that fail. Emscripten itself has code in get_native_optimizer() in tools/js_optimizer.py which builds the optimizer, placing it in ~/.emscripten_cache/optimizer.exe. It will only build the optimizer if EMSCRIPTEN_NATIVE_OPTIMIZER is not set. https://github.com/kripken/emscripten/blob/master/tools/js_optimizer.py#L64 Considering that Emscripten can build the native optimizer, I wonder why the SDK needs to do that? On Friday, 10 April 2015 07:40:28 UTC-4, jj wrote: > > The way I use Emscripten SDK with git is that I first do 'emsdk install > sdk-incoming-64bit', and then go to the emsdk/emscripten/incoming directory > and do a "git remote add juj https://github.com/juj/emscripten.git" to > add in my remote. That allows me to work with my own fork inside the emsdk > directory structure. > > Emsdk needs to build the native optimizer at install time to match with > the installation of prebuilt packages. Did that build step fail for you? > > If you use Emscripten from a custom git cloned directory outside emsdk, > then the best workflow is like you mention to first install the sdk and > activate it, and then edit ~/.emscripten to override your own path > locations. Note that you don't need to do this again when updating later, > since the path structure stays the same when you later update with e.g. > "emsdk install sdk-incoming-64bit". > > 2015-04-10 7:30 GMT+03:00 Boris Gjenero <[email protected] <javascript:> > >: > >> I initially installed Emscripten via the SDK, but I only use the SDK to >> update Clang and set the path. I update Emscripten and do other things >> there directly via Git commands. This led to a problem. I'm not calling >> this a bug because you're probably supposed to let the SDK manage the stuff >> in its folder without interference. >> >> Attempts to link with optimization failed due to failure to run the >> native optimizer. I could link without optimization or >> with EMCC_NATIVE_OPTIMIZER=0. When installing Emscripten, the SDK builds >> the native optimizer and sets EMSCRIPTEN_NATIVE_OPTIMIZER in ~/.emscripten >> to the location of that binary. Emscripten would normally try to find the >> optimizer in the cache, and build it if it's not found there. However, with >> EMSCRIPTEN_NATIVE_OPTIMIZER set it simply tries to run the specified path >> as the optimizer. This means it fails if the optimizer isn't found there. >> It also means cache clearing in response to Emscripten version changes >> won't ensure that the latest optimizer is used. >> >> The solution is to always update via the SDK after installing via the >> SDK, or to edit ~/.emscripten and delete the EMSCRIPTEN_NATIVE_OPTIMIZER >> line. >> > -- 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.
