mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Kernel: Use our toolchain's c++filt tool for the kernel map
The host's version of c++filt might not work on some operating systems, e.g. macOS.
This commit is contained in:
parent
a68d912dc0
commit
b7ca269b4d
Notes:
sideshowbarker
2024-07-18 07:56:12 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/b7ca269b4d0 Pull-request: https://github.com/SerenityOS/serenity/pull/9084 Issue: https://github.com/SerenityOS/serenity/issues/9080
3 changed files with 4 additions and 2 deletions
|
@ -175,6 +175,7 @@ else()
|
|||
set(CMAKE_STRIP ${TOOLCHAIN_PREFIX}strip)
|
||||
set(CMAKE_AR ${TOOLCHAIN_PREFIX}gcc-ar)
|
||||
set(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
|
||||
set(CMAKE_CXXFILT ${TOOLCHAIN_PREFIX}c++filt)
|
||||
endif()
|
||||
|
||||
foreach(lang ASM C CXX OBJC OBJCXX)
|
||||
|
|
|
@ -451,7 +451,7 @@ add_dependencies(Kernel kernel_heap)
|
|||
|
||||
add_custom_command(
|
||||
TARGET Kernel POST_BUILD
|
||||
COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/mkmap.sh
|
||||
COMMAND ${CMAKE_COMMAND} -E env CXXFILT=${CMAKE_CXXFILT} sh ${CMAKE_CURRENT_SOURCE_DIR}/mkmap.sh
|
||||
COMMAND ${CMAKE_COMMAND} -E env OBJCOPY=${CMAKE_OBJCOPY} sh ${CMAKE_CURRENT_SOURCE_DIR}/embedmap.sh
|
||||
COMMAND ${CMAKE_OBJCOPY} --only-keep-debug Kernel Kernel.debug
|
||||
COMMAND ${CMAKE_OBJCOPY} --strip-debug Kernel
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
tmp=$(mktemp)
|
||||
nm -n Kernel | grep -vE \\.Lubsan_data | awk '{ if ($2 != "a") print; }' | uniq > "$tmp"
|
||||
printf "%08x\n" "$(wc -l "$tmp" | awk '{print $1}')" > kernel.map
|
||||
c++filt < "$tmp" >> kernel.map
|
||||
CXXFILT="${CXXFILT:-c++filt}"
|
||||
"$CXXFILT" < "$tmp" >> kernel.map
|
||||
rm -f "$tmp"
|
||||
|
|
Loading…
Reference in a new issue