summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsvidyuk <[email protected]>2023-09-13 09:59:29 +0300
committersvidyuk <[email protected]>2023-09-13 10:29:49 +0300
commit68afde5b23a2fb6dc5a6c4e9e03035f4ee0ba600 (patch)
tree905ba245ca0f71039f9be425e39bd5f89cc0a054
parent08b7ee73a931f5717a1d50a30f7f70210db73f33 (diff)
Fix catboost openssl cmake build issues
-rw-r--r--CMakeLists.txt1
-rw-r--r--build/ymake.core.conf25
-rw-r--r--cmake/masm.cmake9
-rw-r--r--contrib/libs/openssl/CMakeLists.windows-x86_64.txt1
-rw-r--r--contrib/libs/openssl/crypto/CMakeLists.windows-x86_64.txt29
5 files changed, 57 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 59f560d0e3c..e1cdb522c06 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,6 +33,7 @@ include(cmake/conan.cmake)
include(cmake/fbs.cmake)
include(cmake/global_flags.cmake)
include(cmake/llvm-tools.cmake)
+include(cmake/masm.cmake)
include(cmake/protobuf.cmake)
include(cmake/shared_libs.cmake)
include(cmake/global_vars.cmake)
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 04c990de77e..dd6c0b1d142 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -3037,15 +3037,21 @@ macro _SRC("rodata", SRC, SRCFLAGS...) {
.SEM=target_rodata_sources PRIVATE ${input:SRC} ${output;hide;suf=${OBJ_SUF}.o:SRC} ${input;hide:"build/scripts/rodata2cpp.py"}
}
-# tag:src-processing
-macro _SRC("S", SRC, SRCFLAGS...) {
+macro _SRS_S_ASM(SRC, SRCFLAGS...) {
.CMD=$C_COMPILER $C_FLAGS_PLATFORM $CFLAGS $SFLAGS $SRCFLAGS -c -o ${output:SRC.o} ${input:SRC} $TOOLCHAIN_ENV ${pre=-I:_C__INCLUDE}
.SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=${OBJ_SUF}.o:SRC} $_ADD_EXTRA_FLAGS($SRCFLAGS) && add_language ASM
}
# tag:src-processing
+macro _SRC("S", SRC, SRCFLAGS...) {
+ .CMD=$_SRS_S_ASM($SRC, $SRCFLAGS)
+ .SEM=$_SRS_S_ASM($SRC, $SRCFLAGS)
+}
+
+# tag:src-processing
macro _SRC("s", SRC, SRCFLAGS...) {
- .CMD=$_SRC(S, $SRC $SRCFLAGS)
+ .CMD=$_SRS_S_ASM($SRC, $SRCFLAGS)
+ .SEM=$_SRS_S_ASM($SRC, $SRCFLAGS)
}
# tag:src-processing
@@ -3226,11 +3232,8 @@ macro _SRC("m", SRC, SRCFLAGS...) {
.CMD=$_SRC(c $SRC $SRCFLAGS)
}
-# tag:src-processing
-macro _SRC("masm", SRC, SRCFLAGS...) {
- .CMD=$_SRC_masm($SRC $SRCFLAGS)
-}
-
+MASM_SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=${OBJ_SUF}.o:SRC} \
+ && curdir_masm_flags ${MASMFLAGS}
YASM_SEM=target_yasm_source PRIVATE ${input:SRC} ${output;hide;suf=${OBJ_SUF}.o:SRC} $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS ${pre=-P :PREINCLUDES} ${input;hide:"build/scripts/run_tool.py"} \
&& set_global_flags YASM_FLAGS -f ${_YASM_FMT_VALUE}${HARDWARE_ARCH} $_YASM_PLATFORM_FLAGS_VALUE -D ${pre=_;suf=_:HARDWARE_TYPE} -D_YASM_ $ASM_PREFIX_VALUE $_YASM_PREDEFINED_FLAGS_VALUE \
&& add_language ASM \
@@ -3240,6 +3243,12 @@ ASM_SEM=target_yasm_source PRIVATE ${input:SRC} ${output;hide;suf=${OBJ_SUF}.o:S
&& add_language ASM \
&& conan_require_tool yasm/1.3.0 && conan_import '"bin, *yasm* -> ./bin"' && conan_import '"bin, ytasm* -> ./bin"'
# tag:src-processing
+macro _SRC("masm", SRC, SRCFLAGS...) {
+ .CMD=$_SRC_masm($SRC $SRCFLAGS)
+ .SEM=$MASM_SEM
+}
+
+# tag:src-processing
macro _SRC("yasm", SRC, SRCFLAGS...) {
.CMD=$_SRC_yasm($SRC $SRCFLAGS PREINCLUDES $YASM_PREINCLUDES_VALUE)
.SEM=$YASM_SEM
diff --git a/cmake/masm.cmake b/cmake/masm.cmake
new file mode 100644
index 00000000000..f4d803dea71
--- /dev/null
+++ b/cmake/masm.cmake
@@ -0,0 +1,9 @@
+if (MSVC)
+
+enable_language(MASM)
+
+macro(curdir_masm_flags)
+ set(CMAKE_ASMMASM_FLAGS ${ARGN})
+endmacro()
+
+endif()
diff --git a/contrib/libs/openssl/CMakeLists.windows-x86_64.txt b/contrib/libs/openssl/CMakeLists.windows-x86_64.txt
index 75a0d85e360..1b88da02367 100644
--- a/contrib/libs/openssl/CMakeLists.windows-x86_64.txt
+++ b/contrib/libs/openssl/CMakeLists.windows-x86_64.txt
@@ -96,4 +96,5 @@ target_sources(contrib-libs-openssl PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/openssl/ssl/t1_trce.c
${CMAKE_SOURCE_DIR}/contrib/libs/openssl/ssl/tls13_enc.c
${CMAKE_SOURCE_DIR}/contrib/libs/openssl/ssl/tls_srp.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/engines/e_padlock-x86_64.masm
)
diff --git a/contrib/libs/openssl/crypto/CMakeLists.windows-x86_64.txt b/contrib/libs/openssl/crypto/CMakeLists.windows-x86_64.txt
index d3c6ad58096..6b3e345d1f9 100644
--- a/contrib/libs/openssl/crypto/CMakeLists.windows-x86_64.txt
+++ b/contrib/libs/openssl/crypto/CMakeLists.windows-x86_64.txt
@@ -682,4 +682,33 @@ target_sources(libs-openssl-crypto PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/openssl/crypto/des/fcrypt_b.c
${CMAKE_SOURCE_DIR}/contrib/libs/openssl/crypto/bn/rsaz_exp.c
${CMAKE_SOURCE_DIR}/contrib/libs/openssl/crypto/bn/bn_asm.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/aes/aesni-mb-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/aes/aesni-sha1-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/aes/aesni-sha256-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/aes/aesni-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/aes/vpaes-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/bn/rsaz-avx2.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/bn/rsaz-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/bn/x86_64-gf2m.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/bn/x86_64-mont.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/bn/x86_64-mont5.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/camellia/cmll-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/chacha/chacha-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/ec/ecp_nistz256-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/ec/x25519-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/md5/md5-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/modes/aesni-gcm-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/modes/ghash-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/poly1305/poly1305-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/rc4/rc4-md5-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/rc4/rc4-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/sha/keccak1600-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/sha/sha1-mb-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/sha/sha1-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/sha/sha256-mb-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/sha/sha256-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/sha/sha512-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/whrlpool/wp-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/uplink-x86_64.masm
+ ${CMAKE_SOURCE_DIR}/contrib/libs/openssl/asm/windows/crypto/x86_64cpuid.masm
)