mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 07:31:20 +00:00
Merge pull request #115008 from Hoverbear/rust-debug-build-support
rustPlatform.buildRustPackage: support debug builds
This commit is contained in:
commit
d8a19fb9ef
|
@ -9,6 +9,10 @@ cargoBuildHook() {
|
|||
pushd "${buildAndTestSubdir}"
|
||||
fi
|
||||
|
||||
if [ "${cargoBuildType}" != "debug" ]; then
|
||||
cargoBuildProfileFlag="--${cargoBuildType}"
|
||||
fi
|
||||
|
||||
(
|
||||
set -x
|
||||
env \
|
||||
|
@ -19,7 +23,7 @@ cargoBuildHook() {
|
|||
cargo build -j $NIX_BUILD_CORES \
|
||||
--target @rustTargetPlatformSpec@ \
|
||||
--frozen \
|
||||
--${cargoBuildType} \
|
||||
${cargoBuildProfileFlag} \
|
||||
${cargoBuildFlags}
|
||||
)
|
||||
|
||||
|
|
|
@ -16,7 +16,11 @@ cargoCheckHook() {
|
|||
threads=1
|
||||
fi
|
||||
|
||||
argstr="--${cargoCheckType} --target @rustTargetPlatformSpec@ --frozen ${cargoTestFlags}";
|
||||
if [ "${cargoBuildType}" != "debug" ]; then
|
||||
cargoBuildProfileFlag="--${cargoBuildType}"
|
||||
fi
|
||||
|
||||
argstr="${cargoBuildProfileFlag} --target @rustTargetPlatformSpec@ --frozen ${cargoTestFlags}";
|
||||
|
||||
(
|
||||
set -x
|
||||
|
|
Loading…
Reference in a new issue