How do I pass compiler/linker arguments to Emscripten? #30108
Replies: 3 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@ahmedyarub I'm also having the same problem. The docs says that Did you found a workaround?
Same for me and I'm also wondering if this is a bug that should be reported. |
Beta Was this translation helpful? Give feedback.
-
I have had success defining a custom triplet with set(ENV{EMCC_CFLAGS} "$ENV{EMCC_CFLAGS} -pthread") This is certainly not ideal, but seems to work (you can verify that the generated objects indeed have this enabled by checking |
Beta Was this translation helpful? Give feedback.
-
I'm creating a cross-platform application that uses Qt downloaded using the official tool in addition to some other libraries that I could successfully build in vcpkg like OpenSSL, libssh, and aws-sdk-cpp. Now I can build the application using the single-threaded Qt 6.5.0 beta and link them to vcpkg libraries. However, I need the Qt Concurrent library which means that I have to build against the multi-threaded version of Qt. Linking to these Qt libraries does work but when I add my vcpkg libraries I get the following error:
That error should be resolved by passing -pthread parameter, -matomics, or some other compiler/linker parameters to Emscripten. I did try to pass them like this in a new toolchain file but that still didn't work:
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions