From 8645bbd963524e71ed0315b563900b438bfc8360 Mon Sep 17 00:00:00 2001 From: En Yi Date: Sat, 24 Aug 2024 14:41:10 +0800 Subject: [PATCH] Use heaptrack for memory profiling on main --- .gitignore | 1 + CMakeLists.txt | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index fcd8901..139c170 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ release/ web/ compile_commands.json .gdb_history +heaptrack.* diff --git a/CMakeLists.txt b/CMakeLists.txt index a6ccbe2..4cec5e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}