mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 16:05:58 +01:00
debug: add WITH_ASAN flag in cmake
This commit is contained in:
parent
e76bd43f53
commit
9cf72a30fc
1 changed files with 5 additions and 2 deletions
|
@ -96,9 +96,12 @@ add_executable(Hyprland ${SRCFILES})
|
||||||
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
|
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||||
message(STATUS "Setting debug flags")
|
message(STATUS "Setting debug flags")
|
||||||
|
|
||||||
target_link_libraries(Hyprland asan)
|
if (WITH_ASAN)
|
||||||
|
target_link_libraries(Hyprland asan)
|
||||||
|
add_compile_options(-fsanitize=address)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_compile_options(-pg -no-pie -fno-builtin -fsanitize=address)
|
add_compile_options(-pg -no-pie -fno-builtin)
|
||||||
add_link_options(-pg -no-pie -fno-builtin)
|
add_link_options(-pg -no-pie -fno-builtin)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue