Skip to content

Commit 0182879

Browse files
Apply suggestions from code review
Co-authored-by: Onur Özkan <onurozkan.dev@outlook.com>
1 parent f6162c9 commit 0182879

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/bootstrap/src/utils/cc_detect.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ use crate::core::config::TargetSelection;
2929
use crate::utils::exec::{BootstrapCommand, command};
3030
use crate::{Build, CLang, GitRepo};
3131

32+
/// Finds archiver tool for the given target if possible.
3233
/// FIXME(onur-ozkan): This logic should be replaced by calling into the `cc` crate.
33-
/// Determines the archiver tool to use for the given target based on the compiler.
3434
fn cc2ar(cc: &Path, target: TargetSelection, default_ar: PathBuf) -> Option<PathBuf> {
3535
if let Some(ar) = env::var_os(format!("AR_{}", target.triple.replace('-', "_"))) {
3636
Some(PathBuf::from(ar))
@@ -60,10 +60,6 @@ fn cc2ar(cc: &Path, target: TargetSelection, default_ar: PathBuf) -> Option<Path
6060
}
6161

6262
/// Creates and configures a new [`cc::Build`] instance for the given target.
63-
///
64-
/// This function initializes a new `cc::Build` object with a set of default options
65-
/// including optimization level, warning settings, and target/host configuration. It also
66-
/// applies static runtime configuration based on the target and build settings.
6763
fn new_cc_build(build: &Build, target: TargetSelection) -> cc::Build {
6864
let mut cfg = cc::Build::new();
6965
cfg.cargo_metadata(false)
@@ -302,7 +298,7 @@ pub(crate) fn ndk_compiler(compiler: Language, triple: &str, ndk: &Path) -> Path
302298
ndk.join("toolchains").join("llvm").join("prebuilt").join(host_tag).join("bin").join(compiler)
303299
}
304300

305-
/// An enum representing the target programming language for a native compiler.
301+
/// Representing the target programming language for a native compiler.
306302
///
307303
/// This enum is used to indicate whether a particular compiler is intended for C or C++.
308304
/// It also provides helper methods for obtaining the standard executable names for GCC and

0 commit comments

Comments
 (0)