-
Notifications
You must be signed in to change notification settings - Fork 36
Enable Windows Emscripten build #362
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
base: main
Are you sure you want to change the base?
Enable Windows Emscripten build #362
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #362 +/- ##
=======================================
Coverage 81.78% 81.78%
=======================================
Files 20 20
Lines 950 950
Branches 87 87
=======================================
Hits 777 777
Misses 173 173 🚀 New features to boost your workflow:
|
CMakeLists.txt
Outdated
@@ -432,8 +432,11 @@ endif() | |||
|
|||
if(EMSCRIPTEN) | |||
# Ensure required SDL2 ports (e.g. SDL2) are built before header preloading | |||
if (CMAKE_C_COMPILER MATCHES ".bat") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a better way to detect the if the compiler is running on windows: emscripten-core/emscripten#3191
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the way we have been detecting we are doing an Emscripten build of Windows within CppInterOp. Its possible we might just be able to use EMCC_SUFFIX from the Emscripten.cmake file, which we use as part of the build. Its probably more reliable too, since it will update with whatever Emscripten decides the suffix should be. I will modify the cmake to use this, and then rerun the workflow in CppInterOp to check it works.
Do we want to work in the windows ci here, too? |
@vgvassilev xeus-cpp uses Emscripten forges emsdk, which is only available for very particular platforms. When we asked previously for them to make emsdk available on Windows before the request was rejected. I could add a Windows Emscripten build here too, but we would need to get the upstream emsdk to achieve this. What would you like me to do? |
d31dfa4
to
5391dcd
Compare
Description
Please include a summary of changes, motivation and context for this PR.
This PR enable xeus-cpp to be cross compiled to Emscripten on a Windows platform (following Emscripten build instructions in CppInterOp). The 2 changes are as follows
To see these changing allow an Emscripten build of xeus-cpp to work and pass all Emscripten tests, see this PR in CppInterOp compiler-research/CppInterOp#647
Fixes # (issue)
Type of change
Please tick all options which are relevant.