Skip to content

Commit

Permalink
Merge pull request #14512 from ydb-platform/merge-libs-250213-0050
Browse files Browse the repository at this point in the history
  • Loading branch information
alexv-smirnov committed Feb 13, 2025
2 parents 09744cf + 3616198 commit 28180f6
Show file tree
Hide file tree
Showing 263 changed files with 4,089 additions and 2,352 deletions.
5 changes: 3 additions & 2 deletions build/conf/licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"AFL-2.0",
"Amazon-SL",
"APSL-1.0",
"Artistic-2.0",
"ASM-BSD-3-Clause",
"BCL",
"Bison-Exception",
Expand Down Expand Up @@ -39,7 +38,6 @@
"CC-BY-SA-4.0",
"CDDL",
"CECILL-B",
"ClArtistic",
"DSO-1.1",
"Elastic-License-2.0",
"FSFUL",
Expand Down Expand Up @@ -159,6 +157,7 @@
"AGPL-3.0-or-later",
"Artistic-1.0",
"Artistic-1.0-Perl",
"ClArtistic",
"confluent-community-1.0",
"Moderne-Source-Available-License"
]
Expand All @@ -180,6 +179,7 @@
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"APSL-2.0",
"Artistic-2.0",
"Beerware",
"blessing",
"Brian-Gladman-3-Clause",
Expand Down Expand Up @@ -213,6 +213,7 @@
"Cmu-Computing-Services",
"CUP-Parser",
"curl",
"Custom-clarified-artistic-proofread",
"Custom-eigen",
"Custom-fft2d",
"Custom-fft4g",
Expand Down
7 changes: 0 additions & 7 deletions build/conf/linkers/ld.conf
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,6 @@ _LD_LINK_LIB_EXTRA_INPUT=
_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"}
_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 -- $_LD_ARCHIVER_KV_PLUGIN --

when ($MAPSMOBI_BUILD_TARGET == "yes") {
_LD_ARCHIVER+= "no-openssl3"
}
otherwise {
_LD_ARCHIVER+= "enable-openssl3"
}

_LD_LIB_GENERATE_MF=$GENERATE_MF &&
when ($TIDY == "yes") {
_LD_ARCHIVER=$YMAKE_PYTHON ${input:"build/scripts/clang_tidy_arch.py"} --source-root $ARCADIA_ROOT --build-root $ARCADIA_BUILD_ROOT --output-file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ def __init__(self, opts):
'gnu', # llvm_ar_format, used only if arch_type == 'LLVM_AR'
opts.parsed_args.project_binary_dir,
'None', # plugin. Unused for now
'--', # for plugins. Unused for now
'--',
]
# the remaining archiving cmd args are [output, .. input .. ]

Expand Down
4 changes: 2 additions & 2 deletions build/export_generators/cmake/generator.toml
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ copy=["cmake/FindJNITarget.cmake"]
add_values=[{attr="includes", values=["cmake/FindJNITarget.cmake"]}]

[[rules]]
attrs=["target_commands-macro=run_antlr"]
attrs=["custom_runs-command=run_antlr"]
copy=["cmake/antlr.cmake"]
add_values=[{attr="includes", values=["cmake/antlr.cmake"]}]

[[rules]]
attrs=["target_commands-macro=run_antlr4"]
attrs=["custom_runs-command=run_antlr4"]
copy=["cmake/antlr4.cmake"]
add_values=[{attr="includes", values=["cmake/antlr4.cmake"]}]

Expand Down
15 changes: 8 additions & 7 deletions build/export_generators/cmake/target_commands.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
{%- if current_target.custom_runs|length -%}
{%- for custom_run in current_target.custom_runs %}
{%- set first_arg = custom_run.command|first %}
{%- set tail_args = custom_run.command|slice(1, custom_run.command|length - 1) %}
{%- if (first_arg == "run_antlr") or (first_arg == "run_antlr4") %}
{{ first_arg }}(
{%- if custom_run.outputs|length %}
Expand All @@ -34,14 +33,16 @@
WORKING_DIRECTORY
{{ custom_run.cwd }}
{%- endif -%}
{%- if tail_args|length %}
ANTLR_ARGS
{%- for tail_arg in tail_args %}
{{ tail_arg }}
{%- if custom_run.command|length > 1 %}
ANTLER_ARGS
{%- for arg in custom_run.command -%}
{%- if not loop.first %}
{{ arg }}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif %}
)
{%- else %}
{% else %}
add_custom_command(
{%- if custom_run.outputs|length %}
OUTPUT
Expand Down
8 changes: 8 additions & 0 deletions build/mapping.conf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"bottles": {},
"resources": {
"8018811524": "https://devtools-registry.s3.yandex.net/8018811524",
"6277415836": "https://devtools-registry.s3.yandex.net/6277415836",
"2214720943": "https://devtools-registry.s3.yandex.net/2214720943",
"2214542408": "https://devtools-registry.s3.yandex.net/2214542408",
Expand Down Expand Up @@ -1065,8 +1066,11 @@
"7512103615": "https://devtools-registry.s3.yandex.net/7512103615",
"7324464594": "https://devtools-registry.s3.yandex.net/7324464594",
"7654921682": "https://devtools-registry.s3.yandex.net/7654921682",
"8013116004": "https://devtools-registry.s3.yandex.net/8013116004",
"8013130168": "https://devtools-registry.s3.yandex.net/8013130168",
"7487656957": "https://devtools-registry.s3.yandex.net/7487656957",
"7458707245": "https://devtools-registry.s3.yandex.net/7458707245",
"8013150302": "https://devtools-registry.s3.yandex.net/8013150302",
"7414146467": "https://devtools-registry.s3.yandex.net/7414146467",
"7654793679": "https://devtools-registry.s3.yandex.net/7654793679",
"7487672728": "https://devtools-registry.s3.yandex.net/7487672728",
Expand Down Expand Up @@ -1587,6 +1591,7 @@
"5545691160": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"5559524010": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"5572005924": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"8018811524": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"5675381622": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"5683487438": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"5707396874": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
Expand Down Expand Up @@ -2292,8 +2297,11 @@
"7512103615": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/29fcd2aa-e0b5-481e-83c8-b7ff5e0157c9/yfm-docs.tar",
"7324464594": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/32cc8c74-decd-44a8-bc8c-f8f0d7edfffe/yfm-docs.tar",
"7654921682": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/33b2cf15-eb2e-44b8-a074-0c6f60f97a04/yfm-docs.tar",
"8013116004": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/33d7c3cf-e76f-40cb-9e98-59084b60928c/yfm-docs.tar",
"8013130168": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/47070d89-f0a5-4aed-a017-3bd4f9d1518f/yfm-docs.tar",
"7487656957": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/4b747fb6-2d4e-4a7b-bbed-abb9a1e21761/yfm-docs.tar",
"7458707245": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/4e7df89f-3762-4eba-ba73-562ccaeae548/yfm-docs.tar",
"8013150302": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/5af5fdb2-854a-4889-8d34-beb85f4a7c30/yfm-docs.tar",
"7414146467": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/66167d72-07fa-444c-8493-dea0a39d034e/yfm-docs.tar",
"7654793679": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/68b3d50f-8068-40b2-8e3c-96653135fcb5/yfm-docs.tar",
"7487672728": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/68c62602-dfe7-4bea-873f-cae85e13071f/yfm-docs.tar",
Expand Down
10 changes: 5 additions & 5 deletions build/platform/test_tool/host.ya.make.inc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7994789266)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8018525488)
ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7994784587)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8018523316)
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7994797288)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8018529985)
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7994780427)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8018521599)
ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7994793586)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8018527620)

ENDIF()
10 changes: 5 additions & 5 deletions build/platform/test_tool/host_os.ya.make.inc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7994642530)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8018808572)
ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7994640050)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8018807025)
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7994647367)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8018811524)
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7994637838)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8018805118)
ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7994644702)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8018809911)

ENDIF()
37 changes: 0 additions & 37 deletions build/plugins/_common.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import six
import sys
import hashlib
import base64

Expand Down Expand Up @@ -61,15 +60,6 @@ def tobuilddir(fname):
return fname


def before(s, ss):
p = s.find(ss)

if p == -1:
return s

return s[:p]


def sort_by_keywords(keywords, args):
flat = []
res = {}
Expand Down Expand Up @@ -115,30 +105,10 @@ def resolve_common_const(path):
return path


def resolve_to_abs_path(path, source_root, build_root):
if path.startswith('$S') and source_root is not None:
return path.replace('$S', source_root, 1)
if path.startswith('$B') and build_root is not None:
return path.replace('$B', build_root, 1)
return path


def resolve_to_ymake_path(path):
return resolve_to_abs_path(path, '${ARCADIA_ROOT}', '${ARCADIA_BUILD_ROOT}')


def get(fun, num):
return fun()[num][0]


def make_tuples(arg_list):
def tpl():
for x in arg_list:
yield (x, [])

return list(tpl())


def resolve_includes(unit, src, paths):
return unit.resolve_include([src] + paths) if paths else []

