From 84a3d0e37e8f22b0b55f8bf932cb788b2bdd728f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 9 May 2023 13:43:29 -0500 Subject: [PATCH] [release/8.0-preview4] [wasi] Fix support for paths with spaces (#85998) * [wasi] Fix disabling wasi build for projects * [wasi] Fix quoting in Wasi targets * [wasi] WBT: don't run wasi targets for the tests project --------- Co-authored-by: Ankit Jain --- src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj | 2 +- src/mono/wasi/build/WasiApp.Native.targets | 10 +++++----- src/mono/wasi/build/WasiApp.props | 2 -- src/mono/wasi/build/WasiApp.targets | 6 +++--- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj b/src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj index dde5b3a169bea..eda5dcba5c782 100644 --- a/src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj +++ b/src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj @@ -17,7 +17,7 @@ true - false + false true false diff --git a/src/mono/wasi/build/WasiApp.Native.targets b/src/mono/wasi/build/WasiApp.Native.targets index 98b10bb21e366..75016fede60e7 100644 --- a/src/mono/wasi/build/WasiApp.Native.targets +++ b/src/mono/wasi/build/WasiApp.Native.targets @@ -94,7 +94,7 @@ - + <_WasiFilePathForFixup Include="@(_WasmRuntimePackSrcFile)" /> - <_WasiSdkClangArgs Condition="'$(OS)' == 'Windows_NT'" Include="$([System.String]::new(%(_WasiFilePathForFixup.Identity)).Replace('\', '/'))" /> - <_WasiSdkClangArgs Condition="'$(OS)' != 'Windows_NT'" Include="@(_WasiFilePathForFixup)" /> + <_WasiSdkClangArgs Condition="'$(OS)' == 'Windows_NT'" Include=""$([System.String]::new(%(_WasiFilePathForFixup.Identity)).Replace('\', '/'))"" /> + <_WasiSdkClangArgs Condition="'$(OS)' != 'Windows_NT'" Include="@(_WasiFilePathForFixup -> '"%(Identity)"')" /> <_WasiSdkClangArgs Include="@(_WasmCommonCFlags)" /> @@ -470,9 +470,9 @@ - + - + diff --git a/src/mono/wasi/build/WasiApp.props b/src/mono/wasi/build/WasiApp.props index 9a063a4d5e92f..727196d4b246f 100644 --- a/src/mono/wasi/build/WasiApp.props +++ b/src/mono/wasi/build/WasiApp.props @@ -7,13 +7,11 @@ wasi-wasm true partial - _WasiBuildNativeCore <_WasmBuildCoreDependsOn> _InitializeCommonProperties; _PrepareForAfterBuild; _BeforeWasmBuildApp; - $(WasmBuildNativeTarget); _WasiGenerateAppBundle; diff --git a/src/mono/wasi/build/WasiApp.targets b/src/mono/wasi/build/WasiApp.targets index 4f2ab83977ca7..190f89f786ab4 100644 --- a/src/mono/wasi/build/WasiApp.targets +++ b/src/mono/wasi/build/WasiApp.targets @@ -166,7 +166,7 @@ + Condition="'$(IsWasiProject)' == 'true' and '$(WasmBuildingForNestedPublish)' != 'true' and '$(IsCrossTargetingBuild)' != 'true'"> + Condition="'$(IsWasiProject)' == 'true' and '$(WasmBuildingForNestedPublish)' == '' and '$(WasmBuildOnlyAfterPublish)' != 'true' and '$(IsCrossTargetingBuild)' != 'true'" /> - +