mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2026-05-20 09:28:14 +02:00
Merge 'Omit -Wl,--no-undefined when -fsanitize= options are set' into 'main'
See merge request mesa/vulkan-wsi-layer!235
This commit is contained in:
commit
e22072775d
1 changed files with 6 additions and 1 deletions
|
|
@ -51,7 +51,12 @@ string(APPEND CMAKE_C_FLAGS
|
|||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
||||
if ("${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}" MATCHES "(^| )-fsanitize=")
|
||||
message(STATUS "Sanitizer-enabled build detected; not forcing -Wl,--no-undefined")
|
||||
else()
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN YES)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue