CI: Don't fail check-symbols if symbol is defiend somewhere else
This commit is contained in:
parent
ae67cabe11
commit
4cb38f6dd8
Notes:
sideshowbarker
2024-07-18 21:13:56 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/4cb38f6dd8c Pull-request: https://github.com/SerenityOS/serenity/pull/5808 Issue: https://github.com/SerenityOS/serenity/issues/5758
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue