-
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
[wasm][wasi] Throw error when WasmBuildNative is explicitly set to false during a single-file build #98087
Merged
Merged
[wasm][wasi] Throw error when WasmBuildNative is explicitly set to false during a single-file build #98087
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
bddc91b
Add error when WasmBuildNative is explicitly false during single-file…
mkhamoyan 7b578c4
Remove the space
mkhamoyan 9e49413
Add WasmSingleFileBundle to _BoolPropertiesThatTriggerRelinking
mkhamoyan 88fb7ed
Move common _BoolPropertiesThatTriggerRelinking to WasmApp.Common.tar…
mkhamoyan 00af6dd
Implement general rule for WasmBuildNative=false
mkhamoyan dc06c88
Remove WasmBuildNative=false for trimmin tests
mkhamoyan 2d848cb
Merge branch 'main' into wasi_error_message
mkhamoyan dd84cc5
import MonoAotCrossCompiler
mkhamoyan fd2cf9f
Revert back explicitly setting false WasmBuildNative
mkhamoyan 1594192
Remove InvariantGlobalization from _BoolPropertiesThatTriggerRelinkin…
mkhamoyan 5492af3
exclude invariantglobalization from error
mkhamoyan e458b88
Try to enable WasmBuildNative only for InvariantGlobalizationTrue tests
mkhamoyan 9a61a09
Remove InvariantGlobalization from trigger relinking for browser
mkhamoyan 10f820a
Move under target
mkhamoyan 17bb799
disable trigger relinking for InvariantGlobalization
mkhamoyan 71a7599
Move RemoveInvariantGlobalization to testing/linker templates
mkhamoyan 810a970
Add space
mkhamoyan 4716ecc
Add target RemoveInvariantGlobalization only for wasm
mkhamoyan 4f53311
Fix syntax error
mkhamoyan 4ce8ce6
Merge branch 'main' into wasi_error_message
lewing b6c55f4
Add test case
mkhamoyan 3cf41b4
Update the test case
mkhamoyan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,13 @@ | |
<UsingTask TaskName="MonoTargetsTasks.MarshalingPInvokeScanner" AssemblyFile="$(MonoTargetsTasksAssemblyPath)" /> | ||
<UsingTask TaskName="EmitBundleObjectFiles" AssemblyFile="$(MonoTargetsTasksAssemblyPath)" /> | ||
|
||
<ItemGroup> | ||
<_BoolPropertiesThatTriggerRelinking Include="InvariantTimezone" DefaultValueInRuntimePack="false" /> | ||
<_BoolPropertiesThatTriggerRelinking Include="InvariantGlobalization" DefaultValueInRuntimePack="false" /> | ||
<_BoolPropertiesThatTriggerRelinking Include="WasmNativeStrip" DefaultValueInRuntimePack="true" /> | ||
<_BoolPropertiesThatTriggerRelinking Include="WasmSingleFileBundle" DefaultValueInRuntimePack="false" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<PrepareInputsForWasmBuildDependsOn> | ||
$(PrepareInputsForWasmBuildDependsOn); | ||
|
@@ -497,14 +504,18 @@ | |
Text="$(_ToolchainMissingErrorMessage) SDK is required for AOT'ing assemblies." /> | ||
|
||
<ItemGroup> | ||
<_BoolPropertiesThatTriggerRelinking Include="InvariantTimezone" DefaultValueInRuntimePack="false" /> | ||
<_BoolPropertiesThatTriggerRelinking Include="InvariantGlobalization" DefaultValueInRuntimePack="false" /> | ||
<_ChangedBoolPropertiesThatTriggerRelinking Include="%(_BoolPropertiesThatTriggerRelinking.Identity)" Condition="'$(%(_BoolPropertiesThatTriggerRelinking.Identity))' != '' and | ||
'$(%(_BoolPropertiesThatTriggerRelinking.Identity))' != '%(_BoolPropertiesThatTriggerRelinking.DefaultValueInRuntimePack)'" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<_WasmBuildNativeRequired Condition="@(_ChangedBoolPropertiesThatTriggerRelinking->Count()) > 0">true</_WasmBuildNativeRequired> | ||
</PropertyGroup> | ||
|
||
<Error Condition="'$(WasmBuildNative)' == 'false' and '$(_WasmBuildNativeRequired)' == 'true'" | ||
Text="WasmBuildNative is required because %(_ChangedBoolPropertiesThatTriggerRelinking.Identity)=$(%(_ChangedBoolPropertiesThatTriggerRelinking.Identity)), but WasmBuildNative is already set to 'false'." /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test needed for this. |
||
|
||
<PropertyGroup> | ||
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and | ||
'$(%(_BoolPropertiesThatTriggerRelinking.Identity))' != '' and | ||
'$(%(_BoolPropertiesThatTriggerRelinking.Identity))' != '%(_BoolPropertiesThatTriggerRelinking.DefaultValueInRuntimePack)'">true</WasmBuildNative> | ||
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(_WasmBuildNativeRequired)' == 'true'">true</WasmBuildNative> | ||
</PropertyGroup> | ||
|
||
<!-- When Building --> | ||
|
@@ -513,15 +524,13 @@ | |
<WasmBuildNative Condition="'$(RunAOTCompilation)' == 'true' and '$(RunAOTCompilationAfterBuild)' == 'true'">true</WasmBuildNative> | ||
|
||
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and @(NativeFileReference->Count()) > 0" >true</WasmBuildNative> | ||
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(WasmSingleFileBundle)' == 'true'">true</WasmBuildNative> | ||
</PropertyGroup> | ||
|
||
<!-- When Publishing --> | ||
<PropertyGroup Condition="'$(WasmBuildingForNestedPublish)' == 'true'"> | ||
<!-- AOT==true overrides WasmBuildNative --> | ||
<WasmBuildNative Condition="'$(RunAOTCompilation)' == 'true'">true</WasmBuildNative> | ||
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and @(NativeFileReference->Count()) > 0" >true</WasmBuildNative> | ||
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(WasmSingleFileBundle)' == 'true'">true</WasmBuildNative> | ||
|
||
<!-- not aot, not trimmed app, no reason to relink --> | ||
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(PublishTrimmed)' != 'true'">false</WasmBuildNative> | ||
|
Oops, something went wrong.
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.
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.
Do we need to register the target? The execution should be enforced by
BeforeTargets="_SetWasmBuildNativeDefaults"