Updated build

This commit is contained in:
MoneroOcean 2025-06-16 19:59:42 -07:00
parent 60895ccec9
commit c13d0d7d79
6 changed files with 11 additions and 11 deletions

View file

@ -35,7 +35,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
add_definitions(-DHAVE_ROTR)
endif()
if (WIN32)
if (WIN32 OR CMAKE_SYSTEM_NAME MATCHES "MSYS")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
else()
@ -84,12 +84,12 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
endif()
endif()
if ((WIN32 AND ARM_TARGET) OR BUILD_STATIC)
if (((WIN32 OR CMAKE_SYSTEM_NAME MATCHES "MSYS") AND ARM_TARGET) OR BUILD_STATIC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
endif()
endif()
if (NOT WIN32)
if (NOT WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES "MSYS")
check_symbol_exists("__builtin___clear_cache" "stdlib.h" HAVE_BUILTIN_CLEAR_CACHE)
if (HAVE_BUILTIN_CLEAR_CACHE)
add_definitions(-DHAVE_BUILTIN_CLEAR_CACHE)