Expand Down Expand Up @@ -169,13 +139,6 @@ def skip_build_root(x):
return x


def get_interpreter_path():
interpreter_path = [sys.executable]
if 'ymake' in interpreter_path[0]:
interpreter_path.append('--python')
return interpreter_path


def filter_out_by_keyword(test_data, keyword):
def _iterate():
i = 0
Expand Down
1 change: 1 addition & 0 deletions build/plugins/nots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from enum import auto, StrEnum
from typing import Any, Literal, TYPE_CHECKING


# noinspection PyUnresolvedReferences
import ymake

Expand Down
15 changes: 0 additions & 15 deletions build/scripts/link_exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ def get_leaks_suppressions(cmd):
return supp, newcmd


MUSL_LIBS = '-lc', '-lcrypt', '-ldl', '-lm', '-lpthread', '-lrt', '-lutil'


CUDA_LIBRARIES = {
'-lcublas_static': '-lcublas',
'-lcublasLt_static': '-lcublasLt',
Expand Down Expand Up @@ -258,14 +255,6 @@ def fix_sanitize_flag(cmd, opts):
return flags


def fix_cmd_for_musl(cmd):
flags = []
for flag in cmd:
if flag not in MUSL_LIBS:
flags.append(flag)
return flags


def fix_cmd_for_dynamic_cuda(cmd):
flags = []
for flag in cmd:
Expand Down Expand Up @@ -325,7 +314,6 @@ def fix_blas_resolving(cmd):
def parse_args(args):
parser = optparse.OptionParser()
parser.disable_interspersed_args()
parser.add_option('--musl', action='store_true')
parser.add_option('--custom-step')
parser.add_option('--python')
parser.add_option('--source-root')
Expand Down Expand Up @@ -364,9 +352,6 @@ def parse_args(args):
cmd = fix_blas_resolving(args)
cmd = fix_py2(cmd)
cmd = remove_excessive_flags(cmd)
if opts.musl:
cmd = fix_cmd_for_musl(cmd)

cmd = fix_sanitize_flag(cmd, opts)

if opts.dynamic_cuda:
Expand Down
70 changes: 2 additions & 68 deletions build/scripts/link_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ def __init__(self, args):
self.llvm_ar_format = args[2]
self.build_root = args[3]
self.plugin = args[4]
self.enable_openssl3 = args[5]
self.output = args[6]
auto_input = args[7:]
self.output = args[5]
auto_input = args[6:]

self.need_modify = False
self.extra_args = []
Expand Down Expand Up @@ -66,68 +65,6 @@ def get_opts(args):
return Opts(args)


def run(*args):
return subprocess.check_output(list(args), shell=False).strip()


def gen_renames_1(d):
for l in d.split('\n'):
l = l.strip()

if ' ' in l:
yield l.split(' ')[-1]


def have_prefix(l, p):
for x in l:
if not x.startswith(p):
return False

return True


def gen_renames_2(p, d):
l = list(gen_renames_1(d))
a = have_prefix(l, '_')

for s in l:
if 'asan_globals' in s:
continue

if s in ['HMAC', 'SHA1', 'SHA256', 'SHA256', 'SHA512', 'RC4', 'MD5', 'SHA384']:
continue

if a and s[1:] in ['HMAC', 'SHA1', 'SHA256', 'SHA256', 'SHA512', 'RC4', 'MD5', 'SHA384']:
continue

if a:
yield s + ' _' + p + s[1:]
else:
yield s + ' ' + p + s


def gen_renames(p, d):
return '\n'.join(gen_renames_2(p, d)).strip() + '\n'


def rename_syms(where, ret):
p = 'v1_'

# find symbols to rename
syms = run(where + 'llvm-nm', '--extern-only', '--defined-only', '-A', ret)

# prepare rename plan
renames = gen_renames(p, syms)
tmp = ret + '.syms'

with open(tmp, 'w') as f:
f.write(renames)

# rename symbols
run(where + 'llvm-objcopy', '--redefine-syms=' + tmp, ret)
os.unlink(tmp)


if __name__ == "__main__":
opts = get_opts(sys.argv[1:])

Expand Down Expand Up @@ -176,8 +113,5 @@ def call():
if exit_code != 0:
raise Exception('{0} returned non-zero exit code {1}. Stop.'.format(' '.join(cmd), exit_code))

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

if opts.ar_plugin:
subprocess.check_call([sys.executable, opts.ar_plugin, opts.output, '--'] + sys.argv[1:])
Loading

0 comments on commit 28180f6

Please sign in to comment.