[WASM] Add ILStrip task to wasm app build process (#88926)
authorFan Yang <52458914+fanyang-mono@users.noreply.github.com>
Thu, 10 Aug 2023 19:45:07 +0000 (15:45 -0400)
committerGitHub <noreply@github.com>
Thu, 10 Aug 2023 19:45:07 +0000 (15:45 -0400)
commit867e185209d329c406ab57aa7c9706e4ccbc9d56
tree6cc657ceb16214e1a44152fea6ada287f37b1e4f
parent15e89256b7f35b839725cefc9a8180b917573cdc
[WASM] Add ILStrip task to wasm app build process (#88926)

* Add ILStrip task to wasm app build process

* Make it work for wasm app building workflow

* Interp: stop inlining stripped methods. ILStrip: set code size to zero for tiny methods

* [mono][aot] Avoid adding some methods to the compiled method file.

* Methods which have 'deopt' set can enter the interpreter during EH.
* Methods which have 'interp_entry_only' set are AOTed, but the AOT
  code is only used to enter the interpreter.

* Only trim the methods that interpreter is able to call the aot'ed verion of it

* Add default value and documentation for WASMStripIL

* Move jit_call_can_be_supported to interp.c

* Minor format fix

* Add a test

* For testing

* Fix typo

* Skip TestUtilities Reference

* Address review feedback

* Change it to true

* Change name to trimming eligible

* Remove testing

* Address review feedback

* Address review feedback from Kate

* Add a var for llvm_only

---------

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
14 files changed:
docs/workflow/building/mono/README.md
src/mono/mono/mini/aot-compiler.c
src/mono/mono/mini/ee.h
src/mono/mono/mini/interp-stubs.c
src/mono/mono/mini/interp/interp-internals.h
src/mono/mono/mini/interp/interp.c
src/mono/mono/mini/interp/transform.c
src/mono/sample/HelloWorld/HelloWorld.csproj
src/mono/sample/HelloWorld/Makefile
src/mono/wasm/build/WasmApp.InTree.targets
src/mono/wasm/build/WasmApp.Native.targets
src/mono/wasm/build/WasmApp.targets
src/tasks/AotCompilerTask/MonoAOTCompiler.cs
src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs