mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Use custom memcpy only for AArch64
This commit is contained in:
parent
a446612e8a
commit
37cc2fe977
@ -1,5 +1,8 @@
|
|||||||
if (GLIBC_COMPATIBILITY)
|
if (GLIBC_COMPATIBILITY)
|
||||||
add_subdirectory(memcpy)
|
add_subdirectory(memcpy)
|
||||||
|
if(TARGET memcpy)
|
||||||
|
set(MEMCPY_LIBRARY memcpy)
|
||||||
|
endif()
|
||||||
|
|
||||||
enable_language(ASM)
|
enable_language(ASM)
|
||||||
include(CheckIncludeFile)
|
include(CheckIncludeFile)
|
||||||
@ -44,10 +47,10 @@ if (GLIBC_COMPATIBILITY)
|
|||||||
target_compile_options(glibc-compatibility PRIVATE -fPIC)
|
target_compile_options(glibc-compatibility PRIVATE -fPIC)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(global-libs INTERFACE glibc-compatibility memcpy)
|
target_link_libraries(global-libs INTERFACE glibc-compatibility ${MEMCPY_LIBRARY})
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS glibc-compatibility memcpy
|
TARGETS glibc-compatibility ${MEMCPY_LIBRARY}
|
||||||
EXPORT global
|
EXPORT global
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
)
|
)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
if (ARCH_AMD64)
|
||||||
add_library(memcpy STATIC memcpy.cpp)
|
add_library(memcpy STATIC memcpy.cpp)
|
||||||
|
|
||||||
# We allow to include memcpy.h from user code for better inlining.
|
# We allow to include memcpy.h from user code for better inlining.
|
||||||
target_include_directories(memcpy PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
target_include_directories(memcpy PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||||
|
|
||||||
target_compile_options(memcpy PRIVATE -fno-builtin-memcpy)
|
target_compile_options(memcpy PRIVATE -fno-builtin-memcpy)
|
||||||
|
endif ()
|
||||||
|
Loading…
Reference in New Issue
Block a user