-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add support for rebuilding the wasm executable in non-aot mode. #45072
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vargaz
requested review from
akoeplinger,
EgorBo,
marek-safar and
steveisok
as code owners
November 22, 2020 17:36
vargaz
changed the title
Add support for rebuilding the wasm executable in non-aot mode by setting the 'BuildWasm' property to 'true'. Also run the pinvoke table generator.
Add support for rebuilding the wasm executable in non-aot mode.
Dec 18, 2020
vargaz
requested review from
steveisok
and removed request for
marek-safar,
steveisok,
EgorBo and
akoeplinger
December 18, 2020 08:15
* Run the pinvoke generator as well. * Strip the final executable. * Document some of the public msbuild properties.
radical
reviewed
Dec 18, 2020
Comment on lines
+175
to
+179
<Exec Command="$(_WasmEmcc) $(EmccCFlags) $(_WasmSrcDir)/driver.c -c -o driver.o" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(WasmBuildDir)" StandardOutputImportance="Low" /> | ||
<Exec Command="$(_WasmEmcc) $(EmccCFlags) $(_WasmSrcDir)/corebindings.c -c -o corebindings.o" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(WasmBuildDir)" StandardOutputImportance="Low" /> | ||
<Exec Command="$(_WasmEmcc) $(EmccCFlags) $(_WasmSrcDir)/pinvoke.c -c -o pinvoke.o" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(WasmBuildDir)" StandardOutputImportance="Low" /> | ||
<Exec Command="$(_WasmEmcc) $(EmccLDFlags) --js-library $(_WasmSrcDir)/library_mono.js --js-library $(_WasmSrcDir)/binding_support.js --js-library $(_WasmSrcDir)/dotnet_support.js --js-library $(_WasmSrcDir)/pal_random.js @(_WasmAssemblies->'%(LlvmBitcodeFile)', ' ') @(_WasmObjects, ' ') -o dotnet.js" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(WasmBuildDir)" StandardOutputImportance="Low" /> | ||
<Exec Condition="'$(WasmNativeStrip)' == 'true'" Command="$(EMSDK_PATH)/upstream/bin/wasm-opt --strip-dwarf dotnet.wasm -o dotnet.wasm" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(WasmBuildDir)" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like:
Suggested change
<Exec Command="$(_WasmEmcc) $(EmccCFlags) $(_WasmSrcDir)/driver.c -c -o driver.o" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(WasmBuildDir)" StandardOutputImportance="Low" /> | |
<Exec Command="$(_WasmEmcc) $(EmccCFlags) $(_WasmSrcDir)/corebindings.c -c -o corebindings.o" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(WasmBuildDir)" StandardOutputImportance="Low" /> | |
<Exec Command="$(_WasmEmcc) $(EmccCFlags) $(_WasmSrcDir)/pinvoke.c -c -o pinvoke.o" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(WasmBuildDir)" StandardOutputImportance="Low" /> | |
<Exec Command="$(_WasmEmcc) $(EmccLDFlags) --js-library $(_WasmSrcDir)/library_mono.js --js-library $(_WasmSrcDir)/binding_support.js --js-library $(_WasmSrcDir)/dotnet_support.js --js-library $(_WasmSrcDir)/pal_random.js @(_WasmAssemblies->'%(LlvmBitcodeFile)', ' ') @(_WasmObjects, ' ') -o dotnet.js" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(WasmBuildDir)" StandardOutputImportance="Low" /> | |
<Exec Condition="'$(WasmNativeStrip)' == 'true'" Command="$(EMSDK_PATH)/upstream/bin/wasm-opt --strip-dwarf dotnet.wasm -o dotnet.wasm" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(WasmBuildDir)" /> | |
<ItemGroup> | |
<_WasmJSLibrary Include="$(_WasmSrcDir)/library_mono.js" /> | |
<_WasmJSLibrary Include="$(_WasmSrcDir)/binding_support.js" /> | |
<_WasmJSLibrary Include="$(_WasmSrcDir)/dotnet_support.js" /> | |
<_WasmJSLibrary Include="$(_WasmSrcDir)/pal_random.js" /> | |
<_EmccOutputFile Include="driver.o" BuildArgs="$(EmccCFlags) $(_WasmSrcDir)/driver.c -c" /> | |
<_EmccOutputFile Include="corebindings.o" BuildArgs="$(EmccCFlags) $(_WasmSrcDir)/corebindings.c -c" /> | |
<_EmccOutputFile Include="pinvoke.o" BuildArgs="$(EmccCFlags) $(_WasmSrcDir)/pinvoke.c -c" /> | |
<_EmccOutputFile Include="dotnet.js" BuildArgs="$(EmccLDFlags) @(_WasmJSLibrary->'--js-library %(Identity)', ' ') @(_WasmAssemblies->'%(LlvmBitcodeFile)', ' ') @(_WasmObjects, ' ')"/> | |
</ItemGroup> | |
<Exec Command="$(_WasmEmcc) %(_EmccOutputFile.BuildArgs) -o %(_EmccOutputFile.Identity)" | |
WorkingDirectory="$(WasmBuildDir)" IgnoreStandardErrorWarningFormat="true" StandardOutputImportance="Low" StandardErrorImportance="Low" /> | |
<Exec Condition="'$(WasmNativeStrip)' == 'true'" | |
Command="$(EMSDK_PATH)/upstream/bin/wasm-opt --strip-dwarf dotnet.wasm -o dotnet.wasm" | |
WorkingDirectory="$(WasmBuildDir)" IgnoreStandardErrorWarningFormat="true" StandardOutputImportance="Low" /> | |
steveisok
reviewed
Dec 18, 2020
steveisok
approved these changes
Jan 4, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.