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

fix: compileWasm on Windows #742

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nev3rfail
Copy link

So I've tried to build skiko by myself and encountered few issues:

  1. emscripten contains both emcc (shell script) and emcc.bat files but OS.compilerForTarget returns "emcc" which causes Gradle to create tasks that attempt to execute a non-executable and the fix is to add ".bat" to emcc executable.

  2. Paths to includes are broken with a combination of Windows host and WASM because someone in "emcc.bat -> emcc.py -> clang.exe" chain eats Windows' directory separators. Solution is to create one more arg builder that would convert \ to \\ but also wouldn't convert arguments themselves like BaseVisualStudioBuildToolsArgBuilder does.

So I've tried to build skiko by myself and encountered few issues:

1. [emscripten](https://github.com/emscripten-core/emscripten) contains both `emcc` (shell script) and `emcc.bat` files but [OS.compilerForTarget](https://github.com/nev3rfail/skiko/blob/52c586f9b509715e7466f0355e440a39f12f187a/skiko/buildSrc/src/main/kotlin/properties.kt#L43) returns "emcc" which causes Gradle to create tasks that attempt to execute a non-executable and the fix is to add ".bat" to `emcc` executable.

2. Paths to includes are broken with a combination of Windows host and WASM because someone in "emcc.bat -> emcc.py -> clang.exe" chain eats Windows' directory separators. Solution is to create one more arg builder that would convert `\` to `\\` but also wouldn't convert arguments themselves like BaseVisualStudioBuildToolsArgBuilder does.
@MatkovIvan MatkovIvan requested a review from eymar August 7, 2023 08:52
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.

1 participant