Skip to content

Commit 42c2598

Browse files
committed
update
1 parent dab7427 commit 42c2598

File tree

2 files changed

+11
-23
lines changed

2 files changed

+11
-23
lines changed

ci/run.sh

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -47,27 +47,7 @@ else
4747
fi
4848
fi
4949

50-
51-
# Run a command for each `compiler_builtins` rlib file
52-
for_each_rlib() {
53-
shopt -s nullglob
54-
if [ -d /builtins-target ]; then
55-
rlib_paths=( /builtins-target/"${target}"/debug/deps/libcompiler_builtins-*.rlib )
56-
else
57-
rlib_paths=( target/"${target}"/debug/deps/libcompiler_builtins-*.rlib )
58-
fi
59-
60-
if [ "${#rlib_paths[@]}" -lt 1 ]; then
61-
echo "rlibs expected but not found"
62-
exit 1
63-
fi
64-
65-
"$@" "${rlib_paths[@]}"
66-
}
67-
68-
6950
# Remove any existing artifacts from previous tests that don't set #![compiler_builtins]
70-
for_each_rlib rm
7151
symcheck=(cargo run -p symbol-check)
7252
[[ "$target" = "wasm"* ]] && symcheck+=(--features wasm)
7353
symcheck+=(-- build-and-check)
@@ -137,8 +117,6 @@ symcheck+=(-- build-and-check)
137117
# fi
138118
# done
139119

140-
for_each_rlib rm
141-
142120
build_intrinsics_test() {
143121
"${symcheck[@]}" \
144122
--target "$target" --verbose \
@@ -156,7 +134,7 @@ build_intrinsics_test --features c --release
156134
CARGO_PROFILE_DEV_LTO=true build_intrinsics_test
157135
CARGO_PROFILE_RELEASE_LTO=true build_intrinsics_test --release
158136

159-
for_each_rlib "${symcheck[@]}" -- check-core-syms
137+
# for_each_rlib "${symcheck[@]}" -- check-core-syms
160138

161139
# # Ensure no references to any symbols from core
162140
# update_rlib_paths

crates/symbol-check/src/main.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ impl SymInfo {
127127
fn verify_no_duplicates(path: impl AsRef<Path>) {
128128
let mut syms = BTreeMap::<String, SymInfo>::new();
129129
let mut dups = Vec::new();
130+
let mut found_any = false;
130131

131132
for_each_symbol(path, |sym, member| {
132133
// Only check defined globals, exclude wasm file symbols
@@ -144,8 +145,12 @@ fn verify_no_duplicates(path: impl AsRef<Path>) {
144145
syms.insert(info.name.clone(), info);
145146
}
146147
}
148+
149+
found_any = true;
147150
});
148151

152+
assert!(found_any, "no symbols found");
153+
149154
if cfg!(windows) {
150155
// Ignore literal constants
151156
let allowed_dup_pfx = ["__real@", "__xmm@"];
@@ -164,6 +169,7 @@ fn verify_no_duplicates(path: impl AsRef<Path>) {
164169
fn verify_core_symbols(path: impl AsRef<Path>) {
165170
let mut defined = BTreeSet::new();
166171
let mut undefined = Vec::new();
172+
let mut found_any = false;
167173

168174
for_each_symbol(path, |sym, member| {
169175
// Find only symbols from `core`
@@ -177,8 +183,12 @@ fn verify_core_symbols(path: impl AsRef<Path>) {
177183
} else {
178184
defined.insert(info.name);
179185
}
186+
187+
found_any = true;
180188
});
181189

190+
assert!(found_any, "no symbols found");
191+
182192
// Discard any symbols that are defined somewhere in the archive
183193
undefined.retain(|sym| !defined.contains(&sym.name));
184194

0 commit comments

Comments
 (0)