Skip to content

Commit

Permalink
CI: Don't fail check-symbols if symbol is defiend somewhere else
Browse files Browse the repository at this point in the history
  • Loading branch information
itamar8910 authored and awesomekling committed Mar 19, 2021
1 parent ae67cab commit 4cb38f6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Meta/check-symbols.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ cd "$script_path/.." || exit 1
FORBIDDEN_SYMBOLS="__cxa_guard_acquire __cxa_guard_release"
LIBC_PATH="Build/Userland/Libraries/LibC/libc.a"
for forbidden_symbol in $FORBIDDEN_SYMBOLS; do
# check if symbol is undefined
if nm $LIBC_PATH | grep "U $forbidden_symbol" ; then
# check if there's an undefined reference to the symbol & it is not defined anywhere else in the library
nm $LIBC_PATH | grep "U $forbidden_symbol"
APPEARS_AS_UNDEFINED=$?
nm $LIBC_PATH | grep "T $forbidden_symbol"
APPEARS_AS_DEFINED=$?
if [ $APPEARS_AS_UNDEFINED -eq 0 ] && [ ! $APPEARS_AS_DEFINED -eq 0 ]; then
echo "Forbidden undefined symbol in LibC: $forbidden_symbol"
echo "See comment in Meta/check-symbols.sh for more info"
exit 1
Expand Down

0 comments on commit 4cb38f6

Please sign in to comment.