dotnet / runtimelab

This repo is for experimentation and exploring new ideas that may or may not make it into the main dotnet/runtime repo.
MIT License
1.37k stars 189 forks source link

[NativeAOT-LLVM] Implement time zone handling #2491

Closed SingleAccretion closed 5 months ago

SingleAccretion commented 5 months ago

Depends on #2490.

Build a new static library with the time zone data and use it.

With this change, no undefined symbols remain in HelloWasm for WASI.

SingleAccretion commented 5 months ago

Remaining undefined symbols in the smoke tests for WASI:

wasm-ld : error : D:/a/_work/1/s/artifacts/bin/microsoft.netcore.app.runtime.wasi-wasm/Release/runtimes/wasi-wasm/native/libSystem.Native.a(pal_io.c.obj): undefined symbol: mmap [D:\a\_work\1\s\src\tests\nativeaot\SmokeTests\Reflection\Reflection_FromUsage.csproj] [D:\a\_work\1\s\src\tests\build.proj]
wasm-ld : error : D:/a/_work/1/s/artifacts/bin/microsoft.netcore.app.runtime.wasi-wasm/Release/runtimes/wasi-wasm/native/libSystem.Native.a(pal_io.c.obj): undefined symbol: munmap [D:\a\_work\1\s\src\tests\nativeaot\SmokeTests\Reflection\Reflection_FromUsage.csproj] [D:\a\_work\1\s\src\tests\build.proj]
wasm-ld : error : D:/a/_work/1/s/artifacts/bin/microsoft.netcore.app.runtime.wasi-wasm/Release/runtimes/wasi-wasm/native/libSystem.Native.a(pal_io.c.obj): undefined symbol: mprotect [D:\a\_work\1\s\src\tests\nativeaot\SmokeTests\Reflection\Reflection_FromUsage.csproj] [D:\a\_work\1\s\src\tests\build.proj]
clang : error : linker command failed with exit code 1 (use -v to see invocation) [D:\a\_work\1\s\src\tests\nativeaot\SmokeTests\Reflection\Reflection_FromUsage.csproj] [D:\a\_work\1\s\src\tests\build.proj]
D:\a\_work\1\s\artifacts\bin\coreclr\wasi.wasm.Release\build\Microsoft.NETCore.Native.targets(580,5): error MSB3073: The command ""D:\a\_work\1\s\wasm-tools\wasi-sdk/bin/clang" @D:\a\_work\1\s\artifacts\tests\coreclr/obj/wasi.wasm.Release/Managed/nativeaot\SmokeTests\Reflection\Reflection_FromUsage\native\link.rsp " exited with code 1. [D:\a\_work\1\s\src\tests\nativeaot\SmokeTests\Reflection\Reflection_FromUsage.csproj] [D:\a\_work\1\s\src\tests\build.proj]
wasm-ld : error : D:/a/_work/1/s/artifacts/bin/microsoft.netcore.app.runtime.wasi-wasm/Release/runtimes/wasi-wasm/native/libSystem.Native.a(pal_io.c.obj): undefined symbol: mmap [D:\a\_work\1\s\src\tests\nativeaot\SmokeTests\Preinitialization\Preinitialization.csproj] [D:\a\_work\1\s\src\tests\build.proj]
wasm-ld : error : D:/a/_work/1/s/artifacts/bin/microsoft.netcore.app.runtime.wasi-wasm/Release/runtimes/wasi-wasm/native/libSystem.Native.a(pal_io.c.obj): undefined symbol: munmap [D:\a\_work\1\s\src\tests\nativeaot\SmokeTests\Preinitialization\Preinitialization.csproj] [D:\a\_work\1\s\src\tests\build.proj]
wasm-ld : error : D:/a/_work/1/s/artifacts/bin/microsoft.netcore.app.runtime.wasi-wasm/Release/runtimes/wasi-wasm/native/libSystem.Native.a(pal_io.c.obj): undefined symbol: mprotect [D:\a\_work\1\s\src\tests\nativeaot\SmokeTests\Preinitialization\Preinitialization.csproj] [D:\a\_work\1\s\src\tests\build.proj]

The former is an upstream issue (memory mapped files are not supported). The latter is #2476.

SingleAccretion commented 5 months ago

@dotnet/nativeaot-llvm