Skip to content

Commit dc00a4b

Browse files
authored
Merge pull request #7801 from ydb-platform/mergelibs-240814-1820
Library import 240814-1820
2 parents cb4e391 + c601347 commit dc00a4b

File tree

555 files changed

+28455
-11025
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

555 files changed

+28455
-11025
lines changed

.piglet-meta.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"project":"ydblib"
3+
}

build/conf/java.conf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,3 +2066,14 @@ _KTLINT_BASELINE_FILE=
20662066
macro KTLINT_BASELINE_FILE(File, Ticket) {
20672067
SET(_KTLINT_BASELINE_FILE $File)
20682068
}
2069+
2070+
# tag:kotlin-specific
2071+
_WITH_YA_1931=no
2072+
2073+
# tag:kotlin-specific
2074+
### @usage: WITH_YA_1931()
2075+
### Interim macro to temporarily remove ALL_SRCDIRS from being added to ktlint test sources.
2076+
macro WITH_YA_1931() {
2077+
MESSAGE(WARNING Some files in this project have style errors that were not caught by prior ktlint runs. Remove WITH_YA_1931 macro to see them.)
2078+
ENABLE(_WITH_YA_1931)
2079+
}

build/conf/linkers/ld.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ LD_ICF_FLAG+=$_LD_ICF_FLAG
6868
LD_ICF_FLAG+=$_LD_ICF_FLAG_PRINT_SECTIONS
6969
ICF_FLAG=
7070

71+
_LD_NO_PIE_FLAG=
72+
when ($_LINKER_ID == "lld" && $PIE != "yes" && ($PIC != "yes" || $PIC_NO_PIE == "yes")) {
73+
when ($OS_LINUX == "yes") {
74+
_LD_NO_PIE_FLAG=-Wl,-no-pie
75+
}
76+
}
77+
7178
STRIP_FLAG=
7279

7380
C_LIBRARY_PATH=
@@ -159,6 +166,7 @@ _EXE_FLAGS=\
159166
$STRIP_FLAG \
160167
$DCE_FLAG \
161168
$ICF_FLAG \
169+
$_LD_NO_PIE_FLAG \
162170
$_LINKER_TIME_TRACE_FLAG
163171

164172
_SONAME_FLAG=-Wl,$_SONAME_OPTION,$_SONAME

build/conf/opensource.conf

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,32 @@ when ($OPENSOURCE == "yes" && $EXPORT_CMAKE == "yes") {
5454
EXPORTED_BUILD_SYSTEM_BUILD_ROOT="${PROJECT_BINARY_DIR}"
5555
}
5656

