Skip to content

Rollup of 9 pull requests #136930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 25 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
93465e6
Mark condition/carry bit as clobbered in C-SKY inline assembly
taiki-e Jan 28, 2025
5932b2f
tests/assembly: make windows ABI test cross-compile
workingjubilee Feb 9, 2025
b3464fa
tests/assembly: make typed-swap test much less fragile
workingjubilee Feb 9, 2025
ee111b2
tests/assembly: use -Copt-level=3 instead of -O
workingjubilee Feb 9, 2025
833f070
tests/assembly: cross-compile x86-return-float
workingjubilee Feb 9, 2025
3580698
tests: issue-122805 -> dont-shuffle-bswaps
workingjubilee Feb 10, 2025
e11e2b4
compiler: internally merge `Conv::PtxKernel` into `GpuKernel`
workingjubilee Feb 10, 2025
be1d6df
cg_clif: stop worrying about `Conv::PtxKernel`
workingjubilee Feb 10, 2025
321fab4
Implement `read*_exact` for `std:io::repeat`
a1phyr Feb 10, 2025
c7f4bdd
Update stdarch
ehuss Feb 10, 2025
f410520
Enable s390x_target_feature in core
ehuss Feb 10, 2025
cde7e80
Cast allocas to default address space
Flakebi Feb 10, 2025
4c17270
tests: simplify dont-shuffle-bswaps test
workingjubilee Feb 10, 2025
3c0c9b6
tests/codegen: use -Copt-level=3 instead of -O
workingjubilee Feb 9, 2025
8a70219
use cc archiver as default in `cc2ar`
onur-ozkan Feb 12, 2025
80c60fe
std: replace the `FromInner` implementation for addresses with privat…
joboet Feb 7, 2025
77481fd
Rollup merge of #135025 - Flakebi:alloca-addrspace, r=nikic
GuillaumeGomez Feb 12, 2025
ea64533
Rollup merge of #136217 - taiki-e:csky-asm-flags, r=Amanieu
GuillaumeGomez Feb 12, 2025
0102a5f
Rollup merge of #136699 - joboet:netaddr_from_inner, r=cuviper
GuillaumeGomez Feb 12, 2025
999150c
Rollup merge of #136758 - workingjubilee:specify-opt-level-for-tests,…
GuillaumeGomez Feb 12, 2025
bbc3bb8
Rollup merge of #136761 - workingjubilee:specify-opt-level-for-codege…
GuillaumeGomez Feb 12, 2025
78c45fa
Rollup merge of #136807 - workingjubilee:merge-gpus-to-get-the-arcrad…
GuillaumeGomez Feb 12, 2025
79a9105
Rollup merge of #136818 - a1phyr:io_repeat_exact, r=jhpratt
GuillaumeGomez Feb 12, 2025
5224160
Rollup merge of #136831 - ehuss:update-stdarch, r=Amanieu
GuillaumeGomez Feb 12, 2025
9fe4c6a
Rollup merge of #136916 - onur-ozkan:fix-cc2ar, r=jieyouxu
GuillaumeGomez Feb 12, 2025
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
Prev Previous commit
Next Next commit
use cc archiver as default in cc2ar
We should remove entire `cc2ar` but `cc` doesn't seem to cover all the conditions that `cc2ar` handles.
For now, I replaced the `else` logic only, which is a bit hacky and unstable.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Feb 12, 2025
commit 8a70219a38487a59de2449e920302d900506118d
20 changes: 4 additions & 16 deletions src/bootstrap/src/utils/cc_detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ use crate::core::config::TargetSelection;
use crate::utils::exec::{BootstrapCommand, command};
use crate::{Build, CLang, GitRepo};

// The `cc` crate doesn't provide a way to obtain a path to the detected archiver,
// so use some simplified logic here. First we respect the environment variable `AR`, then
// try to infer the archiver path from the C compiler path.
// In the future this logic should be replaced by calling into the `cc` crate.
fn cc2ar(cc: &Path, target: TargetSelection) -> Option<PathBuf> {
/// FIXME(onur-ozkan): This logic should be replaced by calling into the `cc` crate.
fn cc2ar(cc: &Path, target: TargetSelection, default_ar: PathBuf) -> Option<PathBuf> {
if let Some(ar) = env::var_os(format!("AR_{}", target.triple.replace('-', "_"))) {
Some(PathBuf::from(ar))
} else if let Some(ar) = env::var_os("AR") {
Expand All @@ -57,16 +54,7 @@ fn cc2ar(cc: &Path, target: TargetSelection) -> Option<PathBuf> {
} else if target.contains("android") || target.contains("-wasi") {
Some(cc.parent().unwrap().join(PathBuf::from("llvm-ar")))
} else {
let parent = cc.parent().unwrap();
let file = cc.file_name().unwrap().to_str().unwrap();
for suffix in &["gcc", "cc", "clang"] {
if let Some(idx) = file.rfind(suffix) {
let mut file = file[..idx].to_owned();
file.push_str("ar");
return Some(parent.join(&file));
}
}
Some(parent.join(file))
Some(default_ar)
}
}

Expand Down Expand Up @@ -138,7 +126,7 @@ pub fn find_target(build: &Build, target: TargetSelection) {
let ar = if let ar @ Some(..) = config.and_then(|c| c.ar.clone()) {
ar
} else {
cc2ar(compiler.path(), target)
cc2ar(compiler.path(), target, PathBuf::from(cfg.get_archiver().get_program()))
};

build.cc.borrow_mut().insert(target, compiler.clone());
Expand Down
Loading