Skip to content

[wasm coreclr] Make clr.runtime+libs build on Windows #115058

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

Merged
merged 5 commits into from
May 26, 2025

Conversation

radekdoulik
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings April 25, 2025 18:32
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (3)
  • eng/native/configureplatform.cmake: Language not supported
  • src/coreclr/build-runtime.cmd: Language not supported
  • src/coreclr/runtime.proj: Language not supported

Copy link
Contributor

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

@@ -434,7 +434,7 @@ if(CLR_CMAKE_TARGET_OS STREQUAL haiku)
set(CLR_CMAKE_TARGET_HAIKU 1)
endif(CLR_CMAKE_TARGET_OS STREQUAL haiku)

if(CLR_CMAKE_TARGET_OS STREQUAL emscripten)
if(CLR_CMAKE_TARGET_OS STREQUAL emscripten OR CLR_CMAKE_TARGET_OS STREQUAL browser)
Copy link
Member

@akoeplinger akoeplinger Apr 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed? I think we should be using emscripten here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run build.cmd -os browser, the CLR_CMAKE_TARGET_OS is set to browser. Where is CLR_CMAKE_TARGET_OS set to emscripten? Maybe we should make it work similar on coreclr then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The emscripten toolchain sets CMAKE_SYSTEM_NAME to 'emscripten' and CLR_CMAKE_HOST_OS will pick that up by default. In mono, we aren't fully integrated with configureplatform.cmake and so we don't pass CLR_CMAKE_TARGET_OS like coreclr does. If it's not specified, it'll take the value of CLR_CMAKE_HOST_OS and that is 'emscripten'.

I think it might be better to set CLR_CMAKE_TARGET_OS to 'browser' in mono and let coreclr act normally.

@@ -152,6 +154,7 @@ if /i "%1" == "-enforcepgo" (set __EnforcePgo=1&shift&goto Arg_Loop)
if /i "%1" == "-pgodatapath" (set __PgoOptDataPath=%~2&set __PgoOptimize=1&shift&shift&goto Arg_Loop)
if /i "%1" == "-component" (set __RequestedBuildComponents=%__RequestedBuildComponents%-%2&set "__remainingArgs=!__remainingArgs:*%2=!"&shift&shift&goto Arg_Loop)
if /i "%1" == "-fsanitize" (set __CMakeArgs=%__CMakeArgs% "-DCLR_CMAKE_ENABLE_SANITIZERS=%2"&shift&shift&goto Arg_Loop)
if /i "%1" == "-keepnativesymbols" (set __CMakeArgs=%__CMakeArgs% "-DCLR_CMAKE_KEEP_NATIVE_SYMBOLS=true"&shift&goto Arg_Loop)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather use #114466 for that instead.

Copy link
Member Author

@radekdoulik radekdoulik Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way it is useful when you run the build-runtime scripts directly, to have faster roundtrip of runtime build. The build-runtime.sh already has this option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the batch gods are happy as the build fails locally for me with the ever clear The system cannot find the path specified.. The command line processing in this batch file can be brittle.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you call it? It worked fine for me.

I will enable windows build on CI to see if it works there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.\build.cmd -Subset clr+libs -os browser -arch wasm

@radekdoulik radekdoulik requested a review from steveisok May 21, 2025 18:15
@radekdoulik radekdoulik requested a review from akoeplinger May 21, 2025 18:15
@radekdoulik
Copy link
Member Author

@steveisok @akoeplinger it is now green. Could we merge it as is or do you want some additional changes?

@radekdoulik radekdoulik merged commit 82ef541 into dotnet:main May 26, 2025
156 of 159 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants