Merge pull request #256949 from andresilva/build-rust-package-profiles

buildRustPackage: support custom cargo profiles
This commit is contained in:
figsoda 2023-09-29 15:54:49 -04:00 committed by GitHub
commit 14d44173e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 4 deletions

View File

@ -62,7 +62,6 @@
assert cargoVendorDir == null && cargoLock == null
-> !(args ? cargoSha256 && args.cargoSha256 != null) && !(args ? cargoHash && args.cargoHash != null)
-> throw "cargoSha256, cargoHash, cargoVendorDir, or cargoLock must be set";
assert buildType == "release" || buildType == "debug";
let

View File

@ -17,7 +17,7 @@ cargoBuildHook() {
fi
if [ "${cargoBuildType}" != "debug" ]; then
cargoBuildProfileFlag="--${cargoBuildType}"
cargoBuildProfileFlag="--profile ${cargoBuildType}"
fi
if [ -n "${cargoBuildNoDefaultFeatures-}" ]; then

View File

@ -17,7 +17,7 @@ cargoCheckHook() {
fi
if [ "${cargoCheckType}" != "debug" ]; then
cargoCheckProfileFlag="--${cargoCheckType}"
cargoCheckProfileFlag="--profile ${cargoCheckType}"
fi
if [ -n "${cargoCheckNoDefaultFeatures-}" ]; then

View File

@ -17,7 +17,7 @@ cargoNextestHook() {
fi
if [ "${cargoCheckType}" != "debug" ]; then
cargoCheckProfileFlag="--${cargoCheckType}"
cargoCheckProfileFlag="--cargo-profile ${cargoCheckType}"
fi
if [ -n "${cargoCheckNoDefaultFeatures-}" ]; then