Skip to content

Commit

Permalink
Fix sanitizer linkage within veal and cmt libraries
Browse files Browse the repository at this point in the history
I suspect that our sanitizer flags were removed for these two CMake
targets. Instead of setting the properties directly, we call
target_compile_options and target_link_options
instead.
  • Loading branch information
sakertooth committed Sep 3, 2023
1 parent df77e2f commit b04dce8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/LadspaEffect/calf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ SET(INLINE_FLAGS "")
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
SET(INLINE_FLAGS "-finline-functions-called-once -finline-limit=80")
ENDIF()
SET_TARGET_PROPERTIES(veal PROPERTIES COMPILE_FLAGS "-fexceptions -O2 -finline-functions ${INLINE_FLAGS}")
target_compile_options(veal PRIVATE -fexceptions -O2 -finline-functions ${INLINE_FLAGS})

if(LMMS_BUILD_WIN32)
add_custom_command(
Expand All @@ -50,5 +50,5 @@ if(LMMS_BUILD_WIN32)
)
endif()
IF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD)
SET_TARGET_PROPERTIES(veal PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined")
target_link_options(veal PRIVATE -shared -Wl,$<IF:$<PLATFORM_ID:GNU>,-no-undefined,-undefined>)
ENDIF()
4 changes: 2 additions & 2 deletions plugins/LadspaEffect/cmt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ADD_LIBRARY(cmt MODULE ${SOURCES})
INSTALL(TARGETS cmt LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa")

SET_TARGET_PROPERTIES(cmt PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES(cmt PROPERTIES COMPILE_FLAGS "-Wall -O3 -fno-strict-aliasing")
target_compile_options(cmt PRIVATE -Wall -O3 -fno-strict-aliasing)

if(LMMS_BUILD_WIN32)
add_custom_command(
Expand All @@ -22,6 +22,6 @@ if(NOT LMMS_BUILD_WIN32)
endif()

IF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD)
SET_TARGET_PROPERTIES(cmt PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined")
target_link_options(cmt PRIVATE -shared -Wl,$<IF:$<PLATFORM_ID:GNU>,-no-undefined,-undefined>)
ENDIF()

0 comments on commit b04dce8

Please sign in to comment.