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 /scripts | |
parent | f590505daf90dfb4059289a906863b59663e70a6 (diff) | |
download | Hyprland-4937352761525de4b034e5f0152261ff5e7552f3.tar.gz Hyprland-4937352761525de4b034e5f0152261ff5e7552f3.zip |
makefile: add asan
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/hyprlandStaticAsan.diff | 21 | ||||
-rw-r--r-- | scripts/waylandStatic.diff | 23 |
2 files changed, 44 insertions, 0 deletions
diff --git a/scripts/hyprlandStaticAsan.diff b/scripts/hyprlandStaticAsan.diff new file mode 100644 index 00000000..5499f793 --- /dev/null +++ b/scripts/hyprlandStaticAsan.diff @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 857e21de..122d6a78 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -101,7 +101,7 @@ message(STATUS "Checking deps...") + find_package(Threads REQUIRED) + find_package(PkgConfig REQUIRED) + find_package(OpenGL REQUIRED) +-pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-server wayland-client wayland-cursor wayland-protocols cairo libdrm xkbcommon libinput pango pangocairo pixman-1 hyprlang>=0.3.2) # we do not check for wlroots, as we provide it ourselves ++pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-client wayland-cursor wayland-protocols cairo libdrm xkbcommon libinput pango pangocairo pixman-1 hyprlang>=0.3.2 libffi) # we do not check for wlroots, as we provide it ourselves + + file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp") + +@@ -121,6 +121,7 @@ if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) + message(STATUS "Enabling ASan") + + target_link_libraries(Hyprland asan) ++ target_link_libraries(Hyprland ${CMAKE_SOURCE_DIR}/libwayland-server.a) + target_compile_options(Hyprland PUBLIC -fsanitize=address) + endif() +
\ No newline at end of file diff --git a/scripts/waylandStatic.diff b/scripts/waylandStatic.diff new file mode 100644 index 00000000..04aeda23 --- /dev/null +++ b/scripts/waylandStatic.diff @@ -0,0 +1,23 @@ +diff --git a/src/meson.build b/src/meson.build +index 5d04334..6645eec 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -170,7 +170,7 @@ if get_option('libraries') + error('We probably need to bump the SONAME of libwayland-server and -client') + endif + +- wayland_server = library( ++ wayland_server = static_library( + 'wayland-server', + sources: [ + wayland_server_protocol_core_h, +@@ -180,9 +180,6 @@ if get_option('libraries') + 'wayland-shm.c', + 'event-loop.c' + ], +- # To avoid an unnecessary SONAME bump, wayland 1.x.y produces +- # libwayland-server.so.0.x.y. +- version: '.'.join(['0', wayland_version[1], wayland_version[2]]), + dependencies: [ + epoll_dep, + ffi_dep, |