Don't use check profile when expanding code on a release build

This commit is contained in:
Jan-Erik Rediger 2021-07-28 11:41:42 +02:00 committed by Emilio Cobos Álvarez
parent 6c96c8ab95
commit 34299aef56

View File

@ -92,7 +92,10 @@ pub fn expand(
cmd.arg("rustc");
cmd.arg("--lib");
cmd.arg("--profile=check");
// When build with the release profile we can't choose the `check` profile.
if profile != Profile::Release {
cmd.arg("--profile=check");
}
cmd.arg("--manifest-path");
cmd.arg(manifest_path);
if let Some(features) = expand_features {