Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 885cb25

Browse files
committedAug 30, 2019
When checking undefined symbol list, ignore certain llvm buildins
These can vary between llvm version. For example a recent upstream change recently added __multi3 to the list: https://reviews.llvm.org/D65143 Fixes #98
1 parent d498fc3 commit 885cb25

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed
 

‎Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -451,12 +451,14 @@ finish: startup_files libc
451451
# Collect symbol information.
452452
# TODO: Use llvm-nm --extern-only instead of grep. This is blocked on
453453
# LLVM PR40497, which is fixed in 9.0, but not in 8.0.
454+
# Ignore certain llvm builtin symbols such as those starting with __mul
455+
# since these dependencies can vary between llvm versions.
454456
"$(WASM_NM)" --defined-only "$(SYSROOT_LIB)"/libc.a "$(SYSROOT_LIB)"/*.o \
455457
|grep ' [[:upper:]] ' |sed 's/.* [[:upper:]] //' |LC_ALL=C sort > "$(SYSROOT_SHARE)/defined-symbols.txt"
456458
for undef_sym in $$("$(WASM_NM)" --undefined-only "$(SYSROOT_LIB)"/*.a "$(SYSROOT_LIB)"/*.o \
457459
|grep ' U ' |sed 's/.* U //' |LC_ALL=C sort |uniq); do \
458460
grep -q '\<'$$undef_sym'\>' "$(SYSROOT_SHARE)/defined-symbols.txt" || echo $$undef_sym; \
459-
done > "$(SYSROOT_SHARE)/undefined-symbols.txt"
461+
done | grep -v "^__mul" > "$(SYSROOT_SHARE)/undefined-symbols.txt"
460462
grep '^_*wasi_' "$(SYSROOT_SHARE)/undefined-symbols.txt" \
461463
> "$(SYSROOT_LIB)/libc.imports"
462464

‎expected/wasm32-wasi/undefined-symbols.txt

-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ __getf2
1212
__gttf2
1313
__letf2
1414
__lttf2
15-
__muldc3
16-
__muloti4
17-
__mulsc3
18-
__multc3
19-
__multf3
2015
__netf2
2116
__stack_pointer
2217
__subtf3

0 commit comments

Comments
 (0)
Please sign in to comment.