Skip to content

Commit 8b46b94

Browse files
committed
Merge pull request #14429 from ydb-platform/merge-libs-250211-1102
2 parents 250f3cc + 37a4c76 commit 8b46b94

File tree

5,289 files changed

+231
-2257364
lines changed

Some content is hidden

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

5,289 files changed

+231
-2257364
lines changed

build/conf/linkers/ld.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ LINK_SCRIPT_EXE_FLAGS=
213213

214214
REAL_LINK_EXE_CMDLINE =\
215215
$YMAKE_PYTHON ${input:"build/scripts/link_exe.py"} \
216+
REAL_LINK_EXE_CMDLINE+=--start-plugins ${ext=.pyplugin:SRCS_GLOBAL} --end-plugins
216217
REAL_LINK_EXE_CMDLINE+=--clang-ver $CLANG_VER
217218
REAL_LINK_EXE_CMDLINE+=$_LD_LINKER_OUTPUT
218219
REAL_LINK_EXE_CMDLINE+=\
@@ -347,6 +348,12 @@ LINK_EXEC_DYN_LIB=\
347348
_LD_LINK_LIB_EXTRA_INPUT=
348349
_LD_TAIL_LINK_LIB=$AUTO_INPUT $_LD_LINK_LIB_EXTRA_INPUT ${hide;kv:"p AR"} $TOOLCHAIN_ENV ${hide;kv:"pc light-red"} ${hide;kv:"show_out"}
349350
_LD_ARCHIVER=$YMAKE_PYTHON ${input:"build/scripts/link_lib.py"} ${quo:AR_TOOL} $AR_TYPE $_LD_LLVM_AR_FORMAT $ARCADIA_BUILD_ROOT $_LD_AR_PLUGIN
351+
when ($MAPSMOBI_BUILD_TARGET == "yes") {
352+
_LD_ARCHIVER+= "no-openssl3"
353+
}
354+
otherwise {
355+
_LD_ARCHIVER+= "enable-openssl3"
356+
}
350357
_LD_LIB_GENERATE_MF=$GENERATE_MF &&
351358
when ($TIDY == "yes") {
352359
_LD_ARCHIVER=$YMAKE_PYTHON ${input:"build/scripts/clang_tidy_arch.py"} --source-root $ARCADIA_ROOT --build-root $ARCADIA_BUILD_ROOT --output-file

build/conf/project_specific/yt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
macro GENERATE_YT_RECORD(Yaml, OUTPUT_INCLUDES[]) {
22
.CMD=${tool:"yt/yt/tools/record_codegen"} --input ${input:Yaml} --output-root $ARCADIA_BUILD_ROOT --output-cpp ${output;norel;noext;suf=.record.cpp:Yaml} ${hide;output;norel;noext;suf=.record.h:Yaml} ${pre=--output-include :OUTPUT_INCLUDES} ${hide;output_include:OUTPUT_INCLUDES} ${hide;output_include:"yt/yt/client/table_client/record_codegen_deps.h"} ${hide;kv:"p RC"}
3-
.SEM=packages-ITEM && packages-name Python3 && mpackages-ITEM && mpackages-name Python3 && target_commands-ITEM && target_commands-macro add_custom_command && target_commands-args OUTPUT ${output;norel;noext;suf=.record.cpp:Yaml} ${output;norel;noext;suf=.record.h:Yaml} DEPENDS ${input:Yaml} ${input:"yt/yt/tools/record_codegen/__main__.py"} ${input:"yt/python/yt/record_codegen_helpers/__init__.py"} COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=$ENV{PYTHONPATH}:${ARCADIA_ROOT}/yt/python/yt" ${Python3_EXECUTABLE} ${input:"yt/yt/tools/record_codegen/__main__.py"} --input ${input:Yaml} --output-root $ARCADIA_BUILD_ROOT --output-cpp ${output;norel;noext;suf=.record.cpp:Yaml} ${pre=--output-include :OUTPUT_INCLUDES} ${hide;output;norel;noext;suf=.record.h:Yaml}
3+
.SEM=custom_runs-ITEM && custom_runs-outputs ${output;norel;noext;suf=.record.cpp:Yaml} ${output;norel;noext;suf=.record.h:Yaml} && custom_runs-depends ${input:Yaml} ${input:"yt/yt/tools/record_codegen/__main__.py"} ${input:"yt/python/yt/record_codegen_helpers/__init__.py"} && custom_runs-env "PYTHONPATH=$ENV{PYTHONPATH}:${ARCADIA_ROOT}/yt/python/yt" && custom_runs-command ${Python3_EXECUTABLE} ${input:"yt/yt/tools/record_codegen/__main__.py"} --input ${input:Yaml} --output-root $ARCADIA_BUILD_ROOT --output-cpp ${output;norel;noext;suf=.record.cpp:Yaml} ${pre=--output-include :OUTPUT_INCLUDES} ${hide;output;norel;noext;suf=.record.h:Yaml} && custom_runs-cmake_packages-ITEM && custom_runs-cmake_packages-name Python3
44
PEERDIR(yt/yt/client)
55
}

build/export_generators/cmake/dir_packages.jinja

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{%- macro RenderPackages(target) -%}
22
{%- set packages = [] -%}
3-
{%- if (target.packages is defined) and (target.packages|length) -%}
3+
{%- if target.packages|length -%}
44
{%- set packages = packages + target.packages -%}
55
{%- endif -%}
6-
{%- if (target.mpackages is defined) and (target.mpackages|length) -%}
6+
{%- if target.mpackages|length -%}
77
{%- if packages|length -%}
88
{#- Skip duplicating packages -#}
99
{%- set mpackages = target.mpackages|rejectattr('name', 'in', packages|map(attribute='name')) -%}
@@ -14,16 +14,37 @@
1414
{%- set packages = packages + target.mpackages -%}
1515
{%- endif -%}
1616
{%- endif -%}
17+
{%- set runs_packages = target.custom_runs|selectattr('cmake_packages')|map(attribute='cmake_packages')|sum -%}
18+
{%- if runs_packages|length -%}
19+
{%- if packages|length -%}
20+
{#- Skip duplicating packages -#}
21+
{%- set runs_packages = runs_packages|rejectattr('name', 'in', packages|map(attribute='name')) -%}
22+
{%- if runs_packages|length -%}
23+
{%- set packages = packages + runs_packages -%}
24+
{%- endif -%}
25+
{%- else -%}
26+
{%- set packages = packages + runs_packages -%}
27+
{%- endif -%}
28+
{%- endif -%}
1729
{%- if packages|length -%}
18-
{%- for package in packages %}
30+
{%- set simple_packages = packages|rejectattr('components') -%}
31+
{%- set complex_packages = packages|selectattr('components') -%}
32+
{%- if simple_packages|length -%}
33+
{%- for package_name in simple_packages|map(attribute='name')|unique %}
34+
find_package({{ package_name }} REQUIRED)
35+
{% endfor -%}
36+
{%- endif -%}
37+
{%- if complex_packages|length -%}
38+
{%- for package in complex_packages %}
1939
find_package({{ package.name }} REQUIRED
20-
{%- if package.components|length %} COMPONENTS
21-
{%- for component in package.components %}
40+
{%- if package.components|length %} COMPONENTS
41+
{%- for component in package.components %}
2242
{{ component }}
23-
{% endfor -%}
24-
{%- endif -%}
43+
{% endfor -%}
44+
{%- endif -%}
2545
)
26-
{% endfor -%}
46+
{% endfor -%}
47+
{%- endif -%}
2748
{%- endif -%}
2849
{%- endmacro -%}
2950

build/export_generators/cmake/generator.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,17 @@ target_macroses-merge_args="flag"
169169
add_test_requirements="list"
170170
add_ytest_requirements="list"
171171

172+
custom_runs="list"
173+
custom_runs-depends="list"
174+
custom_runs-env="list"
175+
custom_runs-command="list"
176+
custom_runs-outputs="list"
177+
custom_runs-cwd="str"
178+
custom_runs-cmake_packages="list"
179+
custom_runs-cmake_packages-ITEM="dict"
180+
custom_runs-cmake_packages-name="str"
181+
custom_runs-cmake_packages-components="list"
182+
172183
[attrs.induced]
173184
# Induced packages
174185
packages="list"

build/export_generators/cmake/target_cmake_lists.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
{%- set only_headers_like_sources_library = false -%}
3131
{%- endif -%}
3232
{%- endif -%}
33-
{%- if current_target.target_commands|selectattr('macro', 'eq', 'add_custom_command')|length -%}
33+
{%- if current_target.custom_runs|length -%}
3434
{%- set only_headers_like_sources_library = false -%}
3535
{%- endif -%}
3636
{%- else -%}

build/export_generators/cmake/target_commands.jinja

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
{%- if current_target.target_commands is defined -%}
1+
{%- if current_target.target_commands|length -%}
22
{%- for target_command in current_target.target_commands %}
33
{{ target_command.macro }}(
44
{%- if target_command.args|length -%}
55
{%- for arg in target_command.args %}
66
{{ arg }}
77
{%- endfor -%}
8-
{%- endif %}
8+
{%- endif -%}
99
{%- if target_command.args_escaped|length %}
1010
"
1111
{%- for arg_escaped in target_command.args_escaped -%}
@@ -17,3 +17,67 @@
1717
)
1818
{% endfor -%}
1919
{%- endif -%}
20+
21+
{%- if current_target.custom_runs|length -%}
22+
{%- for custom_run in current_target.custom_runs %}
23+
{%- set first_arg = custom_run.command|first %}
24+
{%- set tail_args = custom_run.command|slice(1, custom_run.command|length - 1) %}
25+
{%- if (first_arg == "run_antlr") or (first_arg == "run_antlr4") %}
26+
{{ first_arg }}(
27+
{%- if custom_run.outputs|length %}
28+
OUTPUT
29+
{%- for output in custom_run.outputs %}
30+
{{ output }}
31+
{%- endfor -%}
32+
{%- endif %}
33+
{%- if (custom_run.cwd is defined) and (custom_run.cwd != "") %}
34+
WORKING_DIRECTORY
35+
{{ custom_run.cwd }}
36+
{%- endif -%}
37+
{%- if tail_args|length %}
38+
ANTLR_ARGS
39+
{%- for tail_arg in tail_args %}
40+
{{ tail_arg }}
41+
{%- endfor -%}
42+
{%- endif -%}
43+
)
44+
{%- else %}
45+
add_custom_command(
46+
{%- if custom_run.outputs|length %}
47+
OUTPUT
48+
{%- for output in custom_run.outputs %}
49+
{{ output }}
50+
{%- endfor -%}
51+
{%- endif -%}
52+
{%- if custom_run.depends|length %}
53+
DEPENDS
54+
{%- for depend in custom_run.depends %}
55+
{{ depend }}
56+
{%- endfor -%}
57+
{%- endif -%}
58+
{%- if (custom_run.cwd is defined ) and (custom_run.cwd != "") %}
59+
WORKING_DIRECTORY
60+
{{ custom_run.cwd }}
61+
{%- endif -%}
62+
{%- if custom_run.command|length %}
63+
COMMAND
64+
{%- if custom_run.env|length %}
65+
${CMAKE_COMMAND}
66+
-E
67+
env
68+
{%- for env in custom_run.env %}
69+
{{ env|replace('\\', '\\\\')|replace('"', '\\"')|replace(';', '\\;') }}
70+
{%- if not loop.last -%};{%- endif -%}
71+
{%- endfor -%}
72+
{%- endif -%}
73+
{%- for arg in custom_run.command -%}
74+
{%- if loop.first and arg == "python3" -%}
75+
{%- set arg = "Python3::Interpreter" -%}
76+
{%- endif %}
77+
{{ arg }}
78+
{%- endfor -%}
79+
{%- endif %}
80+
)
81+
{% endif -%}
82+
{%- endfor -%}
83+
{%- endif -%}

build/export_generators/gradle/generator.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ custom_runs-env="list"
7373
custom_runs-command="list"
7474
custom_runs-outputs="list"
7575
custom_runs-cwd="str"
76+
custom_runs-cmake_packages="list"
77+
custom_runs-cmake_packages-ITEM="dict"
78+
custom_runs-cmake_packages-name="str"
79+
custom_runs-cmake_packages-components="list"
7680

7781
javac-flags="list"
7882

build/export_generators/ide-gradle/generator.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ custom_runs-env="list"
7676
custom_runs-command="list"
7777
custom_runs-outputs="list"
7878
custom_runs-cwd="str"
79+
custom_runs-cmake_packages="list"
80+
custom_runs-cmake_packages-ITEM="dict"
81+
custom_runs-cmake_packages-name="str"
82+
custom_runs-cmake_packages-components="list"
7983

8084
javac-flags="list"
8185

build/scripts/link_exe.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import os.path
44
import sys
5+
import json
56
import subprocess
67
import optparse
78
import textwrap
@@ -321,7 +322,7 @@ def fix_blas_resolving(cmd):
321322
return cmd
322323

323324

324-
def parse_args():
325+
def parse_args(args):
325326
parser = optparse.OptionParser()
326327
parser.disable_interspersed_args()
327328
parser.add_option('--musl', action='store_true')
@@ -341,11 +342,23 @@ def parse_args():
341342
parser.add_option('--whole-archive-libs', action='append')
342343
parser.add_option('--exclude-libs', action='append')
343344
thinlto_cache.add_options(parser)
344-
return parser.parse_args()
345+
return parser.parse_args(args)
345346

346347

347348
if __name__ == '__main__':
348-
opts, args = parse_args()
349+
args = sys.argv[1:]
350+
ib = args.index('--start-plugins')
351+
ie = args.index('--end-plugins')
352+
plugins = args[ib + 1:ie]
353+
args = args[:ib] + args[ie + 1:]
354+
355+
for p in plugins:
356+
res = subprocess.check_output([sys.executable, p] + args).decode().strip()
357+
358+
if res:
359+
args = json.loads(res)
360+
361+
opts, args = parse_args(args)
349362
args = pcf.skip_markers(args)
350363

351364
cmd = fix_blas_resolving(args)

build/scripts/link_lib.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ def __init__(self, args):
1212
self.llvm_ar_format = args[2]
1313
self.build_root = args[3]
1414
self.plugin = args[4]
15-
self.output = args[5]
16-
auto_input = args[6:]
15+
self.enable_openssl3 = args[5]
16+
self.output = args[6]
17+
auto_input = args[7:]
1718

1819
self.need_modify = False
1920
self.extra_args = []
@@ -162,5 +163,5 @@ def call():
162163
if exit_code != 0:
163164
raise Exception('{0} returned non-zero exit code {1}. Stop.'.format(' '.join(cmd), exit_code))
164165

165-
if os.path.basename(opts.output) in ['libcontrib-libs-openssl.a', 'liblibs-openssl-crypto.a']:
166+
if opts.enable_openssl3 != 'no-openssl3' and os.path.basename(opts.output) in ['libcontrib-libs-openssl.a', 'liblibs-openssl-crypto.a']:
166167
rename_syms(os.path.dirname(opts.archiver) + '/', opts.output)

0 commit comments

Comments
 (0)