Skip to content

Commit a9d4fa2

Browse files
committed
fix(websocket): propagate sanitizer flags to consumers for correct linking
- use PUBLIC compile options for sanitizer flags - use INTERFACE link options to ensure final executables link with ASAN/UBSAN - fix undefined reference to __asan_* and __ubsan_* in examples - ensure consistent sanitizer behavior with static libraries
1 parent fb97f67 commit a9d4fa2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ if (WEBSOCKET_SOURCES)
218218
endif()
219219

220220
if (VIX_ENABLE_SANITIZERS AND NOT MSVC)
221-
target_compile_options(vix_websocket PRIVATE
221+
target_compile_options(vix_websocket PUBLIC
222222
-fno-omit-frame-pointer
223223
-fsanitize=address,undefined
224224
)
225-
target_link_options(vix_websocket PRIVATE
225+
target_link_options(vix_websocket INTERFACE
226226
-fsanitize=address,undefined
227227
)
228228
endif()

0 commit comments

Comments
 (0)