Merge pull request #294576 from corngood/dotnet-vmr-size

dotnet: strip native symbols from runtime
This commit is contained in:
David McFarland 2024-03-11 13:43:34 -03:00 committed by GitHub
commit c2eb1270d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -187,6 +187,14 @@ in stdenv.mkDerivation rec {
substituteInPlace \
src/runtime/src/native/libs/CMakeLists.txt \
--replace-fail 'add_compile_options(-Weverything)' 'add_compile_options(-Wall)'
# strip native symbols in runtime
# see: https://github.com/dotnet/source-build/issues/2543
xmlstarlet ed \
--inplace \
-s //Project -t elem -n PropertyGroup \
-s \$prev -t elem -n KeepNativeSymbols -v false \
src/runtime/Directory.Build.props
''
+ lib.optionalString isLinux ''
substituteInPlace \