Skip to content

[browser][AOT] faster wasm-opt in CI tests #115624

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 3 commits into from
May 16, 2025

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented May 15, 2025

Don't add -g just because WasmNativeStrip is false, there is WasmNativeDebugSymbols true for that.
This is for all native builds.

We also drop -g from helix AOT test builds.

Contributes to #89402

@pavelsavara pavelsavara force-pushed the WasmNativeDebugSymbols branch from efa4890 to 5a5d5ee Compare May 16, 2025 08:22
@pavelsavara pavelsavara marked this pull request as ready for review May 16, 2025 11:17
@Copilot Copilot AI review requested due to automatic review settings May 16, 2025 11:17
@pavelsavara pavelsavara changed the title [browser][AOT] faster wasm-opt [browser][AOT] faster wasm-opt in CI tests May 16, 2025
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 optimizes Wasm AOT builds by removing unconditional debug symbol generation, introducing a toggle for native debug symbols, and adjusting test target conditions for CI runs.

  • Remove -g flag for faster wasm-opt passes
  • Add a new WasmNativeDebugSymbols property
  • Update test targets to set strip/debug symbols only in CI AOT scenarios

Reviewed Changes

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

File Description
src/mono/browser/build/BrowserWasmApp.targets Removed unconditional -g include for debug flags
eng/testing/tests.wasm.targets Added WasmNativeDebugSymbols to property list
eng/testing/tests.browser.targets Condition CI AOT builds for WasmNativeStrip and debug symbols
Comments suppressed due to low confidence (1)

src/mono/browser/build/BrowserWasmApp.targets:323

  • The new WasmNativeDebugSymbols property is introduced but never used. The -g flag was removed without replacing it with a conditional include based on WasmNativeDebugSymbols. Consider re-adding <_EmccCommonFlags Include="-g" Condition="'$(WasmNativeDebugSymbols)' == 'true'" /> to preserve debug-symbol toggling.
<_EmccCommonFlags Include="-g"                                       Condition="'$(WasmNativeStrip)' == 'false'" />

@lewing lewing merged commit b8a8930 into dotnet:main May 16, 2025
36 checks passed
@lewing
Copy link
Member

lewing commented May 20, 2025

did this change the state of the binaries we use for the microbenchmarks?

@pavelsavara
Copy link
Member Author

did this change the state of the binaries we use for the microbenchmarks?

it depends on what flags those binaries use. But assuming default WasmNativeStrip true and WasmNativeDebugSymbols false, it should have no impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants