Skip to content

Commit

Permalink
Started rework of timed object ticking system (trying to change the d…
Browse files Browse the repository at this point in the history
…efault container from map of vectors to a multimap, also trying to delete elements as little as possible, to avoid cpu usage, reallocations and tree rebalancing).

Added #define MT_ENGINES: it doesn't make sense to keep unneeded mutex locks, at least until (if ever) we'll have a fully multithreaded engine.
Some advancement in making ASAN work on Windows with Clang.
Added .cmake-format
  • Loading branch information
cbnolok committed Aug 6, 2024
1 parent 2522987 commit 743dda9
Show file tree
Hide file tree
Showing 20 changed files with 590 additions and 222 deletions.
16 changes: 16 additions & 0 deletions .cmake-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://cmake-format.readthedocs.io/en/latest/
#https://github.com/bouncmpe/cpp-project-template/blob/main/.cmake-format
format:
line_width: 80
tab_size: 2
max_subgroups_hwrap: 2
max_pargs_hwrap: 6
max_rows_cmdline: 2
dangle_parens: true
dangle_align: 'prefix'
min_prefix_chars: 8
max_prefix_chars: 8
max_lines_hwrap: 2
command_case: 'lower'
markup:
enable_markup: false
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ SET (CMAKE_EXE_LINKER_FLAGS_DEBUG "")
SET (CMAKE_EXE_LINKER_FLAGS_NIGHTLY "")
SET (CMAKE_EXE_LINKER_FLAGS_RELEASE "")

set (is_win32_app_linker)
IF (WIN32 AND NOT ${WIN32_SPAWN_CONSOLE})
set (is_win32_app_linker WIN32) # if not set, it defaults to console subsystem
ENDIF ()

# Determine system arch
# TODO: change name for the variable to ARCH_IS_32BITS and ARCH_IS_64BITS
Expand Down Expand Up @@ -166,23 +170,23 @@ IF (SINGLE_TARGET)

