mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 09:00:17 +02:00
Merge pull request #3164 from neobrain/fix_thunks_asan
Thunks: Fix AddressSanitizer build
This commit is contained in:
1 file changed
+5
-2
@@ -78,8 +78,11 @@ function(add_host_lib NAME GUEST_BITNESS)
|
||||
## Make signed overflow well defined 2's complement overflow
|
||||
target_compile_options(${NAME}-host-${GUEST_BITNESS} PRIVATE -fwrapv)
|
||||
|
||||
# generated files forward-declare functions that need to be implemented manually, so pass --no-undefined to make sure errors are detected at compile-time rather than runtime
|
||||
target_link_options(${NAME}-host-${GUEST_BITNESS} PRIVATE "LINKER:--no-undefined")
|
||||
if (NOT ENABLE_ASAN)
|
||||
# generated files forward-declare functions that need to be implemented manually, so pass --no-undefined to make sure errors are detected at compile-time rather than runtime
|
||||
# NOTE: ASan is not compatible with --no-undefined, see https://github.com/google/sanitizers/issues/380 for details
|
||||
target_link_options(${NAME}-host-${GUEST_BITNESS} PRIVATE "LINKER:--no-undefined")
|
||||
endif()
|
||||
|
||||
if (${GUEST_BITNESS} EQUAL 32)
|
||||
install(TARGETS ${NAME}-host-${GUEST_BITNESS} DESTINATION ${HOSTLIBS_DATA_DIRECTORY}/HostThunks_32/)
|
||||
|
||||
Reference in new issue
Block a user