Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
Fixes for user profile dir containing spaces. Fixes #14
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSandersonMS committed Jul 29, 2022
1 parent 20ea5b9 commit 9c898ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Wasi.Sdk/build/Wasi.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<WasiSdkUrl Condition="$([MSBuild]::IsOSPlatform('Linux'))">https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-linux.tar.gz</WasiSdkUrl>
<WasiSdkUrl Condition="$([MSBuild]::IsOSPlatform('OSX'))">https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-macos.tar.gz</WasiSdkUrl>

<WasiSdkRoot>$([System.IO.Path]::Combine($([System.Environment]::GetFolderPath(SpecialFolder.UserProfile)), ".wasi-sdk", "wasi-sdk-$(WasiSdkVersion)"))</WasiSdkRoot>
<WasiSdkRoot>$([System.IO.Path]::Combine("$([System.Environment]::GetFolderPath(SpecialFolder.UserProfile))", ".wasi-sdk", "wasi-sdk-$(WasiSdkVersion)"))</WasiSdkRoot>
<WasiClang>$(WasiSdkRoot)\bin\clang</WasiClang>
<WasiClang Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(WasiClang).exe</WasiClang>
<WasiRuntimePackRoot>$(MSBuildThisFileDirectory)..\packs\wasi-wasm\</WasiRuntimePackRoot>
Expand Down Expand Up @@ -194,8 +194,8 @@
<!-- Invoke the WASI SDK clang binary to build the .wasm file -->
<PropertyGroup>
<WasiSdkClangArgs>@(WasiNativeFileReference, ' ')</WasiSdkClangArgs>
<WasiSdkClangArgs>$(WasiSdkClangArgs) --sysroot=$(WasiSdkRoot)\share\wasi-sysroot</WasiSdkClangArgs>
<WasiSdkClangArgs>$(WasiSdkClangArgs) -I$(WasiRuntimePackRoot)native\include</WasiSdkClangArgs>
<WasiSdkClangArgs>$(WasiSdkClangArgs) --sysroot="$(WasiSdkRoot)\share\wasi-sysroot"</WasiSdkClangArgs>
<WasiSdkClangArgs>$(WasiSdkClangArgs) -I"$(WasiRuntimePackRoot)\native\include"</WasiSdkClangArgs>
<WasiSdkClangArgs>$(WasiSdkClangArgs) -Wl,--export=malloc,--export=free,--export=__heap_base,--export=__data_end</WasiSdkClangArgs>
<WasiSdkClangArgs>$(WasiSdkClangArgs) -Wl,-z,stack-size=1048576,--initial-memory=524288000,--max-memory=524288000,-lwasi-emulated-mman</WasiSdkClangArgs>
<WasiSdkClangArgs Condition="'@(WasiAfterRuntimeLoadedDeclarations)' != ''">$(WasiSdkClangArgs) -D WASI_AFTER_RUNTIME_LOADED_DECLARATIONS=&quot;@(WasiAfterRuntimeLoadedDeclarations, ' ')&quot;</WasiSdkClangArgs>
Expand Down Expand Up @@ -240,7 +240,7 @@
<!-- Windows 10+ has tar built in, so this should work cross-platform -->
<Message Importance="high" Text="Extracting @(WasiSdkDownloadTempFile) to $(WasiSdkRoot)..." />
<MakeDir Directories="$(WasiSdkRoot)" />
<Exec Command="tar -xf &quot;@(WasiSdkDownloadTempFile)&quot; -C &quot;$(WasiSdkRoot)&quot; --strip-components=1" />
<Exec Command="tar -xf &quot;@(WasiSdkDownloadTempFile)&quot; -C . --strip-components=1" WorkingDirectory="$(WasiSdkRoot)" />
<RemoveDir Directories="$(WasiSdkDownloadTempDir)" />
</Target>

Expand Down

0 comments on commit 9c898ac

Please sign in to comment.