IF (("${CMAKE_BUILD_TYPE}" STREQUAL "") OR (${CMAKE_BUILD_TYPE} MATCHES "(R|r?)elease"))
SET (TARGETS ${TARGETS} spheresvr_release)
ADD_EXECUTABLE (spheresvr_release
ADD_EXECUTABLE (spheresvr_release ${is_win32_app_linker}
${SPHERE_SOURCES}
# ${docs_TEXT}
)
SET_TARGET_PROPERTIES (spheresvr_release PROPERTIES OUTPUT_NAME SphereSvrX${ARCH_BITS}_release)
ENDIF ()
IF (("${CMAKE_BUILD_TYPE}" STREQUAL "") OR (${CMAKE_BUILD_TYPE} MATCHES "(N|n?)ightly"))
SET (TARGETS ${TARGETS} spheresvr_nightly)
ADD_EXECUTABLE (spheresvr_nightly
ADD_EXECUTABLE (spheresvr_nightly ${is_win32_app_linker}
${SPHERE_SOURCES}
# ${docs_TEXT}
)
SET_TARGET_PROPERTIES (spheresvr_nightly PROPERTIES OUTPUT_NAME SphereSvrX${ARCH_BITS}_nightly)
ENDIF ()
IF (("${CMAKE_BUILD_TYPE}" STREQUAL "") OR (${CMAKE_BUILD_TYPE} MATCHES "(D|d?)ebug"))
SET (TARGETS ${TARGETS} spheresvr_debug)
ADD_EXECUTABLE (spheresvr_debug
ADD_EXECUTABLE (spheresvr_debug ${is_win32_app_linker}
${SPHERE_SOURCES}
# ${docs_TEXT}
)
Expand All @@ -192,7 +196,7 @@ IF (SINGLE_TARGET)
ELSE (SINGLE_TARGET)

SET (TARGETS ${TARGETS} spheresvr)
ADD_EXECUTABLE (spheresvr
ADD_EXECUTABLE (spheresvr ${is_win32_app_linker}
${SPHERE_SOURCES}
${docs_TEXT}
)
Expand Down
13 changes: 6 additions & 7 deletions cmake/toolchains/Windows-MSVC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@ function (toolchain_exe_stuff)
ENDIF ()


#-- Configure the Windows application type.
#-- Configure the Windows application type and add global linker flags.

SET (EXE_LINKER_EXTRA "")
IF (${WIN32_SPAWN_CONSOLE})
SET (EXE_LINKER_EXTRA ${EXE_LINKER_EXTRA} /SUBSYSTEM:CONSOLE /ENTRY:WinMainCRTStartup)
add_link_options ("LINKER:/ENTRY:WinMainCRTStartup") # Handled by is_win32_app_linker -> "LINKER:/SUBSYSTEM:CONSOLE"
SET (PREPROCESSOR_DEFS_EXTRA _WINDOWS_CONSOLE)
ELSE ()
SET (EXE_LINKER_EXTRA ${EXE_LINKER_EXTRA} /SUBSYSTEM:WINDOWS)
#ELSE ()
# add_link_options ("LINKER:/ENTRY:WinMainCRTStartup") # Handled by is_win32_app_linker -> "LINKER: /SUBSYSTEM:WINDOWS"
ENDIF ()


Expand Down Expand Up @@ -107,7 +106,7 @@ function (toolchain_exe_stuff)
${cxx_compiler_flags_common}
$<$<CONFIG:Release>: $<IF:$<BOOL:${RUNTIME_STATIC_LINK}>,/MT,/MD> /EHsc /GL /GA /Gw /Gy /GF /GR- $<IF:$<BOOL:${ENABLED_SANITIZER}>,/O1 /Zi,/O2>>
$<$<CONFIG:Nightly>: $<IF:$<BOOL:${RUNTIME_STATIC_LINK}>,/MT,/MD> /EHa /GL /GA /Gw /Gy /GF $<IF:$<BOOL:${ENABLED_SANITIZER}>,/O1 /Zi,/O2>>
$<$<CONFIG:Debug>: $<IF:$<BOOL:${RUNTIME_STATIC_LINK}>,/MTd,/MDd> /EHsc /Oy- /MDd /ob1 /Od $<IF:$<BOOL:${ENABLED_SANITIZER}>,/Zi,/ZI>> #/Gs
$<$<CONFIG:Debug>: $<IF:$<BOOL:${RUNTIME_STATIC_LINK}>,/MTd,/MDd> /EHsc /Oy- /MDd /ob1 /Od $<IF:$<BOOL:${ENABLED_SANITIZER}>,/Zi,/ZI>> #/Gs
# ASan (and compilation for ARM arch) doesn't support edit and continue option (ZI)
)

Expand All @@ -129,7 +128,7 @@ function (toolchain_exe_stuff)

#-- Windows libraries to link against.
TARGET_LINK_LIBRARIES ( spheresvr PRIVATE ws2_32 libmariadb )


#-- Set define macros.

Expand Down
8 changes: 4 additions & 4 deletions cmake/toolchains/include/Linux-Clang_common.inc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ function (toolchain_exe_stuff_common)

IF (${USE_ASAN})
SET (CXX_FLAGS_EXTRA ${CXX_FLAGS_EXTRA} -fsanitize=address -fno-sanitize-recover=address -fsanitize-address-use-after-scope)
set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=address>)
set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=address)
SET (ENABLED_SANITIZER true)
ENDIF ()
IF (${USE_MSAN})
MESSAGE (WARNING "You have enabled MSAN. Make sure you do know what you are doing. It doesn't work out of the box. \
See comments in the toolchain and: https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo")
SET (CXX_FLAGS_EXTRA ${CXX_FLAGS_EXTRA} -fsanitize=memory -fsanitize-memory-track-origins -fPIE)
set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=memory>)
set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=memory)
SET (ENABLED_SANITIZER true)
ENDIF ()
IF (${USE_LSAN})
Expand All @@ -73,7 +73,7 @@ See comments in the toolchain and: https://github.com/google/sanitizers/wiki/Mem
-fsanitize=float-divide-by-zero,float-cast-overflow,pointer-overflow,unreachable,nonnull-attribute,returns-nonnull-attribute
-fno-sanitize=enum)
SET (CXX_FLAGS_EXTRA ${CXX_FLAGS_EXTRA} ${UBSAN_FLAGS} -fsanitize=return,vptr)
set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=undefined>)
set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=undefined)
SET (ENABLED_SANITIZER true)
ENDIF ()

