Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
6.3.1, 6.4.0 Beta1
-
-
1f9c1f032c (qt/qtbase/dev) 1f9c1f032c (qt/tqtc-qtbase/dev) 6b2af05f27 (qt/qtbase/6.4)
Description
I need some more exported functions, so I adjusted the apps target link options to include
"SHELL:-s EXPORTED_RUNTIME_METHODS=ccall,cwrap,UTF16ToString,stringToUTF16"
in the past (Qt 5.15).
In Qt6, this seems to be overwritten in a way that it always appends "-s EXPORTED_RUNTIME_METHODS=UTF16ToString,stringToUTF16" to the link options. I tried a couple of things here in cmake, but I'm unable to change the order/the options without patching.
The attached examples links with
.... [ 27%] Linking CXX executable appbuildtest.js /usr/bin/cmake -E cmake_link_script CMakeFiles/appbuildtest.dir/link.txt --verbose=1 /home/prcs1076/.emscripten/upstream/emscripten/em++ --bind -s FETCH=1 -s WASM=1 -s FULL_ES2=1 -s FULL_ES3=1 -s USE_WEBGL2=1 -s EXIT_RUNTIME=1 -l idbfs.js -s FORCE_FILESYSTEM=1 -s ALLOW_M EMORY_GROWTH=1 -s EXPORTED_RUNTIME_METHODS=ccall,cwrap,UTF16ToString,stringToUTF16 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s INITIAL_MEMORY=50MB -s EXPORTED_RUNTIME_METHODS=[UTF16ToString,strin gToUTF16] -s MODULARIZE=1 -s EXPORT_NAME=createQtAppInstance -s DISABLE_EXCEPTION_CATCHING=1 @CMakeFiles/appbuildtest.dir/objects1.rsp -o appbuildtest.js @CMakeFiles/appbuildtest.dir/lin klibs.rsp
. The resulting wasm module has no ccall/cwrap available.