[qtbase] Fix qt.toolchain.cmake corruption for Emscripten builds#49429
[qtbase] Fix qt.toolchain.cmake corruption for Emscripten builds#49429JavierMatosD merged 2 commits intomicrosoft:masterfrom
Conversation
|
I can't confirm this is an issue (I was able to build using emscripten recently, I'm not sure what I'd need to change to trigger this behavior), but the This is what we get iiuc, but it's unlikely to be what we want: |
This is also what I see for x64-linux native. Ugly, but not broken. Emscripten should be no different. |
|
Thanks for the feedback @dg0yt just tested again with emsdk 4.0.22 / CMake 3.30.4:
So the fix is definitely needed... But I can confirm that your suggestion works and will just accept it. |
🤦 Of course broken, with a line break in a real filepath, as soon as __qt_chainload_toolchain_file is actually used. |
dg0yt
left a comment
There was a problem hiding this comment.
Reminder: Before commit/push, you need to increment port-version in ports/qtbase/vcpkg.json, and the run vcpkg x-add-version qtbase.
5d9455a to
9953b6e
Compare
The regex replacement for __qt_chainload_toolchain_file placed the newline inside the closing quote instead of after the closing paren, causing a literal line break in the filepath. This broke toolchain chaining for Emscripten/WebAssembly builds where vcpkg chainloads Qt's toolchain. Follow up on microsoft#46314
9953b6e to
660013d
Compare
|
@microsoft-github-policy-service agree company="OPENGIS.ch" |
|
Tested again with ffc071e |
|
I'm seeing there are two PRs that are touching qtbase -> #49191. I'm asking the contributor if they would like to absorb this change. |

The regex replacement for
__qt_chainload_toolchain_filewas malformed, causing a literal\nto be written instead of an actual newline. This broke toolchain chaining for Emscripten/WebAssembly builds where vcpkg chainloads Qt's toolchain.Follow up on #46314
Observed with 2025.12.12, fixes the resulting corrupted line (tested on e70ab1d , Qt 6.10.0):
Checklist
./vcpkg x-add-version --alland committing the result.