dotnetCorePackages.dotnet_{8..10}.vmr: enable separateDebugInfo
This commit is contained in:
parent
55abd9841e
commit
bea7bfde4a
@ -54,7 +54,7 @@ let
|
|||||||
|
|
||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
|
|
||||||
pushd "$src"/Private.SourceBuilt.Artifacts.*.${targetRid}
|
pushd "$src"/lib/Private.SourceBuilt.Artifacts.*.${targetRid}
|
||||||
pushd ${pname}.${version}.nupkg
|
pushd ${pname}.${version}.nupkg
|
||||||
|
|
||||||
xmlstarlet \
|
xmlstarlet \
|
||||||
@ -136,13 +136,13 @@ let
|
|||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p "$out"/share
|
mkdir -p "$out"/share
|
||||||
cp -r "$src"/dotnet-sdk-${version}-${targetRid} "$out"/share/dotnet
|
cp -r "$src"/lib/dotnet-sdk-${version}-${targetRid} "$out"/share/dotnet
|
||||||
chmod +w "$out"/share/dotnet
|
chmod +w "$out"/share/dotnet
|
||||||
mkdir "$out"/bin
|
mkdir "$out"/bin
|
||||||
ln -s "$out"/share/dotnet/dotnet "$out"/bin/dotnet
|
ln -s "$out"/share/dotnet/dotnet "$out"/bin/dotnet
|
||||||
|
|
||||||
mkdir -p "$artifacts"
|
mkdir -p "$artifacts"
|
||||||
cp -r "$src"/Private.SourceBuilt.Artifacts.*.${targetRid}/* "$artifacts"/
|
cp -r "$src"/lib/Private.SourceBuilt.Artifacts.*.${targetRid}/* "$artifacts"/
|
||||||
chmod +w -R "$artifacts"
|
chmod +w -R "$artifacts"
|
||||||
|
|
||||||
local package
|
local package
|
||||||
@ -193,7 +193,7 @@ let
|
|||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p "$out"/share
|
mkdir -p "$out"/share
|
||||||
cp -r "$src/dotnet-runtime-${version}-${targetRid}" "$out"/share/dotnet
|
cp -r "$src/lib/dotnet-runtime-${version}-${targetRid}" "$out"/share/dotnet
|
||||||
chmod +w "$out"/share/dotnet
|
chmod +w "$out"/share/dotnet
|
||||||
mkdir "$out"/bin
|
mkdir "$out"/bin
|
||||||
ln -s "$out"/share/dotnet/dotnet "$out"/bin/dotnet
|
ln -s "$out"/share/dotnet/dotnet "$out"/bin/dotnet
|
||||||
@ -221,12 +221,12 @@ let
|
|||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p "$out"/share
|
mkdir -p "$out"/share
|
||||||
cp -r "$src/dotnet-runtime-${runtime.version}-${targetRid}" "$out"/share/dotnet
|
cp -r "$src/lib/dotnet-runtime-${runtime.version}-${targetRid}" "$out"/share/dotnet
|
||||||
chmod +w "$out"/share/dotnet/shared
|
chmod +w "$out"/share/dotnet/shared
|
||||||
mkdir "$out"/bin
|
mkdir "$out"/bin
|
||||||
ln -s "$out"/share/dotnet/dotnet "$out"/bin/dotnet
|
ln -s "$out"/share/dotnet/dotnet "$out"/bin/dotnet
|
||||||
|
|
||||||
cp -Tr "$src/aspnetcore-runtime-${version}-${targetRid}"/shared/Microsoft.AspNetCore.App "$out"/share/dotnet/shared/Microsoft.AspNetCore.App
|
cp -Tr "$src/lib/aspnetcore-runtime-${version}-${targetRid}"/shared/Microsoft.AspNetCore.App "$out"/share/dotnet/shared/Microsoft.AspNetCore.App
|
||||||
chmod +w "$out"/share/dotnet/shared
|
chmod +w "$out"/share/dotnet/shared
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
|
|||||||
@ -188,14 +188,6 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace \
|
substituteInPlace \
|
||||||
src/runtime/src/native/libs/CMakeLists.txt \
|
src/runtime/src/native/libs/CMakeLists.txt \
|
||||||
--replace-fail 'add_compile_options(-Weverything)' 'add_compile_options(-Wall)'
|
--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 (lib.versionAtLeast version "9") (
|
+ lib.optionalString (lib.versionAtLeast version "9") (
|
||||||
''
|
''
|
||||||
@ -393,6 +385,10 @@ stdenv.mkDerivation rec {
|
|||||||
# bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
|
# bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
|
||||||
LOCALE_ARCHIVE = lib.optionalString isLinux "${glibcLocales}/lib/locale/locale-archive";
|
LOCALE_ARCHIVE = lib.optionalString isLinux "${glibcLocales}/lib/locale/locale-archive";
|
||||||
|
|
||||||
|
# clang: error: argument unused during compilation: '-Wa,--compress-debug-sections' [-Werror,-Wunused-command-line-argument]
|
||||||
|
# caused by separateDebugInfo
|
||||||
|
NIX_CFLAGS_COMPILE = "-Wno-unused-command-line-argument";
|
||||||
|
|
||||||
buildFlags = [
|
buildFlags = [
|
||||||
"--with-packages"
|
"--with-packages"
|
||||||
bootstrapSdk.artifacts
|
bootstrapSdk.artifacts
|
||||||
@ -447,11 +443,11 @@ stdenv.mkDerivation rec {
|
|||||||
''
|
''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir "$out"
|
mkdir -p "$out"/lib
|
||||||
|
|
||||||
pushd "artifacts/${assets}/Release"
|
pushd "artifacts/${assets}/Release"
|
||||||
find . -name \*.tar.gz | while read archive; do
|
find . -name \*.tar.gz | while read archive; do
|
||||||
target=$out/$(basename "$archive" .tar.gz)
|
target=$out/lib/$(basename "$archive" .tar.gz)
|
||||||
# dotnet 9 currently has two copies of the sdk tarball
|
# dotnet 9 currently has two copies of the sdk tarball
|
||||||
[[ ! -e "$target" ]] || continue
|
[[ ! -e "$target" ]] || continue
|
||||||
mkdir "$target"
|
mkdir "$target"
|
||||||
@ -460,7 +456,7 @@ stdenv.mkDerivation rec {
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
local -r unpacked="$PWD/.unpacked"
|
local -r unpacked="$PWD/.unpacked"
|
||||||
for nupkg in $out/Private.SourceBuilt.Artifacts.*.${targetRid}/{,SourceBuildReferencePackages/}*.nupkg; do
|
for nupkg in $out/lib/Private.SourceBuilt.Artifacts.*.${targetRid}/{,SourceBuildReferencePackages/}*.nupkg; do
|
||||||
rm -rf "$unpacked"
|
rm -rf "$unpacked"
|
||||||
unzip ${unzipFlags} "$unpacked" "$nupkg"
|
unzip ${unzipFlags} "$unpacked" "$nupkg"
|
||||||
chmod -R +rw "$unpacked"
|
chmod -R +rw "$unpacked"
|
||||||
@ -479,9 +475,6 @@ stdenv.mkDerivation rec {
|
|||||||
echo ${sigtool} > "$out"/nix-support/manual-sdk-deps
|
echo ${sigtool} > "$out"/nix-support/manual-sdk-deps
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# dotnet cli is in the root, so we need to strip from there
|
|
||||||
# TODO: should we install in $out/share/dotnet?
|
|
||||||
stripDebugList = [ "." ];
|
|
||||||
# stripping dlls results in:
|
# stripping dlls results in:
|
||||||
# Failed to load System.Private.CoreLib.dll (error code 0x8007000B)
|
# Failed to load System.Private.CoreLib.dll (error code 0x8007000B)
|
||||||
# stripped crossgen2 results in:
|
# stripped crossgen2 results in:
|
||||||
@ -491,6 +484,8 @@ stdenv.mkDerivation rec {
|
|||||||
stripExclude=(\*.dll crossgen2)
|
stripExclude=(\*.dll crossgen2)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
separateDebugInfo = true;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit releaseManifest buildRid targetRid;
|
inherit releaseManifest buildRid targetRid;
|
||||||
icu = _icu;
|
icu = _icu;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user