-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Conversation
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
Tagging subscribers to 'arch-wasm': @lewing Issue Details
Fixes #96863
|
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.
I wonder if WasmSingleFileBundle
should also be added to _BoolPropertiesThatTriggerRelinking
instead of
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(WasmSingleFileBundle)' == 'true'">true</WasmBuildNative> |
That is a good idea. The error should happen everytime when |
Thanks! Updated. |
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -496,9 +496,13 @@ | |||
'$(_IsToolchainMissing)' == 'true'" | |||
Text="$(_ToolchainMissingErrorMessage) SDK is required for AOT'ing assemblies." /> | |||
|
|||
<Error Condition="'$(WasmBuildNative)' == 'false' and '$(WasmSingleFileBundle)' == 'true'" |
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.
this check need to run after _BoolPropertiesThatTriggerRelinking
caused the change
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.
@pavelsavara could you please clarify why? _BoolPropertiesThatTriggerRelinking
will only affect if $(WasmBuildNative)' == ''
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and |
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.
oh, it never sets it to false.
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.
but if users sets WasmBuildNative
false and also sets something which would make it true via _BoolPropertiesThatTriggerRelinking
we have broken combination.
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.
I see few common _BoolPropertiesThatTriggerRelinking
in BrowserWasmApp.targets
and in WasiApp.targets
could we have them in common place ?
Moved only |
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
Can we implement a general rule? For example setting |
/azp run runtime-wasm |
@@ -75,6 +75,18 @@ | |||
{AdditionalProjectReferences} | |||
</ItemGroup> | |||
|
|||
<Target Name="RemoveInvariantGlobalization" BeforeTargets="_SetWasmBuildNativeDefaults"> |
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.
The _SetWasmBuildNativeDefaults
target won't be there for other RIDs
<Target Name="RemoveInvariantGlobalization" BeforeTargets="_SetWasmBuildNativeDefaults"> | |
<Target Name="RemoveInvariantGlobalization" BeforeTargets="_SetWasmBuildNativeDefaults" Condition="'$(TargetArchitecture)' == 'wasm' and '$(TargetOS)' == 'browser'"> |
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 the trimming tests run for wasi?
Probably checking TargetArchitecture
is enough
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.
Yeah TargetArchitecture
will be enough.
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
<_BoolPropertiesThatTriggerRelinking Remove="InvariantGlobalization" /> | ||
</ItemGroup> | ||
</Target> | ||
<PropertyGroup Condition="'$(TargetArchitecture)' == 'wasm'"> |
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"
</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 comment
The reason will be displayed to describe this comment to others. Learn more.
Test needed for this.
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
|
WasmSingleFileBundle
requires native build; therefore, explicitly settingWasmBuildNative
tofalse
is not allowed.Fixes #96863