Expand Down Expand Up @@ -119,7 +119,7 @@ See comments in the toolchain and: https://github.com/google/sanitizers/wiki/Mem
SET (COMPILE_OPTIONS_EXTRA -fno-omit-frame-pointer -fno-inline)
ENDIF ()
IF (TARGET spheresvr_release)
TARGET_COMPILE_OPTIONS ( spheresvr_release PUBLIC -s -O3 ${COMPILE_OPTIONS_EXTRA})
TARGET_COMPILE_OPTIONS ( spheresvr_release PUBLIC -O3 ${COMPILE_OPTIONS_EXTRA})
ENDIF ()
IF (TARGET spheresvr_nightly)
IF (ENABLED_SANITIZER)
Expand Down
166 changes: 128 additions & 38 deletions cmake/toolchains/include/Windows-Clang_common.inc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,17 @@ endfunction ()

function (toolchain_exe_stuff_common)

#-- Configure the linker and the Windows application type.
#-- Configure the Windows application type and add global linker flags.

SET (EXE_LINKER_EXTRA "")

IF (CLANG_USE_GCC_LINKER)
SET (CLANG_SUBSYSTEM_PREFIX --entry=WinMainCRTStartup -m) # --entry might not work
ELSE ()
SET (CLANG_SUBSYSTEM_PREFIX -Xlinker /ENTRY:WinMainCRTStartup -Xlinker /subsystem:)
ENDIF()
IF (${WIN32_SPAWN_CONSOLE})
SET (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} ${CLANG_SUBSYSTEM_PREFIX}console)
SET (PREPROCESSOR_DEFS_EXTRA _WINDOWS_CONSOLE)
ELSE ()
SET (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} ${CLANG_SUBSYSTEM_PREFIX}windows)
ENDIF ()
IF (${CLANG_USE_GCC_LINKER})
# --entry might not work
add_link_options ("LINKER:--entry=WinMainCRTStartup") # Handled by is_win32_app_linker -> "LINKER:SHELL:-m$<IF:$<BOOL:${WIN32_SPAWN_CONSOLE}>,CONSOLE,WINDOWS>"
ELSE ()
add_link_options ("LINKER:/ENTRY:WinMainCRTStartup") # Handled by is_win32_app_linker -> "LINKER:SHELL:/SUBSYSTEM:$<IF:$<BOOL:${WIN32_SPAWN_CONSOLE}>,CONSOLE,WINDOWS>"
ENDIF()
ENDIF()


#-- Validate sanitizers options and store them between the common compiler flags.
Expand All @@ -48,21 +44,27 @@ function (toolchain_exe_stuff_common)

IF (${USE_ASAN})
SET (CXX_FLAGS_EXTRA ${CXX_FLAGS_EXTRA} -fsanitize=address -fno-sanitize-recover=address -fsanitize-address-use-after-scope)
set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=address)
IF (${CLANG_USE_GCC_LINKER})
set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=address)
ENDIF ()
SET (ENABLED_SANITIZER true)
ENDIF ()
IF (${USE_MSAN})
MESSAGE (FATAL_ERROR "Windows Clang doesn't yet support MSAN")
SET (USE_MSAN false)
#SET (CXX_FLAGS_EXTRA ${CXX_FLAGS_EXTRA} -fsanitize=memory -fsanitize-memory-track-origins=2 -fPIE)
#set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=memory)
#IF (${CLANG_USE_GCC_LINKER})
#set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=memory)
#ENDIF
#SET (ENABLED_SANITIZER true)
ENDIF ()
IF (${USE_LSAN})
MESSAGE (FATAL_ERROR "Windows Clang doesn't yet support LSAN")
SET (USE_LSAN false)
#SET (CXX_FLAGS_EXTRA ${CXX_FLAGS_EXTRA} -fsanitize=leak)
#set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=leak)
#IF (${CLANG_USE_GCC_LINKER})
#set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=leak)
#ENDIF
#SET (ENABLED_SANITIZER true)
ENDIF ()
IF (${USE_UBSAN})
Expand All @@ -72,12 +74,18 @@ function (toolchain_exe_stuff_common)
-fno-sanitize=enum
)
SET (CXX_FLAGS_EXTRA ${CXX_FLAGS_EXTRA} ${UBSAN_FLAGS} -fsanitize=return)
set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=undefined)
#IF (${CLANG_USE_GCC_LINKER})
#set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -fsanitize=undefined)
#ENDIF
SET (ENABLED_SANITIZER true)
ENDIF ()
IF (${ENABLED_SANITIZER})
SET (PREPROCESSOR_DEFS_EXTRA ${PREPROCESSOR_DEFS_EXTRA} _SANITIZERS)
set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} $<$<BOOL:${RUNTIME_STATIC_LINK}>:-static-libsan>)
if (${RUNTIME_STATIC_LINK})
set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -static-libsan)
else ()
set (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -shared-libsan)
endif ()
ENDIF ()


Expand Down Expand Up @@ -110,17 +118,44 @@ function (toolchain_exe_stuff_common)
SET (COMPILE_OPTIONS_EXTRA -fno-omit-frame-pointer -fno-inline)
ENDIF ()
IF (TARGET spheresvr_release)
TARGET_COMPILE_OPTIONS ( spheresvr_release PUBLIC -s -O3 ${COMPILE_OPTIONS_EXTRA})
TARGET_COMPILE_OPTIONS ( spheresvr_release PUBLIC -O3 ${COMPILE_OPTIONS_EXTRA})
#[[
IF (NOT ${CLANG_USE_GCC_LINKER})
if (${RUNTIME_STATIC_LINK})
TARGET_COMPILE_OPTIONS ( spheresvr_release PUBLIC /MT )
else ()
TARGET_COMPILE_OPTIONS ( spheresvr_release PUBLIC /MD )
endif ()
endif ()
]]
ENDIF ()
IF (TARGET spheresvr_nightly)
IF (ENABLED_SANITIZER)
TARGET_COMPILE_OPTIONS ( spheresvr_nightly PUBLIC -ggdb3 -O1 ${COMPILE_OPTIONS_EXTRA})
TARGET_COMPILE_OPTIONS ( spheresvr_nightly PUBLIC -ggdb3 -O1 ${COMPILE_OPTIONS_EXTRA} )
ELSE ()
TARGET_COMPILE_OPTIONS ( spheresvr_nightly PUBLIC -O3 ${COMPILE_OPTIONS_EXTRA})
TARGET_COMPILE_OPTIONS ( spheresvr_nightly PUBLIC -O3 ${COMPILE_OPTIONS_EXTRA} )
ENDIF ()
#[[
IF (NOT ${CLANG_USE_GCC_LINKER})
if (${RUNTIME_STATIC_LINK})
TARGET_COMPILE_OPTIONS ( spheresvr_nightly PUBLIC /MT )
else ()
TARGET_COMPILE_OPTIONS ( spheresvr_nightly PUBLIC /MD )
endif ()
endif ()
]]
ENDIF ()
IF (TARGET spheresvr_debug)
TARGET_COMPILE_OPTIONS ( spheresvr_debug PUBLIC -ggdb3 -Og ${COMPILE_OPTIONS_EXTRA})
TARGET_COMPILE_OPTIONS ( spheresvr_debug PUBLIC -ggdb3 -Og )
#[[
IF (NOT ${CLANG_USE_GCC_LINKER})
if (${RUNTIME_STATIC_LINK})
TARGET_COMPILE_OPTIONS ( spheresvr_debug PUBLIC /MTd )
else ()
TARGET_COMPILE_OPTIONS ( spheresvr_debug PUBLIC /MDd )
endif ()
endif ()
]]
ENDIF ()


