问题
I've installed emscripten-1.38.271 and fastcomp-clang-e1.38.27-64bit via the official emsdk tool.
After running qmake and gettting no errors nor warnings,I ran make for my Qt project and that resulted in this(with EMCC_DEBUG=1):
shared:DEBUG: executed emsdk-master/fastcomp-clang/e1.38.27_64bit/clang++ -target asmjs-
unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=38 -D__EMSCRIPTEN_tiny__=27
-D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -nostdinc -Xclang -nobuiltininc
-Xclang -nostdsysteminc -Xclang -isystem/whatever/emsdk-master/emscripten/1.38.27/system
/include/libcxx -Xclang -isystem/whatever/emsdk-master/emscripten/1.38.27/system/lib/libcxxabi
/include -Xclang -isystem/whatever/emsdk-master/emscripten/1.38.27/system/include/compat
-Xclang -isystem/whatever/emsdk-master/emscripten/1.38.27/system/include -Xclang
-isystem/whatever/emsdk-master/emscripten/1.38.27/system/include/SSE -Xclang -isystem/whatever
/emsdk-master/emscripten/1.38.27/system/include/libc -Xclang -isystem/whatever/emsdk-master
/emscripten/1.38.27/system/lib/libc/musl/arch/emscripten -Xclang -isystem/whatever/emsdk-
master/emscripten/1.38.27/system/local/include -O3 -std=c++11 -mllvm -disable-llvm-optzns
/whatever/emsdk-master/emscripten/1.38.27/system/lib/embind/bind.cpp -Xclang -disable-O0-
optnone -Xclang -isystem/whatever/emsdk-master/emscripten/1.38.27/system/include/SDL -c -o
/tmp/emscripten_temp/bind_0.o -emit-llvm
emcc:DEBUG: emcc step "bitcodeize inputs" took 0.34 seconds
emcc:DEBUG: optimizing /whatever/emsdk-master/emscripten/1.38.27/system/lib/embind/bind.cpp
shared:ERROR: Failed to run llvm optimizations:
*Output is reformatted
Other threads like this suggest that it was a temporary regression and the version should be 1.34.6+ to suppress that, but my emscripten's already is.
And if it matters,here's my "~/.emscripten" file.
Thanks in advance.
1 The version should be exactly 1.38.27 because my Qt webassembly tools(e.g qmake) has been built with that,otherwise it can cause problem as it's the case with the latest release(currently 2.0.0)
来源:https://stackoverflow.com/questions/63717267/failed-to-run-llvm-optimizations-using-clang-for-webassmebly