$ the-wire · showcase
NativeAOT drops libc++, R8 obfuscation gains primitives
By RepoJournal · Filed · About .NET
.NET for Android NativeAOT builds no longer link or ship libc++ and libunwind, while a new layer of R8 JNI mapping primitives lays groundwork for obfuscation support.
.NET for Android's NativeAOT support now stops linking and shipping libc++ and libunwind [1]. The change removes `libc++_static.a`, `libc++abi.a`, and `libunwind.a` from the link after eliminating local string helpers, so nothing in `libnaot-android` uses libc++ anymore. 32-bit ARM still requires EHABI personality routines, but this is a breaking change for anyone relying on those libraries being present.
Another .NET for Android commit removes `std::format` from the CoreCLR host [2]. The commit notes that `std::format` was "by far the biggest single contributor of libc++ symbols in the native host," pulling in `std::to_chars` and about 15 symbols per object file. This is the CoreCLR follow-up to the NativeAOT libc++ removal.
In the sdk repo, a fix addresses hosted Blazor WASM publishing [3]. Server publish output previously retained empty import maps and fingerprint placeholders because a separate project instance lost the transient HTML placeholder. The fix persists the original HTML as an `AssetKind=Publish` static web asset and keeps the replacement in the `Build` slot.
The analyzer tests in dotnet/sdk now use raw string literals instead of verbatim literals for multiline embedded source [4]. The change also removes extraneous blank lines and trailing whitespace where diagnostics and code fixes don't require them.
On the Android CI front, the CFSClean network isolation policy is now enabled [5], and the `BuildSummary` stage was removed from the `Xamarin.Android-PR` pipeline [6]. Arcade-services and performance repos also saw routine dependency and infrastructure updates [7] [8].
Action items
- → Review any NativeAOT Android builds that might depend on libc++ or libunwind being linked or shipped dotnet/android [immediate]
- → Verify hosted Blazor WASM publish output contains correct import maps and fingerprint assets dotnet/sdk [plan]
- → Monitor R8 JNI mapping additions for upcoming obfuscation build integration dotnet/android [monitor]
References
- [1] [NativeAOT] Stop linking and shipping libc++ and libunwind (#12523) ↗ dotnet/android
- [2] [native] Remove std::format from the CoreCLR host (#12534) ↗ dotnet/android
- [3] [wasm] Fix fingerprinting client-side assets for publish using the old school hosted approach ↗ dotnet/sdk
- [4] Use raw literals throughout analyzer tests ↗ dotnet/sdk
- [5] [ci] Enable CFSClean network isolation (#12643) ↗ dotnet/android
- [6] [ci] Remove BuildSummary phase (#12648) ↗ dotnet/android
- [7] [main] Update dependencies from dotnet/dnceng-shared (#6672) ↗ dotnet/arcade-services
- [8] Use apt lock timeout for prerequisites (#5296) ↗ dotnet/performance