Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cargo-credential-wincred = { version = "0.4.23", path = "credential/cargo-creden
cargo-platform = { path = "crates/cargo-platform", version = "0.3.3" }
cargo-test-macro = { version = "0.4.12", path = "crates/cargo-test-macro" }
cargo-test-support = { version = "0.11.3", path = "crates/cargo-test-support" }
cargo-util = { version = "0.2.30", path = "crates/cargo-util" }
cargo-util = { version = "0.3.0", path = "crates/cargo-util" }
cargo-util-schemas = { version = "0.14.2", path = "crates/cargo-util-schemas" }
cargo-util-terminal = { version = "0.1.0", path = "crates/cargo-util-terminal" }
cargo_metadata = "0.23.1"
Expand Down
2 changes: 1 addition & 1 deletion crates/cargo-util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-util"
version = "0.2.30"
version = "0.3.0"
rust-version = "1.95" # MSRV:1
edition.workspace = true
license.workspace = true
Expand Down
9 changes: 6 additions & 3 deletions crates/cargo-util/src/process_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ impl ProcessBuilder {
}

/// (chainable) Adds multiple `args` to the args list.
pub fn args<T: AsRef<OsStr>>(&mut self, args: &[T]) -> &mut ProcessBuilder {
self.args
.extend(args.iter().map(|t| t.as_ref().to_os_string()));
pub fn args<I, T>(&mut self, args: I) -> &mut ProcessBuilder
where
I: IntoIterator<Item = T>,
T: Into<OsString>,
{
self.args.extend(args.into_iter().map(Into::into));
self
}

Expand Down
8 changes: 8 additions & 0 deletions src/cargo/core/compiler/build_runner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,15 @@ impl<'a, 'gctx> BuildRunner<'a, 'gctx> {
let mut unstable_opts = false;
let mut args = compiler::extern_args(&self, unit, &mut unstable_opts)?;
args.extend(compiler::lib_search_paths(&self, unit)?);
args.extend(compiler::opt_level_args(unit).map(Into::into));
args.extend(compiler::panic_strategy_args(unit).map(Into::into));
args.extend(compiler::lto_args(&self, unit));
args.extend(compiler::codegen_units_args(unit).map(Into::into));
args.extend(compiler::debuginfo_args(&self, unit).map(Into::into));
args.extend(compiler::debug_assertions_overflow_checks_args(unit).map(Into::into));
args.extend(compiler::rpath_args(unit).map(Into::into));
args.extend(compiler::add_codegen_linker(&self, unit)?);
args.extend(compiler::strip_args(unit).map(Into::into));
args.extend(compiler::features_args(unit));
args.extend(compiler::check_cfg_args(unit));

Expand Down
Loading
Loading