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}"
|
pushd "${buildAndTestSubdir}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${cargoBuildType}" != "debug" ]; then
|
||||||
|
cargoBuildProfileFlag="--${cargoBuildType}"
|
||||||
|
fi
|
||||||
|
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
env \
|
env \
|
||||||
|
@ -19,7 +23,7 @@ cargoBuildHook() {
|
||||||
cargo build -j $NIX_BUILD_CORES \
|
cargo build -j $NIX_BUILD_CORES \
|
||||||
--target @rustTargetPlatformSpec@ \
|
--target @rustTargetPlatformSpec@ \
|
||||||
--frozen \
|
--frozen \
|
||||||
--${cargoBuildType} \
|
${cargoBuildProfileFlag} \
|
||||||
${cargoBuildFlags}
|
${cargoBuildFlags}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,11 @@ cargoCheckHook() {
|
||||||
threads=1
|
threads=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
argstr="--${cargoCheckType} --target @rustTargetPlatformSpec@ --frozen ${cargoTestFlags}";
|
if [ "${cargoBuildType}" != "debug" ]; then
|
||||||
|
cargoBuildProfileFlag="--${cargoBuildType}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
argstr="${cargoBuildProfileFlag} --target @rustTargetPlatformSpec@ --frozen ${cargoTestFlags}";
|
||||||
|
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
|
|
Loading…
Reference in a new issue