Skip to content

Commit

Permalink
Rename flag to arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Oct 6, 2023
1 parent eddbd7c commit 4ea6e7f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1654,10 +1654,10 @@ impl<'a> Builder<'a> {
}

if let Some(host_linker) = self.linker(compiler.host) {
hostflags.flag(format!("-Clinker={}", host_linker.display()));
hostflags.arg(format!("-Clinker={}", host_linker.display()));
}
if self.is_fuse_ld_lld(compiler.host) {
hostflags.flag("-Clink-args=-fuse-ld=lld");
hostflags.arg("-Clink-args=-fuse-ld=lld");
}

if let Some(target_linker) = self.linker(target) {
Expand Down Expand Up @@ -1742,7 +1742,7 @@ impl<'a> Builder<'a> {

if let Some(x) = self.crt_static(compiler.host) {
let sign = if x { "+" } else { "-" };
hostflags.flag(format!("-Ctarget-feature={sign}crt-static"));
hostflags.arg(format!("-Ctarget-feature={sign}crt-static"));
}

if let Some(map_to) = self.build.debuginfo_map_to(GitRepo::Rustc) {
Expand Down Expand Up @@ -2244,7 +2244,7 @@ impl HostFlags {
const SEPARATOR: &'static str = " ";

/// Adds a host rustc flag.
fn flag<S: Into<String>>(&mut self, flag: S) {
fn arg<S: Into<String>>(&mut self, flag: S) {
let value = flag.into().trim().to_string();
assert!(!value.contains(Self::SEPARATOR));
self.rustc.push(value);
Expand Down

0 comments on commit 4ea6e7f

Please sign in to comment.