Expand All @@ -130,17 +165,26 @@ function (toolchain_exe_stuff_common)
SET (CMAKE_EXE_LINKER_FLAGS_EXTRA ${CMAKE_EXE_LINKER_FLAGS_EXTRA} -pie)
ENDIF()

set (cxx_linker_options_common ${CMAKE_EXE_LINKER_FLAGS_EXTRA}
$<$<BOOL:CLANG_USE_GCC_LINKER>:-pthread -dynamic
$<$<BOOL:${RUNTIME_STATIC_LINK}>: -static-libstdc++ -static-libgcc>> # no way to statically link against libc? maybe we can on windows?
)

set (cxx_linker_options_common ${CMAKE_EXE_LINKER_FLAGS_EXTRA})
if (${CLANG_USE_GCC_LINKER})
set (cxx_linker_options_common ${cxx_linker_options_common} -pthread -dynamic)
if (${RUNTIME_STATIC_LINK})
set (cxx_linker_options_common ${cxx_linker_options_common} -static-libstdc++ -static-libgcc) # no way to statically link against libc? maybe we can on windows?
endif ()
#[[
else ()
if (${RUNTIME_STATIC_LINK})
set (cxx_linker_options_common ${cxx_linker_options_common} /MTd )
else ()
set (cxx_linker_options_common ${cxx_linker_options_common} /MDd )
endif ()
]]
endif ()

#-- Store common define macros.

set(cxx_compiler_definitions_common
${PREPROCESSOR_DEFS_EXTRA}
$<$<NOT:$<BOOL:${CMAKE_NO_GIT_REVISION}>>:_GITVERSION>
_EXCEPTIONS_DEBUG
# _EXCEPTIONS_DEBUG: Enable advanced exceptions catching. Consumes some more resources, but is very useful for debug
# on a running environment. Also it makes sphere more stable since exceptions are local.
Expand All @@ -149,33 +193,79 @@ function (toolchain_exe_stuff_common)
_WINSOCK_DEPRECATED_NO_WARNINGS
# _WINSOCK_DEPRECATED_NO_WARNINGS: Removing warnings until the code gets updated or reviewed.
)
if (NOT ${CMAKE_NO_GIT_REVISION})
set(cxx_compiler_definitions_common ${cxx_compiler_definitions_common} _GITVERSION)
endif ()


#-- Apply define macros, only the ones specific per build type.

IF (TARGET spheresvr_release)
TARGET_COMPILE_DEFINITIONS ( spheresvr_release PUBLIC NDEBUG THREAD_TRACK_CALLSTACK )
ENDIF (TARGET spheresvr_release)
target_compile_definitions ( spheresvr_release PUBLIC NDEBUG THREAD_TRACK_CALLSTACK )
ENDIF ()
IF (TARGET spheresvr_nightly)
TARGET_COMPILE_DEFINITIONS ( spheresvr_nightly PUBLIC NDEBUG THREAD_TRACK_CALLSTACK _NIGHTLYBUILD )
ENDIF (TARGET spheresvr_nightly)
target_compile_definitions ( spheresvr_nightly PUBLIC NDEBUG THREAD_TRACK_CALLSTACK _NIGHTLYBUILD )
ENDIF ()
IF (TARGET spheresvr_debug)
TARGET_COMPILE_DEFINITIONS ( spheresvr_debug PUBLIC _DEBUG THREAD_TRACK_CALLSTACK _PACKETDUMP )
target_compile_definitions ( spheresvr_debug PUBLIC _DEBUG THREAD_TRACK_CALLSTACK _PACKETDUMP )
IF (USE_ASAN AND NOT CLANG_USE_GCC_LINKER)
# Even with this, it appears that they are overridden to 1...
TARGET_COMPILE_DEFINITIONS ( spheresvr_debug PUBLIC _HAS_ITERATOR_DEBUGGING=0 _ITERATOR_DEBUG_LEVEL=0 )
target_compile_definitions ( spheresvr_debug PUBLIC _HAS_ITERATOR_DEBUGGING=0 _ITERATOR_DEBUG_LEVEL=0 )
ENDIF()
ENDIF (TARGET spheresvr_debug)
ENDIF ()


