CI updates
This commit is contained in:
+10
-11
@@ -365,15 +365,14 @@ endfunction()
|
||||
|
||||
# sanitize a target; note that this may require special run-time support libs from your toolchain
|
||||
function(upx_sanitize_target) # ARGV
|
||||
# default sanitizer for Debug builds
|
||||
if(NOT DEFINED upx_sanitize_flags_debug)
|
||||
set(upx_sanitize_flags_debug -fsanitize=undefined -fsanitize-undefined-trap-on-error -fstack-protector-all)
|
||||
if(NOT DEFINED UPX_CONFIG_SANITIZE_FLAGS_DEBUG)
|
||||
# default sanitizer for Debug builds
|
||||
set(UPX_CONFIG_SANITIZE_FLAGS_DEBUG -fsanitize=undefined -fsanitize-undefined-trap-on-error -fstack-protector-all)
|
||||
endif()
|
||||
# default sanitizer for Release builds
|
||||
if(NOT DEFINED upx_sanitize_flags_release)
|
||||
set(upx_sanitize_flags_release -fstack-protector)
|
||||
if(NOT DEFINED UPX_CONFIG_SANITIZE_FLAGS_RELEASE)
|
||||
# default sanitizer for Release builds
|
||||
set(UPX_CONFIG_SANITIZE_FLAGS_RELEASE -fstack-protector)
|
||||
endif()
|
||||
|
||||
foreach(t ${ARGV})
|
||||
if(UPX_CONFIG_DISABLE_SANITIZE)
|
||||
# no-op
|
||||
@@ -391,10 +390,10 @@ function(upx_sanitize_target) # ARGV
|
||||
# unsupported compiler; unreliable/broken sanitize implementation before gcc-8 (May 2018)
|
||||
message(WARNING "WARNING: ignoring SANITIZE for target '${t}'")
|
||||
else()
|
||||
target_compile_options(${t} PRIVATE $<$<CONFIG:Debug>:${upx_sanitize_flags_debug}>)
|
||||
target_compile_options(${t} PRIVATE $<$<CONFIG:MinSizeRel>:${upx_sanitize_flags_release}>)
|
||||
target_compile_options(${t} PRIVATE $<$<CONFIG:Release>:${upx_sanitize_flags_release}>)
|
||||
target_compile_options(${t} PRIVATE $<$<CONFIG:RelWithDebInfo>:${upx_sanitize_flags_release}>)
|
||||
target_compile_options(${t} PRIVATE $<$<CONFIG:Debug>:${UPX_CONFIG_SANITIZE_FLAGS_DEBUG}>)
|
||||
target_compile_options(${t} PRIVATE $<$<CONFIG:MinSizeRel>:${UPX_CONFIG_SANITIZE_FLAGS_RELEASE}>)
|
||||
target_compile_options(${t} PRIVATE $<$<CONFIG:Release>:${UPX_CONFIG_SANITIZE_FLAGS_RELEASE}>)
|
||||
target_compile_options(${t} PRIVATE $<$<CONFIG:RelWithDebInfo>:${UPX_CONFIG_SANITIZE_FLAGS_RELEASE}>)
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
@@ -31,13 +31,15 @@ function(upx_print_info) # ARGV
|
||||
upx_print_var(CMAKE_SIZEOF_VOID_P)
|
||||
|
||||
# binutils
|
||||
upx_print_var(CMAKE_EXECUTABLE_FORMAT CMAKE_AR CMAKE_RANLIB)
|
||||
upx_print_var(CMAKE_EXECUTABLE_FORMAT CMAKE_EXECUTABLE_SUFFIX UPX_CONFIG_CMAKE_EXECUTABLE_SUFFIX)
|
||||
upx_print_var(CMAKE_AR CMAKE_RANLIB)
|
||||
|
||||
# compilers
|
||||
foreach(lang IN ITEMS ASM C CXX)
|
||||
upx_print_var(CMAKE_${lang}_COMPILER_LAUNCHER)
|
||||
upx_print_var(CMAKE_${lang}_COMPILER)
|
||||
upx_print_var(CMAKE_${lang}_COMPILER_ID)
|
||||
upx_print_var(CMAKE_${lang}_SIMULATE_ID)
|
||||
upx_print_var(CMAKE_${lang}_COMPILER_VERSION)
|
||||
upx_print_var(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT )
|
||||
upx_print_var(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID)
|
||||
@@ -50,6 +52,7 @@ function(upx_print_info) # ARGV
|
||||
upx_print_var(CMAKE_BUILD_WITH_INSTALL_RPATH)
|
||||
upx_print_var(CMAKE_INTERPROCEDURAL_OPTIMIZATION CMAKE_POSITION_INDEPENDENT_CODE)
|
||||
upx_print_var(PROPERTY_TARGET_SUPPORTS_SHARED_LIBS)
|
||||
upx_print_var(UPX_CONFIG_SANITIZE_FLAGS_DEBUG UPX_CONFIG_SANITIZE_FLAGS_RELEASE)
|
||||
|
||||
# shortcuts
|
||||
upx_print_var(APPLE CLANG CYGWIN GNU_FRONTEND GNUC MINGW MSVC MSVC_FRONTEND MSVC_IDE MSVC_TOOLSET_VERSION MSVC_VERSION MSYS UNIX WIN32 WIN64)
|
||||
|
||||
Reference in New Issue
Block a user