57-
CMAKE_PACKAGE=
58-
CMAKE_PACKAGE_COMPONENT=
59-
CMAKE_PACKAGE_TARGET=
60-
CONAN_REFERENCE=
61-
CONAN_PKG_OPTS=
62-
### @usage: OPENSOURCE_EXPORT_REPLACEMENT(CMAKE PkgName CMAKE_TARGET PkgName::PkgTarget CONAN ConanRef CMAKE_COMPONENT OptCmakePkgComponent)
63-
###
64-
### Use specified conan/system pacakcge when exporting cmake build scripts for arcadia C++ project
65-
### for opensource publication.
66-
macro OPENSOURCE_EXPORT_REPLACEMENT(CMAKE[], CMAKE_TARGET[], CMAKE_COMPONENT[], CONAN[], CONAN_OPTIONS[]) {
67-
SET(CMAKE_PACKAGE $CMAKE)
68-
SET(CMAKE_PACKAGE_COMPONENT $CMAKE_COMPONENT)
57+
CMAKE_PACKAGE_SEM=
58+
CONAN_REQUIRES_SEM=
59+
CONAN_OPTIONS_SEM=
60+
CONAN_OS_REQUIRES_SEM=
61+
CONAN_OS_OPTIONS_SEM=
62+
macro _OPENSOURCE_EXPORT_REPLACEMENT_CMAKE(CMAKE[], CMAKE_TARGET[], CMAKE_COMPONENT[]) {
63+
SET(CMAKE_PACKAGE_SEM packages-ITEM && packages-name $CMAKE ${pre= && packages-components :CMAKE_COMPONENT} && mpackages-ITEM && mpackages-name $CMAKE ${pre= && mpackages-components :CMAKE_COMPONENT} && find_package $CMAKE ${pre= COMPONENTS :CMAKE_COMPONENT} )
6964
SET(CMAKE_LINK_TARGET $CMAKE_TARGET)
70-
SET(CONAN_REFERENCE $CONAN)
71-
SET(CONAN_PKG_OPTS $CONAN_OPTIONS)
65+
}
66+
67+
### @usage: OPENSOURCE_EXPORT_REPLACEMENT(CMAKE PkgName CMAKE_COMPONENT OptCmakePkgComponent CMAKE_TARGET PkgName::PkgTarget CONAN ConanRequire CONAN ConanOptions CONAN_ADDITIONAL_SEMS ConanAdditionalSems)
68+
###
69+
### Use specified conan/system package when exporting cmake build scripts for arcadia C++ project for opensource publication.
70+
macro OPENSOURCE_EXPORT_REPLACEMENT(CMAKE[], CMAKE_TARGET[], CMAKE_COMPONENT[], CONAN[], CONAN_OPTIONS[], CONAN_ADDITIONAL_SEMS[]) {
71+
_OPENSOURCE_EXPORT_REPLACEMENT_CMAKE(CMAKE $CMAKE CMAKE_TARGET $CMAKE_TARGET CMAKE_COMPONENT $CMAKE_COMPONENT)
72+
SET(CONAN_REQUIRES_SEM && conan_require $CONAN && conan-requires $CONAN $CONAN_ADDITIONAL_SEMS)
73+
SET(CONAN_OPTIONS_SEM ${pre=&& conan_options :CONAN_OPTIONS} ${pre=&& conan-options :CONAN_OPTIONS})
74+
}
75+
76+
### @usage: OPENSOURCE_EXPORT_REPLACEMENT_BY_OS(OS Os CMAKE PkgName CMAKE_COMPONENT OptCmakePkgComponent CMAKE_TARGET PkgName::PkgTarget CONAN ConanRequire CONAN ConanOptions CONAN_ADDITIONAL_SEMS ConanAdditionalSems)
77+
###
78+
### Use specified conan/system package when exporting cmake build scripts for arcadia C++ project for opensource publication.
79+
macro OPENSOURCE_EXPORT_REPLACEMENT_BY_OS(OS[], CMAKE[], CMAKE_TARGET[], CMAKE_COMPONENT[], CONAN[], CONAN_OPTIONS[], CONAN_ADDITIONAL_SEMS[]) {
80+
_OPENSOURCE_EXPORT_REPLACEMENT_CMAKE(CMAKE $CMAKE CMAKE_TARGET $CMAKE_TARGET CMAKE_COMPONENT $CMAKE_COMPONENT)
81+
SET(CONAN_OS_REQUIRES_SEM && conan-os_depends-ITEM && conan-os_depends-os $OS && conan-os_depends-requires $CONAN $CONAN_ADDITIONAL_SEMS)
82+
SET(CONAN_OS_OPTIONS_SEM && conan-os_depends-ITEM && conan-os_depends-os $OS ${pre=&& conan-os_depends-opts :CONAN_OPTIONS})
7283
}
7384

7485
CMAKE_TARGET_NAME=$REALPRJNAME

build/conf/settings.conf

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,25 @@ FORCE_RESOLVE_MACRO_INCLS=yes
1414
ENABLE_RERESOLVE_FOR_GENERATED_FILES=yes
1515
REPORT_ALL_DUPSRC=yes
1616
DEPS_CACHE_CONTROL_UIDS_CACHE=yes
17+
INCLUDE_BLACKLIST_TO_CONF_HASH=no
1718
INCLUDE_ISOLATED_PROJECTS_TO_CONF_HASH=yes
19+
USE_GLOBAL_CMD=yes
20+
YMAKE_USE_NEW_UIDS=yes
21+
USE_GRAPH_CHANGES_PREDICTOR=yes
22+
PIC_NO_PIE=no
23+
FAIL_PY2=no
1824

19-
when ($YMAKE_USE_OLD_UIDS != "yes") {
20-
YMAKE_USE_NEW_UIDS=yes
25+
when ($YMAKE_USE_OLD_UIDS == "yes") {
26+
YMAKE_USE_NEW_UIDS=no
27+
}
28+
29+
when ($OS_WINDOWS == "yes") {
30+
USE_GLOBAL_CMD=no
31+
}
32+
33+
when ($AUTOCHECK == "yes") {
34+
USE_GRAPH_CHANGES_PREDICTOR=no
35+
PIC_NO_PIE=yes
2136
}
2237

2338
# NOTE! Only foldable vars should be listed here
@@ -110,3 +125,12 @@ _FOLDABLE_VARS=\
110125
_STD_CXX_VERSION \
111126

112127
# end of _FOLDABLE_VARS list
128+
129+
ARCADIA_TEST_ROOT=../arcadia_tests_data/
130+
DEFAULT_REQUIREMENTS=network:restricted cpu:1 ram:32
131+
132+
__COMMA__=${comma:""}
133+
__BSDQ__=\"
134+
when ($STRUCT_CMD == "yes") {
135+
__BSDQ__=\\\"
136+
}

build/conf/ts/node_modules.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ NPM_SCRIPT=$NPM_ROOT/node_modules/npm/bin/npm-cli.js
77
PM_SCRIPT=
88
PM_TYPE=
99

10-
NPM_CONTRIBS_PATH=contrib/typescript
10+
NPM_CONTRIBS_PATH=-
1111
# combined input/outputs records as list of directives ${input;hide:<path>} ${output;hide:<path>}, used in builders
1212
_NODE_MODULES_INOUTS=
1313
_YATOOL_PREBUILDER_ARG=
1414

1515
macro CUSTOM_CONTRIB_TYPESCRIPT(P) {
16-
SET(NPM_CONTRIBS_PATH $P)
16+
SET(NPM_CONTRIBS_PATH -)
1717
}
1818

1919
macro NO_CONTRIB_TYPESCRIPT() {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{%- for conan_import in conan_imports -%}
2+
{%- set search_and_dstdir = rsplit(conan_import|trim, "->", 2) -%}
3+
{%- set search = search_and_dstdir[0]|trim -%}
4+
{%- set dstdir = search_and_dstdir[1]|trim -%}
5+
{%- set srcdir_and_mask = rsplit(search, ",", 2) -%}
6+
{%- set srcdir = srcdir_and_mask[0]|trim -%}
7+
{%- set mask = srcdir_and_mask[1]|trim -%}
8+
{%- if use_conan2 %}
9+
{{ shift }}copy(self, pattern="{{ mask }}", src=dep.cpp_info.bindirs[0], dst=self.build_folder + "../../../../{{ dstdir }}")
10+
{%- else %}
11+
{{ shift }}self.copy(pattern="{{ mask }}", src="{{ srcdir }}", dst="{{ dstdir }}")
12+
{%- endif -%}
13+
{%- endfor -%}

build/export_generators/cmake/conanfile.py.jinja

Lines changed: 81 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,51 @@ class App(ConanFile):
1919
{%- endfor -%}
2020
}
2121

22-
requires =
23-
{%- for conan_require in conan.requires %} "{{ conan_require }}"
24-
{%- if not loop.last -%},{%- endif -%}
25-
{%- endfor %}
26-
27-
tool_requires =
28-
{%- for conan_tool_require in conan.tool_requires %} "{{ conan_tool_require }}"
29-
{%- if not loop.last -%},{%- endif -%}
30-
{%- endfor %}
22+
{%- set has_conan_os_depends_requires = conan.os_depends|selectattr('requires')|map(attribute='requires')|sum|length -%}
23+
{%- if (conan.requires|length) or (has_conan_os_depends_requires) %}
24+
25+
def requirements(self):
26+
{%- if (conan.requires|length) %}
27+
{%- for conan_require in conan.requires %}
28+
self.requires("{{ conan_require }}")
29+
{%- endfor -%}
30+
{%- endif -%}
31+
32+
{%- if (has_conan_os_depends_requires) -%}
33+
{%- for conan_os_depend in conan.os_depends|selectattr('requires') %}
34+
{%- if (conan_os_depend.requires|length) %}
35+
if self.settings.os == "{{ conan_os_depend.os }}":
36+
{%- for conan_require in conan_os_depend.requires %}
37+
self.requires("{{ conan_require }}")
38+
{%- endfor -%}
39+
{%- endif -%}
40+
{%- endfor -%}
41+
{%- endif -%}
42+
{%- endif -%}
43+
44+
{%- set has_conan_os_depends_tool_requires = conan.os_depends|selectattr('tool_requires')|map(attribute='tool_requires')|sum|length -%}
45+
{%- if (conan.tool_requires|length) or (has_conan_os_depends_tool_requires) %}
46+
47+
def build_requirements(self):
48+
{%- if (conan.tool_requires|length) %}
49+
{%- for conan_tool_require in conan.tool_requires %}
50+
self.tool_requires("{{ conan_tool_require }}")
51+
{%- endfor -%}
52+
{%- endif -%}
53+
54+
{%- if (has_conan_os_depends_tool_requires) -%}
55+
{%- for conan_os_depend in conan.os_depends|selectattr('tool_requires') %}
56+
{%- if (conan_os_depend.tool_requires|length) %}
57+
if self.settings.os == "{{ conan_os_depend.os }}":
58+
{%- for conan_tool_require in conan_os_depend.tool_requires %}
59+
self.tool_requires("{{ conan_tool_require }}")
60+
{%- endfor -%}
61+
{%- endif -%}
62+
{%- endfor -%}
63+
{%- endif -%}
64+
{%- endif -%}
65+
66+
{%- set has_conan_os_depends_imports = conan.os_depends|selectattr('imports')|map(attribute='imports')|sum|length -%}
3167

3268
{%- if use_conan2 %}
3369

@@ -40,32 +76,47 @@ class App(ConanFile):
4076

4177
for dep in self.dependencies.values():
4278
if dep.cpp_info.bindirs:
43-
{%- for conan_import in conan.imports -%}
44-
{%- set search_and_dstdir = rsplit(conan_import|trim, "->", 2) -%}
45-
{%- set search = search_and_dstdir[0]|trim -%}
46-
{%- set dstdir = search_and_dstdir[1]|trim -%}
47-
{%- set srcdir_and_mask = rsplit(search, ",", 2) -%}
48-
{%- set srcdir = srcdir_and_mask[0]|trim -%}
49-
{%- set mask = srcdir_and_mask[1]|trim %}
50-
copy(self, pattern="{{ mask }}", src=dep.cpp_info.bindirs[0], dst=self.build_folder + "../../../../{{ dstdir }}")
51-
{%- endfor %}
79+
{%- if conan.imports|length -%}
80+
{%- set conan_imports = conan.imports -%}
81+
{%- set shift = "" -%}
82+
{%- include "[generator]/conan_imports.jinja" -%}
83+
{%- endif -%}
84+
{%- if (has_conan_os_depends_imports) -%}
85+
{%- for conan_os_depend in conan.os_depends|selectattr('imports') %}
86+
{%- if (conan_os_depend.imports|length) %}
87+
if self.settings.os == "{{ conan_os_depend.os }}":
88+
{%- set conan_imports = conan_os_depend.imports -%}
89+
{%- set shift = " " -%}
90+
{%- include "[generator]/conan_imports.jinja" -%}
91+
{%- endif -%}
92+
{%- endfor -%}
93+
{%- endif -%}
5294

5395
def layout(self):
5496
cmake_layout(self)
5597

56-
{%- else -%}
98+
{%- else %}
5799

58100
generators = "cmake_find_package", "cmake_paths"
59101

60102
def imports(self):
61-
{%- for conan_import in conan.imports -%}
62-
{%- set search_and_dstdir = rsplit(conan_import|trim, "->", 2) -%}
63-
{%- set search = search_and_dstdir[0]|trim -%}
64-
{%- set dstdir = search_and_dstdir[1]|trim -%}
65-
{%- set srcdir_and_mask = rsplit(search, ",", 2) -%}
66-
{%- set srcdir = srcdir_and_mask[0]|trim -%}
67-
{%- set mask = srcdir_and_mask[1]|trim %}
68-
self.copy(pattern="{{ mask }}", src="{{ srcdir }}", dst="{{ dstdir }}")
69-
{%- endfor %}
70-
71-
{%- endif %}
103+
{%- if conan.imports|length -%}
104+
{%- set conan_imports = conan.imports -%}
105+
{%- set shift = "" -%}
106+
{%- include "[generator]/conan_imports.jinja" -%}
107+
{%- endif -%}
108+
109+
{%- if (has_conan_os_depends_imports) -%}
110+
{%- for conan_os_depend in conan.os_depends|selectattr('imports') %}
111+
{%- if (conan_os_depend.imports|length) %}
112+
if self.settings.os == "{{ conan_os_depend.os }}":
113+
{%- set conan_imports = conan_os_depend.imports -%}
114+
{%- set shift = " " -%}
115+
{%- include "[generator]/conan_imports.jinja" -%}
116+
{%- endif -%}
117+
{%- endfor -%}
118+
{%- endif -%}
119+
120+
{%- endif -%}
121+
122+
{%- include "[generator]/debug_conan.jinja" ignore missing %}

build/export_generators/cmake/generator.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,23 @@ include="skip"
8787

8888
# All Conan attributes make sorted_set for stability generated conanfile,
8989
# order has no effect for all conan options
90+
# All OS conan attributes
9091
conan-requires="sorted_set"
9192
conan-tool_requires="sorted_set"
9293
conan-imports="sorted_set"
9394
conan-options="sorted_set"
9495
conan-generators="sorted_set"
9596

97+
# OS depends conan attributes
98+
conan-os_depends="list"
99+
conan-os_depends-ITEM="dict"
100+
conan-os_depends-os="str"
101+
conan-os_depends-requires="sorted_set"
102+
conan-os_depends-tool_requires="sorted_set"
103+
conan-os_depends-imports="sorted_set"
104+
conan-os_depends-options="sorted_set"
105+
conan-os_depends-generators="sorted_set"
106+
96107
# For project languages order important only for ASM, it must be after C/CXX,
97108
# this special logic maked in template, here use sorted_set for stability generated vars
98109
project_languages="sorted_set"

build/export_generators/hardcoded-cmake/conanfile.py.jinja

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,27 @@ class App(ConanFile):
1919
{%- endfor -%}
2020
}
2121

22-
requires =
23-
{%- for conan_require in conan_packages %} "{{ conan_require }}"
24-
{%- if not loop.last -%},{%- endif -%}
25-
{%- endfor %}
22+
{%- if (conan_tool_packages|length) %}
2623

2724
tool_requires =
28-
{%- for conan_tool_require in conan_tool_packages %} "{{ conan_tool_require }}"
29-
{%- if not loop.last -%},{%- endif -%}
30-
{%- endfor %}
25+
{%- for conan_tool_require in conan_tool_packages %} "{{ conan_tool_require }}"
26+
{%- if not loop.last -%},{%- endif -%}
27+
{%- endfor -%}
28+
{%- endif -%}
29+
30+
{%- if (conan_packages|length) %}
31+
32+
def requirements(self):
33+
requires = [
34+
{%- for conan_require in conan_packages %} "{{ conan_require }}"
35+
{%- if not loop.last -%},{%- endif -%}
36+
{%- endfor %} ]
37+
for require in requires:
38+
if ("linux-headers" in require) and (self.settings.os != "Linux"):
39+
continue
40+
self.requires(require)
41+
42+
{%- endif -%}
3143

3244
{%- if use_conan2 %}
3345

@@ -50,7 +62,7 @@ class App(ConanFile):
5062
def layout(self):
5163
cmake_layout(self)
5264

53-
{%- else -%}
65+
{%- else %}
5466

5567
generators = "cmake_find_package", "cmake_paths"
5668

0 commit comments

Comments
 (0)