Closed RReverser closed 4 years ago
I think so! Good idea!
Hi, I see that there is an attempt in your case to create a new cache entry under wasm-lto
but I have a difficult to reproduce it. Simple command doesn't work.
em++ test.cpp -flto -o test.js -s WASM=1
Is it possible for you to share compilation flags?
I've addressed blindly this issue in the commit ec1eaff, I will update images soon with that change.
em++ test.cpp -flto -o test.js -s WASM=1
Hmm, I'll need some time to get around but could you try adding optimisation and/or debug flags?
I've tested a various of flags under 1.39.5 - nothing has worked unfortunately. Some images have been already updated with precompiled LTO, i.e:
docker pull trzeci/emscripten-fastcomp:1.39.7
docker pull trzeci/emscripten-upstream:1.39.7
Also would be useful if you tell which version of emscripten do you use, as I've found that this https://github.com/emscripten-core/emscripten/issues/10603 might be relatedAh, it probably depends on contents of your test.cpp and which libraries end up being linked. If it's not using the standard library, it might be skipping these compilations altogether.
as I've found that this emscripten-core/emscripten#10603 might be related
Unlikely - that issue is just about size inefficiency, which is not very related.
So I've added a bunch of most common libs to cache with lto, please check if something missing I can add explicitly to the list : )
Thanks!
I've noticed that, when building with LTO (most of my projects), the standard libraries are rebuilt on each invocation of
docker run
. This is noticeable from logs e.g.:At the same time,
/emsdk_portable/.data/cache/wasm
are available within the container.It appears that the reason is that images are shipped with standard C / C++ libraries precompiled and cached as part of the image, but only without LTO flag (LTO uses LLVM IR bitcode as object files, so has to be compiled separately).
Would it be possible to add LTO variants too?