Skip to content
Merged

Fix typo #158825

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 src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1917,7 +1917,7 @@ pub fn compiler_file(
return PathBuf::new();
}
let mut cmd = command(compiler);
cmd.args(builder.cc_handled_clags(target, c));
cmd.args(builder.cc_handled_cflags(target, c));
cmd.args(builder.cc_unhandled_cflags(target, GitRepo::Rustc, c));
cmd.arg(format!("-print-file-name={file}"));
let out = cmd.run_capture_stdout(builder).stdout();
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/src/core/build_steps/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ fn configure_cmake(
// Needs `suppressed_compiler_flag_prefixes` to be gone, and hence
// https://github.com/llvm/llvm-project/issues/88780 to be fixed.
for flag in builder
.cc_handled_clags(target, CLang::C)
.cc_handled_cflags(target, CLang::C)
.into_iter()
.chain(builder.cc_unhandled_cflags(target, GitRepo::Llvm, CLang::C))
.filter(|flag| !suppressed_compiler_flag_prefixes.iter().any(|p| flag.starts_with(p)))
Expand All @@ -821,7 +821,7 @@ fn configure_cmake(
cfg.define("CMAKE_C_FLAGS", cflags);
let mut cxxflags = ccflags.cxxflags.clone();
for flag in builder
.cc_handled_clags(target, CLang::Cxx)
.cc_handled_cflags(target, CLang::Cxx)
.into_iter()
.chain(builder.cc_unhandled_cflags(target, GitRepo::Llvm, CLang::Cxx))
.filter(|flag| {
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2682,9 +2682,9 @@ Please disable assertions with `rust.debug-assertions = false`.
// Only pass correct values for these flags for the `run-make` suite as it
// requires that a C++ compiler was configured which isn't always the case.
if !builder.config.dry_run() && mode == CompiletestMode::RunMake {
let mut cflags = builder.cc_handled_clags(target, CLang::C);
let mut cflags = builder.cc_handled_cflags(target, CLang::C);
cflags.extend(builder.cc_unhandled_cflags(target, GitRepo::Rustc, CLang::C));
let mut cxxflags = builder.cc_handled_clags(target, CLang::Cxx);
let mut cxxflags = builder.cc_handled_cflags(target, CLang::Cxx);
cxxflags.extend(builder.cc_unhandled_cflags(target, GitRepo::Rustc, CLang::Cxx));
cmd.arg("--cc")
.arg(builder.cc(target))
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ impl Build {

/// Returns C flags that `cc-rs` thinks should be enabled for the
/// specified target by default.
fn cc_handled_clags(&self, target: TargetSelection, c: CLang) -> Vec<String> {
fn cc_handled_cflags(&self, target: TargetSelection, c: CLang) -> Vec<String> {
if self.config.dry_run() {
return Vec::new();
}
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/src/utils/cc_detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub fn fill_target_compiler(build: &mut Build, target: TargetSelection) {
.or_else(|| cfg.try_get_archiver().map(|c| PathBuf::from(c.get_program())).ok());

build.cc.insert(target, compiler.clone());
let mut cflags = build.cc_handled_clags(target, CLang::C);
let mut cflags = build.cc_handled_cflags(target, CLang::C);
cflags.extend(build.cc_unhandled_cflags(target, GitRepo::Rustc, CLang::C));

// If we use llvm-libunwind, we will need a C++ compiler as well for all targets
Expand All @@ -146,7 +146,7 @@ pub fn fill_target_compiler(build: &mut Build, target: TargetSelection) {
build.do_if_verbose(|| println!("CC_{} = {:?}", target.triple, build.cc(target)));
build.do_if_verbose(|| println!("CFLAGS_{} = {cflags:?}", target.triple));
if let Ok(cxx) = build.cxx(target) {
let mut cxxflags = build.cc_handled_clags(target, CLang::Cxx);
let mut cxxflags = build.cc_handled_cflags(target, CLang::Cxx);
cxxflags.extend(build.cc_unhandled_cflags(target, GitRepo::Rustc, CLang::Cxx));
build.do_if_verbose(|| println!("CXX_{} = {cxx:?}", target.triple));
build.do_if_verbose(|| println!("CXXFLAGS_{} = {cxxflags:?}", target.triple));
Expand Down
Loading