Skip to content

Commit 43c57a7

Browse files
committed
update
1 parent 33ac508 commit 43c57a7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

ci/run.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ symcheck+=(-- build-and-check)
6363
"${symcheck[@]}" -p compiler_builtins --target "$target" --features no-f16-f128 --release
6464

6565
build_intrinsics_test() {
66-
# Mostly we want to check that `cargo build` works, but we also go via
67-
# symcheck here to see if any duplicates sneak in somehow.
66+
# symcheck also checks the results of builtins-test-intrinsics
6867
"${symcheck[@]}" \
6968
--target "$target" --verbose \
7069
--manifest-path builtins-test-intrinsics/Cargo.toml "$@"

crates/symbol-check/src/main.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use object::{Object, ObjectSymbol, Symbol, SymbolKind, SymbolScope, SymbolSectio
1212
use serde_json::Value;
1313

1414
const CHECK_LIBRARIES: &[&str] = &["compiler_builtins", "builtins_test_intrinsics"];
15+
const CHECK_EXTENSIONS: &[Option<&str>] = &[Some("rlib"), Some("a"), Some("exe"), None];
1516

1617
const USAGE: &str = "Usage:
1718
@@ -55,7 +56,7 @@ fn exec_cargo_with_args(args: &[&str]) -> Vec<PathBuf> {
5556

5657
let stdout = cmd.stdout.take().unwrap();
5758
let reader = BufReader::new(stdout);
58-
let mut rlibs = Vec::new();
59+
let mut check_files = Vec::new();
5960

6061
for line in reader.lines() {
6162
let line = line.expect("failed to read line");
@@ -72,22 +73,22 @@ fn exec_cargo_with_args(args: &[&str]) -> Vec<PathBuf> {
7273
let path = fpath.as_str().expect("file name not a string");
7374
let path = PathBuf::from(path);
7475

75-
if path.extension().is_some_and(|ex| ex == "rlib") {
76+
if CHECK_EXTENSIONS.contains(&path.extension().map(|ex| ex.to_str().unwrap())) {
7677
let fname = path.file_name().unwrap().to_str().unwrap();
7778

7879
if CHECK_LIBRARIES.iter().any(|lib| fname.contains(lib)) {
79-
rlibs.push(path);
80+
check_files.push(path);
8081
}
8182
}
8283
}
8384
}
8485

8586
cmd.wait().expect("failed to wait on Cargo");
8687

87-
assert!(!rlibs.is_empty(), "no compiler_builtins rlibs found");
88-
println!("Collected the following rlibs to check: {rlibs:#?}");
88+
assert!(!check_files.is_empty(), "no compiler_builtins rlibs found");
89+
println!("Collected the following rlibs to check: {check_files:#?}");
8990

90-
rlibs
91+
check_files
9192
}
9293

9394
#[expect(unused)] // only for printing

0 commit comments

Comments
 (0)