aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/aws
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.ru>2022-05-10 17:04:34 +0300
committerthegeorg <thegeorg@yandex-team.ru>2022-05-10 17:04:34 +0300
commit5eb4a8a2d487411924e1d1b27c454223dcf35005 (patch)
treebb9c8926d57239f5cbc4a4800f4f192c9a242a20 /contrib/restricted/aws
parentaf1e2e7e653d6a5bf5666c39491e09a38f152380 (diff)
downloadydb-5eb4a8a2d487411924e1d1b27c454223dcf35005.tar.gz
Improve aws_c_common a bit
* Remove `add_defines=False` from aws_c_common project and distribute newly defines on OS basis * Support `SRC_C_AVX2` in `Linkable` statement * Enable AVX2 speedup for encoding (whatever the term stands for) * Add `_POSIX_C_SOURCE` macro to the list of defines to be filtered away during graph parsing * Reimport contribs with `_POSIX_C_SOURCE` define in use ref:f1dc59488698f0644933ce31c17946da1bf9c616
Diffstat (limited to 'contrib/restricted/aws')
-rw-r--r--contrib/restricted/aws/aws-c-common/CMakeLists.darwin.txt17
-rw-r--r--contrib/restricted/aws/aws-c-common/CMakeLists.linux.txt17
-rw-r--r--contrib/restricted/aws/s2n/CMakeLists.darwin.txt1
-rw-r--r--contrib/restricted/aws/s2n/CMakeLists.linux.txt1
4 files changed, 34 insertions, 2 deletions
diff --git a/contrib/restricted/aws/aws-c-common/CMakeLists.darwin.txt b/contrib/restricted/aws/aws-c-common/CMakeLists.darwin.txt
index 10b97eb4f9..971f0048c2 100644
--- a/contrib/restricted/aws/aws-c-common/CMakeLists.darwin.txt
+++ b/contrib/restricted/aws/aws-c-common/CMakeLists.darwin.txt
@@ -8,6 +8,13 @@
add_library(restricted-aws-aws-c-common)
+target_compile_options(restricted-aws-aws-c-common PRIVATE
+ -DAWS_COMMON_USE_IMPORT_EXPORT
+ -DHAVE_AVX2_INTRINSICS
+ -DHAVE_MM256_EXTRACT_EPI64
+ -DHAVE_SYSCONF
+ -DUSE_SIMD_ENCODING
+)
target_include_directories(restricted-aws-aws-c-common PUBLIC
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/generated/include
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/include
@@ -21,6 +28,7 @@ target_link_options(restricted-aws-aws-c-common INTERFACE
CoreFoundation
)
target_sources(restricted-aws-aws-c-common PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/arch/intel/encoding_avx2.c
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/allocator.c
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/allocator_sba.c
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/array_list.c
@@ -69,3 +77,12 @@ target_sources(restricted-aws-aws-c-common PRIVATE
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/arch/intel/asm/cpuid.c
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/arch/intel/cpuid.c
)
+set_property(
+ SOURCE
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/arch/intel/encoding_avx2.c
+ APPEND
+ PROPERTY
+ COMPILE_OPTIONS
+ -mavx2
+ -mfma
+)
diff --git a/contrib/restricted/aws/aws-c-common/CMakeLists.linux.txt b/contrib/restricted/aws/aws-c-common/CMakeLists.linux.txt
index a38629a11e..44689c6ee4 100644
--- a/contrib/restricted/aws/aws-c-common/CMakeLists.linux.txt
+++ b/contrib/restricted/aws/aws-c-common/CMakeLists.linux.txt
@@ -8,6 +8,13 @@
add_library(restricted-aws-aws-c-common)
+target_compile_options(restricted-aws-aws-c-common PRIVATE
+ -DAWS_COMMON_USE_IMPORT_EXPORT
+ -DHAVE_AVX2_INTRINSICS
+ -DHAVE_MM256_EXTRACT_EPI64
+ -DHAVE_SYSCONF
+ -DUSE_SIMD_ENCODING
+)
target_include_directories(restricted-aws-aws-c-common PUBLIC
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/generated/include
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/include
@@ -17,6 +24,7 @@ target_include_directories(restricted-aws-aws-c-common PRIVATE
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/include
)
target_sources(restricted-aws-aws-c-common PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/arch/intel/encoding_avx2.c
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/allocator.c
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/allocator_sba.c
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/array_list.c
@@ -65,3 +73,12 @@ target_sources(restricted-aws-aws-c-common PRIVATE
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/arch/intel/asm/cpuid.c
${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/arch/intel/cpuid.c
)
+set_property(
+ SOURCE
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/aws/aws-c-common/source/arch/intel/encoding_avx2.c
+ APPEND
+ PROPERTY
+ COMPILE_OPTIONS
+ -mavx2
+ -mfma
+)
diff --git a/contrib/restricted/aws/s2n/CMakeLists.darwin.txt b/contrib/restricted/aws/s2n/CMakeLists.darwin.txt
index 8e3194a214..98e44c90b4 100644
--- a/contrib/restricted/aws/s2n/CMakeLists.darwin.txt
+++ b/contrib/restricted/aws/s2n/CMakeLists.darwin.txt
@@ -11,7 +11,6 @@ find_package(OpenSSL REQUIRED)
add_library(restricted-aws-s2n)
target_compile_options(restricted-aws-s2n PRIVATE
-DS2N_ADX
- -D_POSIX_C_SOURCE=200809L
-DS2N_HAVE_EXECINFO
-DS2N_CPUID_AVAILABLE
)
diff --git a/contrib/restricted/aws/s2n/CMakeLists.linux.txt b/contrib/restricted/aws/s2n/CMakeLists.linux.txt
index cf54c00743..d7ae8d807b 100644
--- a/contrib/restricted/aws/s2n/CMakeLists.linux.txt
+++ b/contrib/restricted/aws/s2n/CMakeLists.linux.txt
@@ -11,7 +11,6 @@ find_package(OpenSSL REQUIRED)
add_library(restricted-aws-s2n)
target_compile_options(restricted-aws-s2n PRIVATE
-DS2N_ADX
- -D_POSIX_C_SOURCE=200809L
-DS2N_HAVE_EXECINFO
-DS2N_SIKEP434R2_ASM
-DS2N_CPUID_AVAILABLE