Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use msys2 clang toolchain to build windows distribution #265

Merged
merged 2 commits into from
Dec 5, 2022

Conversation

TerrorJack
Copy link
Contributor

@TerrorJack TerrorJack commented Dec 3, 2022

Closes #264.

Note: still a WIP, will undraft and ping for review after:

  • Both x64/x86 builds are ready
  • There's basic testing that msys2 dll dependencies don't leak. make check won't serve this purpose since it needs to be run in a msys2 shell, for now I believe clang --version and wasm-ld --version should suffice since they are the largest executables anyway.

@TerrorJack TerrorJack force-pushed the main branch 2 times, most recently from ef17238 to 43f5e93 Compare December 3, 2022 18:53
These dependencies are not needed in wasi-sdk, and if they're enabled,
the msys2 dll depenndencies will leak into build products. Also
statically links libstdc++, required for the windows build.
@TerrorJack TerrorJack marked this pull request as ready for review December 4, 2022 02:25
@TerrorJack
Copy link
Contributor Author

@sunfishcode Ready for review.

@sunfishcode
Copy link
Member

Does the switch from windows-2019 to windows-latest (which is windows-2022) mean that we lose any support or older Windows versions in our distributed artifacts?

@TerrorJack
Copy link
Contributor Author

Does the switch from windows-2019 to windows-latest (which is windows-2022) mean that we lose any support or older Windows versions in our distributed artifacts?

The binaries will run fine on Windows 10 and later versions that ships ucrt in system32. If you wish I can also switch the build platform to windows-2019, though it doesn't provide any meaningful assurance in compatability, since the build process does not use systemwide visual studio installation at all.

@TerrorJack
Copy link
Contributor Author

Untitled

I just started a Windows 7 SP1 x64 virtual machine, and the new artifacts work there as long as ucrt is installed. I believe that's a reasonable lowest bound on supported Windows versions. And this is not a regression from the old msvc-produced artifacts, those also require ucrt to be manually installed (and additionally msvcp140).

@sunfishcode
Copy link
Member

Great, thanks for investigating that! I think we can switch to this for our next release, which I'm hoping to put out soon.

@sunfishcode sunfishcode merged commit 5f28fa9 into WebAssembly:main Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build windows version with msys2 clang64 toolchain instead of msvc?
2 participants