feat: add profile flag

This commit is contained in:
YuKun Liu committed 2022-06-06 00:16:15 +08:00
1 parent 62d18441c7
commit 51639af482
5 files changed
+30

No files matched your search

+5
View File
@@ -49,6 +49,11 @@ pub fn build(config: &CrateConfig) -> Result<()> {
cmd.arg("--release");
}
if config.custom_profile.is_some() {
let custom_profile = config.custom_profile.as_ref().unwrap();
cmd.arg(format!("--profile {}", custom_profile));
}
match executable {
ExecutableType::Binary(name) => cmd.arg("--bin").arg(name),
ExecutableType::Lib(name) => cmd.arg("--lib").arg(name),