1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 17:44:48 +09:00

Revert "Migrate to zlib-ng, part 2: consume it in runtime (#102403)" (#104414)

This reverts commit f5c9a5e8f5.
This commit is contained in:
Andy Gocke 2024-07-04 06:47:50 -07:00 committed by GitHub
parent 2a72651144
commit 5b86dca8e7
Signed by: github
GPG key ID: B5690EEEBB952194
33 changed files with 183 additions and 267 deletions

View file

@ -12,11 +12,6 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# We need to set this to Release as there's no way to intercept configuration-specific linker flags
# for try_compile-style tests (like check_c_source_compiles) and some of the default Debug flags
# (ie. /INCREMENTAL) conflict with our own flags.
set(CMAKE_TRY_COMPILE_CONFIGURATION Release)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
include(CheckLinkerFlag)
@ -63,7 +58,6 @@ if (MSVC)
define_property(TARGET PROPERTY CLR_CONTROL_FLOW_GUARD INHERITED BRIEF_DOCS "Controls the /guard:cf flag presence" FULL_DOCS "Set this property to ON or OFF to indicate if the /guard:cf compiler and linker flag should be present")
define_property(TARGET PROPERTY CLR_EH_CONTINUATION INHERITED BRIEF_DOCS "Controls the /guard:ehcont flag presence" FULL_DOCS "Set this property to ON or OFF to indicate if the /guard:ehcont compiler flag should be present")
define_property(TARGET PROPERTY CLR_EH_OPTION INHERITED BRIEF_DOCS "Defines the value of the /EH option" FULL_DOCS "Set this property to one of the valid /EHxx options (/EHa, /EHsc, /EHa-, ...)")
define_property(TARGET PROPERTY MSVC_WARNING_LEVEL INHERITED BRIEF_DOCS "Define the warning level for the /Wn option" FULL_DOCS "Set this property to one of the valid /Wn options (/W0, /W1, /W2, /W3, /W4)")
set_property(GLOBAL PROPERTY CLR_CONTROL_FLOW_GUARD ON)
@ -785,8 +779,7 @@ if (MSVC)
# [[! Microsoft.Security.SystemsADM.10086 !]] - SDL required warnings
# set default warning level to 4 but allow targets to override it.
set_property(GLOBAL PROPERTY MSVC_WARNING_LEVEL 4)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/W$<TARGET_PROPERTY:MSVC_WARNING_LEVEL>>)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/W$<GENEX_EVAL:$<IF:$<BOOL:$<TARGET_PROPERTY:MSVC_WARNING_LEVEL>>,$<TARGET_PROPERTY:MSVC_WARNING_LEVEL>,4>>>)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/WX>) # treat warnings as errors
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/Oi>) # enable intrinsics
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/Oy->) # disable suppressing of the creation of frame pointers on the call stack for quicker function calls

View file

@ -500,9 +500,3 @@ if(LOWERCASE_CMAKE_BUILD_TYPE STREQUAL debug)
string(REPLACE "-D_FORTIFY_SOURCE=2 " "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "-D_FORTIFY_SOURCE=2 " "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
endif()
if (CLR_CMAKE_TARGET_ANDROID OR CLR_CMAKE_TARGET_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS OR CLR_CMAKE_HOST_ARCH_ARMV6)
# Our zlib-ng copy should only be used in non-mobile platforms only.
# In mobile platforms we should use the zlib package provided by the system.
set(CLR_CMAKE_USE_SYSTEM_ZLIB 1)
endif()

View file

@ -221,7 +221,7 @@ function(preprocess_file inputFilename outputFilename)
get_compile_definitions(PREPROCESS_DEFINITIONS)
get_include_directories(PREPROCESS_INCLUDE_DIRECTORIES)
get_source_file_property(SOURCE_FILE_DEFINITIONS ${inputFilename} COMPILE_DEFINITIONS)
foreach(DEFINITION IN LISTS SOURCE_FILE_DEFINITIONS)
list(APPEND PREPROCESS_DEFINITIONS -D${DEFINITION})
endforeach()
@ -508,7 +508,7 @@ function(install_static_library targetName destination component)
if (WIN32)
set_target_properties(${targetName} PROPERTIES
COMPILE_PDB_NAME "${targetName}"
COMPILE_PDB_OUTPUT_DIRECTORY "$<TARGET_FILE_DIR:${targetName}>"
COMPILE_PDB_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}"
)
install (FILES "$<TARGET_FILE_DIR:${targetName}>/${targetName}.pdb" DESTINATION ${destination} COMPONENT ${component})
endif()