Skip to content

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Oct 13, 2025

This is version B)

  • refactor new eng/native.props
  • fix corehost/build.cmd
  • use STATIC_LIB_DESTINATION and move all JS outputs there
  • split System.Native.Browser-Rollup and System.Native.Browser-NpmInstall into it's own Common\JavaScript\CMakeLists.txt
  • split browserhost into libBrowserHost.a, so that it could be linked later on customer machine
  • removed native brotli from WASM build (for Mono too)
  • install into sharedFramework
    • libcoreclr_static, libclrinterpreter, libgcinfo_unix_wasm, libcoreclrminipal, libnativeresourcestring, libcoreclrpal
    • libSystem.Native, libSystem.Native.TimeZoneData, libSystem.Native.TimeZoneData.Invariant,
    • libSystem.Globalization.Native, libicuuc, libicui18n, libicudata
    • libSystem.IO.Compression.Native, libz
    • libSystem.Native.Browser, libSystem.Runtime.InteropServices.JavaScript
    • libBrowserHost, dotnet.js, dotnet.runtime.js
    • minipal
  • update eng/liveBuilds.targets to consume it from $(CoreCLRSharedFrameworkDir)

Fixes #120188

@pavelsavara pavelsavara added this to the 11.0.0 milestone Oct 13, 2025
@pavelsavara pavelsavara self-assigned this Oct 13, 2025
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-Host os-browser Browser variant of arch-wasm labels Oct 13, 2025
Copy link
Contributor

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

@pavelsavara pavelsavara marked this pull request as ready for review October 13, 2025 16:52
@Copilot Copilot AI review requested due to automatic review settings October 13, 2025 16:52
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 refactors the browser build system for CoreCLR runtime to integrate browserhost build into the clr.runtime subset. The key changes consolidate browser-specific assets into a shared framework directory and streamline the CMake build configuration.

Key changes:

  • Consolidate JavaScript/TypeScript build logic into a common CMakeLists.txt file
  • Split browserhost into static library (libBrowserHost.a) for customer linking
  • Install browser runtime assets to sharedFramework directory for consumption

Reviewed Changes

Copilot reviewed 35 out of 37 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/native/rollup.config.js Updates output paths to use staticLibDestination variable
src/native/rollup.config.defines.js Adds staticLibDestination export and normalizes configuration values
src/native/libs/build-native.proj Refactors native build arguments and removes hardcoded ICU/TZD paths
src/native/libs/Common/JavaScript/CMakeLists.txt New consolidated CMake file for JavaScript build logic
src/native/libs/System.Native.Browser/CMakeLists.txt Removes rollup build logic, delegates to Common/JavaScript
src/native/corehost/browserhost/host/CMakeLists.txt New CMake file for static browserhost library
src/native/corehost/browserhost/CMakeLists.txt Refactors to use static library and updated paths
src/coreclr/CMakeLists.txt Updates WASM build configuration and paths
eng/native.props New shared properties file for native build configuration
eng/liveBuilds.targets Updates CoreCLR browser runtime file paths

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Host os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[browser][coreCLR] provide PRODUCT_VERSION_JS & CI_BUILD_JS

1 participant