Skip to content

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Oct 3, 2025

  • build clr+libs on CI
    • switch to Release because that's what src/tests need
    • avoid jitinterface_wasm.dll dependency
    • remove clr.nativecorelib subset from browser
    • make most of eng/liveBuilds.targets mono specific, disable part temporarily
    • disabled host.native subset temporarily
  • build src/tests/JIT/interpreter/ on CI
    • set(TEST_LIB_TYPE STATIC) for WASM and set(TEST_LIB_TYPE SHARED) for others
    • build only selected native dependencies for WASM rather than recursive all
  • fix src/mono/llvm/llvm-init.proj for windows debug

@pavelsavara pavelsavara added this to the 11.0.0 milestone Oct 3, 2025
@pavelsavara pavelsavara self-assigned this Oct 3, 2025
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture os-browser Browser variant of arch-wasm labels Oct 3, 2025
@pavelsavara pavelsavara changed the title [browser] subset src tests [browser] build more subsets + runtime interp test Oct 3, 2025
@pavelsavara
Copy link
Member Author

/azp run runtime

Copy link

Azure Pipelines failed to run 1 pipeline(s).

@pavelsavara
Copy link
Member Author

/azp run runtime

Copy link

Azure Pipelines failed to run 1 pipeline(s).

@pavelsavara
Copy link
Member Author

/azp run runtime

Copy link

Azure Pipelines failed to run 1 pipeline(s).

@pavelsavara pavelsavara marked this pull request as ready for review October 4, 2025 17:26
@Copilot Copilot AI review requested due to automatic review settings October 4, 2025 17:26
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.

Pull Request Overview

This PR enables building more subsets for the browser target and adds runtime interpreter tests for WebAssembly. The main goal is to expand CI capabilities for browser builds by switching from clr.runtime+libs to the full clr+libs subset and building JIT interpreter tests specifically for WASM.

Key changes:

  • Switch browser builds to use the full clr+libs subset in Release configuration
  • Enable native test building for browser targets by parameterizing library types
  • Add conditional compilation for WASM interpreter tests with fallback behavior

Reviewed Changes

Copilot reviewed 122 out of 122 changed files in this pull request and generated no comments.

Show a summary per file
File Description
eng/pipelines/runtime.yml Updates browser build to use clr+libs subset and adds interpreter test build step
src/tests/CMakeLists.txt Adds WASM-specific configuration with static library type and compiler flags
src/tests/JIT/interpreter/Interpreter.cs Adds WASM-specific early return and P/Invoke conditionals
Multiple CMakeLists.txt files Replaces hardcoded SHARED with ${TEST_LIB_TYPE} variable
Various configuration files Updates build configurations and dependency handling for browser/WASM targets


# add the executable
add_library (pinvoke SHARED ${SOURCES})
add_library (pinvoke ${TEST_LIB_TYPE} ${SOURCES})
Copy link
Contributor

Choose a reason for hiding this comment

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

The whole shared -> static lib change is "for the future" currently, since we don't have the code for linking into the (in-tree) host, right?

Copy link
Member Author

@pavelsavara pavelsavara Oct 5, 2025

Choose a reason for hiding this comment

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

right, we don't have generated pinvoke for coreCLR (but @radekdoulik has on his shortlist) and we are not considering on dynamic linking at all.

Copy link
Member Author

@pavelsavara pavelsavara Oct 5, 2025

Choose a reason for hiding this comment

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

I did consistent change for all those 120 files. But I need just 1 right now.

postBuildSteps:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests.yml
parameters:
testBuildArgs: test JIT/interpreter/Interpreter.csproj
Copy link
Member

Choose a reason for hiding this comment

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

<FeatureInterpreter> is currently conditional on ('$(Platform)' == 'x64' OR '$(Platform)' == 'arm64') AND ('$(Configuration)' == 'debug' OR '$(Configuration)' == 'checked') in clr.featuredefines.props. How will the interpreter tests pass in release configuration?

Copy link
Member Author

Choose a reason for hiding this comment

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

goal of this PR is only to build it, not to make it run. It's indeed not working in Release yet.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe add a comment to that effect so anyone investigating knows, but sounds fine then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Infrastructure-coreclr os-browser Browser variant of arch-wasm
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants