You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enable --compress-debug-sections in native linker #11304
This would reduce .so size in debug builds by compressing DWARF debug sections. Currently neither the CoreCLR/Mono nor NativeAOT link steps compress debug sections.
Blockers
The workload-shipped LLD (from dotnet/android-native-tools, version L_18.1.6-8.0.0-1) was built without LLVM_ENABLE_ZLIB and LLVM_ENABLE_ZSTD, so it errors with:
ld: error: --compress-debug-sections: LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at build time
The NDK's LLD supports zlib but not zstd.
Steps
Rebuild the android-native-tools package with LLVM_ENABLE_ZLIB=ON (and optionally LLVM_ENABLE_ZSTD=ON)
Uncomment the flag in NativeLinker.cs (use zlib for broadest compatibility, or zstd if the toolchain supports it)
Activity
Remove CompressDebugSections from NativeAOT link step