mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Meta: Support llvm-addr2line in serenity.sh
With this, the subcommands 'addr2line` and `kaddr2line` work as with the GNU toolchain.
This commit is contained in:
parent
10c3cf9a47
commit
928665d3bc
Notes:
sideshowbarker
2024-07-18 02:14:17 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/928665d3bcb Pull-request: https://github.com/SerenityOS/serenity/pull/9378 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/itamar8910 Reviewed-by: https://github.com/linusg ✅ Reviewed-by: https://github.com/nico Reviewed-by: https://github.com/timschumi
1 changed files with 8 additions and 1 deletions
|
@ -372,7 +372,12 @@ if [[ "$CMD" =~ ^(build|install|image|copy-src|run|gdb|test|rebuild|recreate|kad
|
|||
lagom_unsupported
|
||||
build_target
|
||||
[ $# -ge 1 ] || usage
|
||||
"$TOOLCHAIN_DIR/binutils/binutils/addr2line" -e "$BUILD_DIR/Kernel/Kernel" "$@"
|
||||
if [ "$TOOLCHAIN_TYPE" = "Clang" ]; then
|
||||
ADDR2LINE="$TOOLCHAIN_DIR/bin/llvm-addr2line"
|
||||
else
|
||||
ADDR2LINE="$TOOLCHAIN_DIR/binutils/binutils/addr2line"
|
||||
fi
|
||||
"$ADDR2LINE" -e "$BUILD_DIR/Kernel/Kernel" "$@"
|
||||
;;
|
||||
addr2line)
|
||||
build_target
|
||||
|
@ -382,6 +387,8 @@ if [[ "$CMD" =~ ^(build|install|image|copy-src|run|gdb|test|rebuild|recreate|kad
|
|||
if [ "$TARGET" = "lagom" ]; then
|
||||
command -v addr2line >/dev/null 2>&1 || die "Please install addr2line!"
|
||||
ADDR2LINE=addr2line
|
||||
elif [ "$TOOLCHAIN_TYPE" = "Clang" ]; then
|
||||
ADDR2LINE="$TOOLCHAIN_DIR/bin/llvm-addr2line"
|
||||
else
|
||||
ADDR2LINE="$TOOLCHAIN_DIR/binutils/binutils/addr2line"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue