mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-12 18:25:37 +00:00
cmake: add -Wl,--no-undefined to GCC linker flags
This way unresolved symbols will be detected when linking the shared library version.
This commit is contained in:
parent
569e595a1b
commit
95ced654cb
|
@ -340,6 +340,12 @@ if(USE_GCC OR USE_CLANG)
|
||||||
if(HAVE_GCC_WSHADOW)
|
if(HAVE_GCC_WSHADOW)
|
||||||
list(APPEND EXTRA_CFLAGS "-Wshadow")
|
list(APPEND EXTRA_CFLAGS "-Wshadow")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
|
||||||
|
check_c_compiler_flag("" HAVE_NO_UNDEFINED)
|
||||||
|
if(HAVE_NO_UNDEFINED)
|
||||||
|
list(APPEND EXTRA_LDFLAGS "-Wl,--no-undefined")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ASSEMBLY)
|
if(ASSEMBLY)
|
||||||
|
|
Loading…
Reference in a new issue