From 52a13b8125c47617e47902351e6d6d47e675c3a7 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 15 Nov 2023 13:38:43 +0100 Subject: [PATCH] separateDebugInfo: use NIX_RUSTFLAGS Setting RUSTFLAGS causes Cargo to ignore other ways of configuring flags, including the target-specific RUSTFLAGS options. This broke pkgsCross.musl64.crosvm, and was surprising to users. Fixes: https://github.com/NixOS/nixpkgs/pull/261727 --- pkgs/build-support/setup-hooks/separate-debug-info.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/setup-hooks/separate-debug-info.sh b/pkgs/build-support/setup-hooks/separate-debug-info.sh index 3a16ac4fee90..197e8a920b70 100644 --- a/pkgs/build-support/setup-hooks/separate-debug-info.sh +++ b/pkgs/build-support/setup-hooks/separate-debug-info.sh @@ -1,7 +1,7 @@ export NIX_SET_BUILD_ID=1 export NIX_LDFLAGS+=" --compress-debug-sections=zlib" export NIX_CFLAGS_COMPILE+=" -ggdb -Wa,--compress-debug-sections" -export RUSTFLAGS+=" -g" +export NIX_RUSTFLAGS+=" -g" fixupOutputHooks+=(_separateDebugInfo)