Skip to content

Commit 9dda9ae

Browse files
committed
exclude file from dup check
1 parent ae9ab89 commit 9dda9ae

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

ci/run.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if [ "${TEST_VERBATIM:-}" = "1" ]; then
4343
--target "$target" --target-dir "$verb_path" --features c
4444
fi
4545

46-
# Set the `rlib_paths` global array to a list of all compiler-builtins rlibs
46+
# Run a command for each `compiler_builtins` rlib file
4747
for_each_rlib() {
4848
if [ -d /builtins-target ]; then
4949
rlib_paths=( /builtins-target/"${target}"/debug/deps/libcompiler_builtins-*.rlib )
@@ -60,8 +60,6 @@ for_each_rlib() {
6060
}
6161

6262
# Remove any existing artifacts from previous tests that don't set #![compiler_builtins]
63-
# update_rlib_paths
64-
# rm -f "${rlib_paths[@]}"
6563
for_each_rlib rm -f
6664

6765
cargo build --target "$target"
@@ -73,9 +71,9 @@ cargo build --target "$target" --release --features no-asm
7371
cargo build --target "$target" --features no-f16-f128
7472
cargo build --target "$target" --release --features no-f16-f128
7573

76-
74+
# The
7775
symcheck=(cargo run -p symbol-check)
78-
[[ "$target" = *"wasm"* ]] && symcheck+=(--features wasm)
76+
[[ "$target" = "wasm"* ]] && symcheck+=(--features wasm)
7977

8078
# Look out for duplicated symbols when we include the compiler-rt (C) implementation
8179
for_each_rlib "${symcheck[@]}" -- check-duplicates

crates/symbol-check/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ impl SymInfo {
6969

7070
/// Ensure that the same global symbol isn't defined in multiple object files within an archive.
7171
fn verify_no_duplicates(path: impl AsRef<Path>) {
72-
println!("Checking for duplicates at {}", path.as_ref().display());
72+
println!("Checking `{}` for duplicates", path.as_ref().display());
7373

7474
let mut syms = BTreeMap::<String, SymInfo>::new();
7575
let mut dups = Vec::new();
7676

7777
for_each_symbol(path, |sym, member| {
7878
// Only check defined globals
79-
if !sym.is_global() || sym.is_undefined() {
79+
if !sym.is_global() || sym.is_undefined() || sym.kind() == SymbolKind::File {
8080
return;
8181
}
8282

@@ -109,7 +109,7 @@ fn verify_no_duplicates(path: impl AsRef<Path>) {
109109
/// Ensure that there are no references to symbols from `core` that aren't also (somehow) defined.
110110
fn verify_core_symbols(path: impl AsRef<Path>) {
111111
println!(
112-
"Checking for references to core at {}",
112+
"Checking `{}` for references to core",
113113
path.as_ref().display()
114114
);
115115

0 commit comments

Comments
 (0)