mirror of
https://github.com/Zxilly/UA2F.git
synced 2025-12-31 15:30:32 +00:00
build: gc unused function
This commit is contained in:
parent
5469d76032
commit
593c644b38
@ -4,12 +4,15 @@ project(UA2F C)
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists(__malloc_hook "malloc.h" IS_LIBC_GLIBC)
|
||||
|
||||
if(IS_LIBC_GLIBC)
|
||||
add_compile_options(-fsanitize=address)
|
||||
add_link_options(-fsanitize=address)
|
||||
else()
|
||||
message(STATUS "AddressSanitizer is disabled.")
|
||||
endif()
|
||||
if (IS_LIBC_GLIBC)
|
||||
add_compile_options(-fsanitize=address)
|
||||
add_link_options(-fsanitize=address)
|
||||
else ()
|
||||
message(STATUS "AddressSanitizer is disabled.")
|
||||
endif ()
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-gc-sections")
|
||||
|
||||
add_compile_options(-std=gnu17)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user