From cbe6ab5593926ba82d15f8b2ac398fd98dff56bc Mon Sep 17 00:00:00 2001 From: Schrodinger ZHU Yifan Date: Thu, 30 Jun 2022 11:22:39 +0800 Subject: [PATCH] fix: aarch64-quick-fix (#5259) close pingcap/tiflash#5260 --- contrib/arm-optimized-routines-cmake/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/arm-optimized-routines-cmake/CMakeLists.txt b/contrib/arm-optimized-routines-cmake/CMakeLists.txt index b08a761fe62..89baa7222f3 100644 --- a/contrib/arm-optimized-routines-cmake/CMakeLists.txt +++ b/contrib/arm-optimized-routines-cmake/CMakeLists.txt @@ -26,6 +26,7 @@ # the qualities can be ensured while using it also enables us to keep sync with latest # acceleration techniques. +set(CMAKE_C_FLAGS "") ENABLE_LANGUAGE(C) ENABLE_LANGUAGE(ASM) set(TIFLASH_AOR_DIR ../arm-optimized-routines) @@ -37,4 +38,8 @@ target_include_directories(tiflash-aarch64-string PRIVATE ${TIFLASH_AOR_DIR}/str file(GLOB TIFLASH_AARCH64_MATH_FILES ${TIFLASH_AOR_DIR}/math/*.c) add_library(tiflash-aarch64-math STATIC ${TIFLASH_AARCH64_MATH_FILES}) -target_include_directories(tiflash-aarch64-math PRIVATE ${TIFLASH_AOR_DIR}/math/include) \ No newline at end of file +target_include_directories(tiflash-aarch64-math PRIVATE ${TIFLASH_AOR_DIR}/math/include) + +# it is reasonable to keep these libraries optimized +target_compile_options(tiflash-aarch64-string PRIVATE -O3 -g3 -fno-omit-frame-pointer -ffunction-sections -fdata-sections) +target_compile_options(tiflash-aarch64-math PRIVATE -O3 -g3 -fno-omit-frame-pointer -ffunction-sections -fdata-sections)