#-- Apply linker options, only the ones specific per build type.

#if (NOT ${CLANG_USE_GCC_LINKER})
# IF (TARGET spheresvr_release)
# target_link_options ( spheresvr_release PUBLIC "LINKER:SHELL:" )
# ENDIF ()
# IF (TARGET spheresvr_nightly)
# target_link_options ( spheresvr_nightly PUBLIC "LINKER:SHELL:" )
# ENDIF ()
# IF (TARGET spheresvr_debug)
# target_link_options ( spheresvr_debug PUBLIC "LINKER:/DEBUG" )
# ENDIF ()
#endif ()


#-- Now add back the common compiler options, preprocessor macros, linker targets and options.

set (libs_prefix $<$<NOT:$<BOOL:${CLANG_USE_GCC_LINKER}>>:lib>)
set (libs_to_link_against ws2_32 ${LIBS_PREFIX}mariadb)
if (NOT ${CLANG_USE_GCC_LINKER})
set (libs_prefix lib)
#[[
if (ENABLED_SANITIZER)
# one should add to the linker path its LLVM lib folder...
if (ARCH_BITS EQUAL 64)
if (TARGET spheresvr_release)
target_link_libraries(spheresvr_release PUBLIC clang_rt.asan_dll_thunk-x86_64) #clang_rt.asan_dynamic-x86_64)
endif ()
if (TARGET spheresvr_nightly)
target_link_libraries(spheresvr_nightly PUBLIC clang_rt.asan_dll_thunk-x86_64) #clang_rt.asan_dynamic-x86_64)
endif ()
if (TARGET spheresvr_debug)
target_link_libraries(spheresvr_debug PUBLIC clang_rt.asan_dll_thunk-x86_64) #clang_rt.asan_dbg_dynamic-x86_64)
endif ()
else ()
if (TARGET spheresvr_release)
target_link_libraries(spheresvr_release PUBLIC clang_rt.asan_dll_thunk-i386) #clang_rt.asan_dynamic-x86)
endif ()
if (TARGET spheresvr_nightly)
target_link_libraries(spheresvr_nightly PUBLIC clang_rt.asan_dll_thunk-i386) #clang_rt.asan_dynamic-x86)
endif ()
if (TARGET spheresvr_debug)
target_link_libraries(spheresvr_debug PUBLIC clang_rt.asan_dll_thunk-i386) #clang_rt.asan_dbg_dynamic-x86)
endif ()
endif()
endif ()
]]
endif()
set (libs_to_link_against ${libs_to_link_against} ws2_32 ${libs_prefix}mariadb)

foreach(tgt ${TARGETS})
target_compile_options (${tgt} PRIVATE ${cxx_compiler_options_common})
target_compile_definitions (${tgt} PRIVATE ${cxx_compiler_definitions_common})
target_link_options (${tgt} PRIVATE ${cxx_linker_options_common})
target_link_options (${tgt} PRIVATE LINKER:${cxx_linker_options_common})
target_link_libraries (${tgt} PRIVATE ${libs_to_link_against})
endforeach()

Expand Down
Loading

0 comments on commit 743dda9

Please sign in to comment.