bytecodealliance / wasm-micro-runtime

WebAssembly Micro Runtime (WAMR)
Apache License 2.0
4.66k stars 576 forks source link

Support for clang compilation (and cross-compilation) for native windows platform (--target=x86_64-windows-msvc) #3596

Open SBKarr opened 4 days ago

SBKarr commented 4 days ago

Feature

Just a little fixes in cmake files to make clang builds for windows successful.

Benefit

Possibility for cross-compilation for native windows target --target=x86_64-windows-msvc on other platforms. Useful for CI, automatic builds, etc

Implementation

Patch attached: 0001-Windows-clang-fixes.patch.txt

Check for clang before NOT MINGW to reuse MinGW asms, that successfully works with clang, instead of MSVC's asms. Also, clang parser failed on backslashes with spaces.