Use heaptrack for memory profiling on main

main
En Yi 2024-08-24 14:41:10 +08:00
parent add592afd2
commit 8645bbd963
2 changed files with 4 additions and 4 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ release/
web/
compile_commands.json
.gdb_history
heaptrack.*

View File

@ -34,10 +34,9 @@ add_executable(${PROJECT_NAME}
main.c
)
if (NOT EMSCRIPTEN)
target_compile_options(${PROJECT_NAME} PRIVATE -fsanitize=address -gdwarf-4)
target_link_options(${PROJECT_NAME} PRIVATE -fsanitize=address -gdwarf-4)
endif ()
# Use Heaptrack to profile the main application
# Do not compile in ASAN
target_include_directories(${PROJECT_NAME}
PRIVATE
${CMAKE_CURRENT_LIST_DIR}