diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-07 17:42:06 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-06-20 09:51:42 +0000 |
commit | f5d83840943fb336a89d220e104045d7771df68e (patch) | |
tree | 5d4b54a7bab8f3560cfb2d0b78db7b34c598daa9 /pkgs/build-support | |
parent | 25e7c478927281e27c71375a4d6771de274ccda2 (diff) |
rustPlatform.cargoBuildHook: don't let cargo strip
This fixes debug info of cloud-hypervisor, which recently added strip = true to its release profile in Cargo.toml.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/rust/hooks/cargo-build-hook.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/build-support/rust/hooks/cargo-build-hook.sh b/pkgs/build-support/rust/hooks/cargo-build-hook.sh index 7503fae4cd7f5..af94e02e38ae7 100644 --- a/pkgs/build-support/rust/hooks/cargo-build-hook.sh +++ b/pkgs/build-support/rust/hooks/cargo-build-hook.sh @@ -5,6 +5,10 @@ cargoBuildHook() { runHook preBuild + # Let stdenv handle stripping, for consistency and to not break + # separateDebugInfo. + export "CARGO_PROFILE_${cargoBuildType@U}_STRIP"=false + if [ ! -z "${buildAndTestSubdir-}" ]; then # ensure the output doesn't end up in the subdirectory export CARGO_TARGET_DIR="$(pwd)/target" |