Skip to content
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

[wasi] Add build support for using wasm-opt #95900

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

radical
Copy link
Member

@radical radical commented Dec 12, 2023

This adds the build support but does not enable it by default which can be enabled with $(WasmRunWasmOpt)=true.
Also, a new wasm-props.json file is added to the wasi runtime pack. For browser this is emcc-props.json with a new name.

  • [wasm/wasi] Add new wasm-props.json to the runtime pack
    For browser this is emcc-props.json renamed. And for wasi, it's a new
    file.
  • [wasm/wasi] Extract target for running wasm-opt, and use for both browser, and wasi

@radical radical added arch-wasm WebAssembly architecture area-Build-mono labels Dec 12, 2023
@ghost
Copy link

ghost commented Dec 12, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

This adds the build support but does not enable it by default which can be enabled with $(WasmRunWasmOpt)=true.

  • [wasi] Add WasiSdkPath to WasmToolchainEnvVars
  • [wasm] Move wasm-opt to common targets
  • cleanup
  • [wasm] set some properties before importing common targets
Author: radical
Assignees: -
Labels:

arch-wasm, area-Build-mono

Milestone: -

@ghost ghost assigned radical Dec 12, 2023
@radical radical added Servicing-approved Approved for servicing release and removed Servicing-approved Approved for servicing release labels Dec 13, 2023
@radical
Copy link
Member Author

radical commented Dec 13, 2023

Update: TODO: wasm-opt run should respect incremental builds

For browser this is `emcc-props.json` renamed. And for wasi, it's a new
file.
@radical
Copy link
Member Author

radical commented Dec 13, 2023

TODO:

  • check for any regression in file sizes with browser, and blazor

@radical radical marked this pull request as ready for review December 13, 2023 10:35
@radical
Copy link
Member Author

radical commented Dec 13, 2023

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@maraf maraf left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@@ -370,9 +370,7 @@
<Error Condition="'$(_WasiOutputFileName)' == ''" Text="Could not determine $(_WasiOutputFileName)" />
</Target>

<Target Name="_CheckToolchainIsExpectedVersion">
Copy link
Member

Choose a reason for hiding this comment

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

Should we remove the target?

Copy link
Member Author

Choose a reason for hiding this comment

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

I want to implement this in a future PR.

@radical
Copy link
Member Author

radical commented Dec 13, 2023

The hybrid globalization failures are not specific to this PR, and filed as #95983 and #95981 .

@radical radical merged commit c5c54ef into dotnet:main Dec 13, 2023
199 of 204 checks passed
@radical radical deleted the wasm-opt-extract branch December 13, 2023 22:35
@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants