dotnet: strip native symbols from runtime
This reduces the output size of dotnet_9.vmr from 4.2GiB to 1.9GiB.
This commit is contained in:
parent
445b240555
commit
75c085f6c2
1 changed files with 8 additions and 0 deletions
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue