diff options
author | Vaxry <[email protected]> | 2024-03-01 14:14:28 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-03-01 14:14:28 +0000 |
commit | 4937352761525de4b034e5f0152261ff5e7552f3 (patch) | |
tree | e51e33280a561361ad2ee222de15c0143b4acfdd /Makefile | |
parent | f590505daf90dfb4059289a906863b59663e70a6 (diff) | |
download | Hyprland-4937352761525de4b034e5f0152261ff5e7552f3.tar.gz Hyprland-4937352761525de4b034e5f0152261ff5e7552f3.zip |
makefile: add asan
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -106,3 +106,24 @@ man: --variable=section:1 \ --from rst \ --to man > ./docs/hyprctl.1 + +asan: + @echo -en "!!WARNING!!\nOnly run this in the TTY.\n" + @pidof Hyprland > /dev/null && echo -ne "Refusing to run with Hyprland running.\n" || echo "" + @pidof Hyprland > /dev/null && exit 1 || echo "" + + rm -rf ./wayland + git reset --hard + + git clone --recursive https://gitlab.freedesktop.org/wayland/wayland + cd wayland && patch -p1 < ../scripts/waylandStatic.diff && meson setup build --buildtype=debug -Db_sanitize=address -Ddocumentation=false && ninja -C build && cd .. + cp ./wayland/build/src/libwayland-server.a . + @echo "Wayland done" + + patch -p1 < ./scripts/hyprlandStaticAsan.diff + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DWITH_ASAN:STRING=True -DUSE_TRACY:STRING=False -DUSE_TRACY_GPU:STRING=False -S . -B ./build -G Ninja + cmake --build ./build --config Debug --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` + @echo "Hyprland done" + + ASAN_OPTIONS="detect_odr_violation=0,log_path=asan.log" HYPRLAND_NO_CRASHREPORTER=1 ./build/Hyprland + |