aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-17 23:38:18 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-17 23:38:18 +0300
commitb7e25ac4eef0181a0b58bd86deb2d36553c7f67e (patch)
tree116531b9cc21327666e480ff7a4f721d42f3b4f2
parentf8e5087242fcd0e2f3099f62437ed81b88d859f1 (diff)
downloadydb-b7e25ac4eef0181a0b58bd86deb2d36553c7f67e.tar.gz
intermediate changes
ref:4b4acf4c3b9e1212fd3c6ed880d7d81b5da0b227
-rw-r--r--CMakeLists.txt2
-rw-r--r--build/scripts/link_exe.py8
-rw-r--r--build/ymake.core.conf17
-rw-r--r--library/cpp/build_info/CMakeLists.txt20
-rw-r--r--ydb/library/yql/parser/proto_ast/gen/jsonpath/CMakeLists.txt24
-rw-r--r--ydb/library/yql/parser/proto_ast/gen/v0/CMakeLists.txt24
-rw-r--r--ydb/library/yql/parser/proto_ast/gen/v1/CMakeLists.txt16
-rw-r--r--ydb/library/yql/parser/proto_ast/gen/v1_ansi/CMakeLists.txt16
-rw-r--r--ydb/library/yql/parser/proto_ast/gen/v1_proto/CMakeLists.txt8
9 files changed, 130 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 324b9b5a03..ccd7ed05d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@
cmake_minimum_required(VERSION 3.15)
-project(YDB LANGUAGES)
+project(YDB LANGUAGES ASM C CXX)
set(BUILD_SHARED_LIBS Off)
set(CMAKE_CXX_STANDARD 20)
diff --git a/build/scripts/link_exe.py b/build/scripts/link_exe.py
index 03ecf74565..a885a2b918 100644
--- a/build/scripts/link_exe.py
+++ b/build/scripts/link_exe.py
@@ -27,6 +27,14 @@ CUDA_LIBRARIES = {
'-lcurand_static': '-lcurand',
'-lcusolver_static': '-lcusolver',
'-lcusparse_static': '-lcusparse',
+ '-lmyelin_compiler_static': '-lmyelin',
+ '-lmyelin_executor_static': '-lnvcaffe_parser',
+ '-lmyelin_pattern_library_static': '',
+ '-lmyelin_pattern_runtime_static': '',
+ '-lnvinfer_static': '-lnvinfer',
+ '-lnvinfer_plugin_static': '-lnvinfer_plugin',
+ '-lnvonnxparser_static': '-lnvonnxparser',
+ '-lnvparsers_static': '-lnvparsers'
}
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index ca8d83f57f..e4d7841f75 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -2453,7 +2453,8 @@ CPP_LIBRARY_SEM=add_library ${MODDIR} $REALPRJNAME ${hide:TARGET} ${hide:AUTO_IN
&& target_include_directories PUBLIC $_C__INCLUDE_GLOBAL \
&& target_include_directories PRIVATE $_C__INCLUDE_OWNED \
&& target_compile_options PRIVATE $USER_CFLAGS $USER_CXXFLAGS \
- && target_compile_options PUBLIC $USER_CFLAGS_GLOBAL_RAW $USER_CXXFLAGS_GLOBAL_RAW
+ && target_compile_options PUBLIC $USER_CFLAGS_GLOBAL_RAW $USER_CXXFLAGS_GLOBAL_RAW \
+ && add_language C && add_language CXX
CPP_OBJ_LIBRARY_SEM=add_global_library_for ${MODDIR} ${suf=.global:REALPRJNAME} $REALPRJNAME ${hide:GLOBAL_TARGET} ${hide:AUTO_INPUT} \
&& target_include_directories PUBLIC $_C__INCLUDE_GLOBAL \
&& target_include_directories PRIVATE $_C__INCLUDE_OWNED \
@@ -6076,16 +6077,24 @@ macro _SRC("masm", SRC, SRCFLAGS...) {
.CMD=$_SRC_masm($SRC $SRCFLAGS)
}
+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} \
+ && 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 \
+ && conan_require yasm/1.3.0 && conan_import '"bin, *yasm* -> ./bin"' && conan_import '"bin, ytasm* -> ./bin"'
+ASM_SEM=target_yasm_source PRIVATE ${input:SRC} ${output;hide;suf=${OBJ_SUF}.o:SRC} $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS \
+ && 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 \
+ && conan_require yasm/1.3.0 && conan_import '"bin, *yasm* -> ./bin"' && conan_import '"bin, ytasm* -> ./bin"'
# tag:src-processing
macro _SRC("yasm", SRC, SRCFLAGS...) {
.CMD=$_SRC_yasm($SRC $SRCFLAGS PREINCLUDES $YASM_PREINCLUDES_VALUE)
- .SEM=target_yasm_source PRIVATE ${input:SRC} ${output;hide;suf=${OBJ_SUF}.o:SRC} $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS ${pre=-P :PREINCLUDES} && 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 && conan_require yasm/1.3.0 && conan_import '"bin, *yasm* -> ./bin"' && conan_import '"bin, ytasm* -> ./bin"'
+ .SEM=$YASM_SEM
}
# tag:src-processing
macro _SRC("asm", SRC, SRCFLAGS...) {
.CMD=$_SRC(yasm $SRC $SRCFLAGS)
- .SEM=target_yasm_source PRIVATE ${input:SRC} ${output;hide;suf=${OBJ_SUF}.o:SRC} $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS && 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 && conan_require yasm/1.3.0 && conan_import '"bin, *yasm* -> ./bin"' && conan_import '"bin, ytasm* -> ./bin"'
+ .SEM=$ASM_SEM
}
# tag:src-processing
@@ -6662,7 +6671,7 @@ macro CFG_VARS() {
### Used implicitly for .in-files processing.
macro CONFIGURE_FILE(Src, Dst) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/configure_file.py"} ${input:Src} ${output;addincl:Dst} $CFG_VARS ${kv;hide:"p CF"} ${kv;hide:"pc yellow"}
- .SEM=set_vasrs ${CFG_VARS} && configure_file $S/${input;rootrel:Src} $B/${output;rootrel:Dst}
+ .SEM=set_vars ${CFG_VARS} && configure_file $S/${input;rootrel:Src} $B/${output;rootrel:Dst}
}
### @usage: BASE_CODEGEN(tool_path prefix)
diff --git a/library/cpp/build_info/CMakeLists.txt b/library/cpp/build_info/CMakeLists.txt
index b1075e61da..6223c56b95 100644
--- a/library/cpp/build_info/CMakeLists.txt
+++ b/library/cpp/build_info/CMakeLists.txt
@@ -32,3 +32,23 @@ add_custom_command(
\"${CMAKE_CXX_COMPILER}\"
\"${CMAKE_CXX_FLAGS}\"
)
+set(
+ KOSHER_SVN_VERSION
+
+)
+set(
+ SANDBOX_TASK_ID
+ 0
+)
+configure_file(
+ ${CMAKE_SOURCE_DIR}/library/cpp/build_info/sandbox.cpp.in
+ ${CMAKE_BINARY_DIR}/library/cpp/build_info/sandbox.cpp
+)
+set(
+ BUILD_TYPE
+ RELEASE
+)
+configure_file(
+ ${CMAKE_SOURCE_DIR}/library/cpp/build_info/build_info.cpp.in
+ ${CMAKE_BINARY_DIR}/library/cpp/build_info/build_info.cpp
+)
diff --git a/ydb/library/yql/parser/proto_ast/gen/jsonpath/CMakeLists.txt b/ydb/library/yql/parser/proto_ast/gen/jsonpath/CMakeLists.txt
index 430da85fdd..8b3d9bd37a 100644
--- a/ydb/library/yql/parser/proto_ast/gen/jsonpath/CMakeLists.txt
+++ b/ydb/library/yql/parser/proto_ast/gen/jsonpath/CMakeLists.txt
@@ -37,6 +37,30 @@ run_antlr(
-language
protobuf
)
+set(
+ ANTLR_PACKAGE_NAME
+ NJsonPathGenerated
+)
+configure_file(
+ ${CMAKE_SOURCE_DIR}/ydb/library/yql/parser/proto_ast/org/antlr/codegen/templates/protobuf/protobuf.stg.in
+ ${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/jsonpath/org/antlr/codegen/templates/protobuf/protobuf.stg
+)
+set(
+ ANTLR_PACKAGE_NAME
+ NJsonPathGenerated
+)
+set(
+ LEXER_PARSER_NAMESPACE
+ NALP
+)
+set(
+ PROTOBUF_HEADER_PATH
+ ydb/library/yql/parser/proto_ast/gen/jsonpath
+)
+configure_file(
+ ${CMAKE_SOURCE_DIR}/ydb/library/yql/parser/proto_ast/org/antlr/codegen/templates/Cpp/Cpp.stg.in
+ ${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/jsonpath/org/antlr/codegen/templates/Cpp/Cpp.stg
+)
run_antlr(
OUTPUT
${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/jsonpath/JsonPathParser.cpp
diff --git a/ydb/library/yql/parser/proto_ast/gen/v0/CMakeLists.txt b/ydb/library/yql/parser/proto_ast/gen/v0/CMakeLists.txt
index a6800394a8..4c8cb54762 100644
--- a/ydb/library/yql/parser/proto_ast/gen/v0/CMakeLists.txt
+++ b/ydb/library/yql/parser/proto_ast/gen/v0/CMakeLists.txt
@@ -37,6 +37,30 @@ run_antlr(
-language
protobuf
)
+set(
+ ANTLR_PACKAGE_NAME
+ NSQLGenerated
+)
+configure_file(
+ ${CMAKE_SOURCE_DIR}/ydb/library/yql/parser/proto_ast/org/antlr/codegen/templates/protobuf/protobuf.stg.in
+ ${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v0/org/antlr/codegen/templates/protobuf/protobuf.stg
+)
+set(
+ ANTLR_PACKAGE_NAME
+ NSQLGenerated
+)
+set(
+ LEXER_PARSER_NAMESPACE
+ NALP
+)
+set(
+ PROTOBUF_HEADER_PATH
+ ydb/library/yql/parser/proto_ast/gen/v0
+)
+configure_file(
+ ${CMAKE_SOURCE_DIR}/ydb/library/yql/parser/proto_ast/org/antlr/codegen/templates/Cpp/Cpp.stg.in
+ ${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v0/org/antlr/codegen/templates/Cpp/Cpp.stg
+)
run_antlr(
OUTPUT
${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v0/SQLParser.cpp
diff --git a/ydb/library/yql/parser/proto_ast/gen/v1/CMakeLists.txt b/ydb/library/yql/parser/proto_ast/gen/v1/CMakeLists.txt
index d9efd5e094..cbc87e3a95 100644
--- a/ydb/library/yql/parser/proto_ast/gen/v1/CMakeLists.txt
+++ b/ydb/library/yql/parser/proto_ast/gen/v1/CMakeLists.txt
@@ -17,6 +17,22 @@ target_sources(proto_ast-gen-v1 PRIVATE
${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v1/SQLv1Parser.cpp
${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v1/SQLv1Lexer.cpp
)
+set(
+ ANTLR_PACKAGE_NAME
+ NSQLv1Generated
+)
+set(
+ LEXER_PARSER_NAMESPACE
+ NALPDefault
+)
+set(
+ PROTOBUF_HEADER_PATH
+ ydb/library/yql/parser/proto_ast/gen/v1_proto
+)
+configure_file(
+ ${CMAKE_SOURCE_DIR}/ydb/library/yql/parser/proto_ast/org/antlr/codegen/templates/Cpp/Cpp.stg.in
+ ${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v1/org/antlr/codegen/templates/Cpp/Cpp.stg
+)
run_antlr(
OUTPUT
${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v1/SQLv1Parser.cpp
diff --git a/ydb/library/yql/parser/proto_ast/gen/v1_ansi/CMakeLists.txt b/ydb/library/yql/parser/proto_ast/gen/v1_ansi/CMakeLists.txt
index 08c02b17ef..c87ba4e8de 100644
--- a/ydb/library/yql/parser/proto_ast/gen/v1_ansi/CMakeLists.txt
+++ b/ydb/library/yql/parser/proto_ast/gen/v1_ansi/CMakeLists.txt
@@ -17,6 +17,22 @@ target_sources(proto_ast-gen-v1_ansi PRIVATE
${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v1_ansi/SQLv1Parser.cpp
${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v1_ansi/SQLv1Lexer.cpp
)
+set(
+ ANTLR_PACKAGE_NAME
+ NSQLv1Generated
+)
+set(
+ LEXER_PARSER_NAMESPACE
+ NALPAnsi
+)
+set(
+ PROTOBUF_HEADER_PATH
+ ydb/library/yql/parser/proto_ast/gen/v1_proto
+)
+configure_file(
+ ${CMAKE_SOURCE_DIR}/ydb/library/yql/parser/proto_ast/org/antlr/codegen/templates/Cpp/Cpp.stg.in
+ ${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v1_ansi/org/antlr/codegen/templates/Cpp/Cpp.stg
+)
run_antlr(
OUTPUT
${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v1_ansi/SQLv1Parser.cpp
diff --git a/ydb/library/yql/parser/proto_ast/gen/v1_proto/CMakeLists.txt b/ydb/library/yql/parser/proto_ast/gen/v1_proto/CMakeLists.txt
index 03e33eaba0..3765497d5d 100644
--- a/ydb/library/yql/parser/proto_ast/gen/v1_proto/CMakeLists.txt
+++ b/ydb/library/yql/parser/proto_ast/gen/v1_proto/CMakeLists.txt
@@ -33,6 +33,14 @@ run_antlr(
-language
protobuf
)
+set(
+ ANTLR_PACKAGE_NAME
+ NSQLv1Generated
+)
+configure_file(
+ ${CMAKE_SOURCE_DIR}/ydb/library/yql/parser/proto_ast/org/antlr/codegen/templates/protobuf/protobuf.stg.in
+ ${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v1_proto/org/antlr/codegen/templates/protobuf/protobuf.stg
+)
set(GRAMMAR_STRING_CORE_SINGLE "~(QUOTE_SINGLE | BACKSLASH) | (BACKSLASH .)")
set(GRAMMAR_STRING_CORE_DOUBLE "~(QUOTE_DOUBLE | BACKSLASH) | (BACKSLASH .)")
set(GRAMMAR_MULTILINE_COMMENT_CORE ".")