Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import libs 1 #590

Merged
merged 3 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions build/external_resources/ymake/public.resources.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"by_platform": {
"darwin": {
"uri": "sbr:5509380757"
"uri": "sbr:5550834592"
},
"darwin-arm64": {
"uri": "sbr:5509369518"
"uri": "sbr:5550838146"
},
"linux": {
"uri": "sbr:5509364024"
"uri": "sbr:5550826871"
},
"linux-aarch64": {
"uri": "sbr:5509360013"
"uri": "sbr:5550843115"
},
"win32-clang-cl": {
"uri": "sbr:5509388614"
"uri": "sbr:5550838970"
}
}
}
10 changes: 5 additions & 5 deletions build/external_resources/ymake/resources.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"by_platform": {
"darwin": {
"uri": "sbr:5509343907"
"uri": "sbr:5550837873"
},
"darwin-arm64": {
"uri": "sbr:5509345716"
"uri": "sbr:5550841763"
},
"linux": {
"uri": "sbr:5509364685"
"uri": "sbr:5550823946"
},
"linux-aarch64": {
"uri": "sbr:5509354435"
"uri": "sbr:5550840880"
},
"win32-clang-cl": {
"uri": "sbr:5509351251"
"uri": "sbr:5550839664"
}
}
}
30 changes: 29 additions & 1 deletion build/mapping.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"2214720943": "https://devtools-registry.s3.yandex.net/2214720943",
"2214542408": "https://devtools-registry.s3.yandex.net/2214542408",
"1886578148": "https://devtools-registry.s3.yandex.net/1886578148",
"2813906025": "https://devtools-registry.s3.yandex.net/2813906025",
"2813915651": "https://devtools-registry.s3.yandex.net/2813915651",
"2813921697": "https://devtools-registry.s3.yandex.net/2813921697",
"2813926943": "https://devtools-registry.s3.yandex.net/2813926943",
"2819507345": "https://devtools-registry.s3.yandex.net/2819507345",
"4748237118": "https://devtools-registry.s3.yandex.net/4748237118",
"4748241015": "https://devtools-registry.s3.yandex.net/4748241015",
"4748280193": "https://devtools-registry.s3.yandex.net/4748280193",
Expand Down Expand Up @@ -32,6 +37,10 @@
"5424038053": "https://devtools-registry.s3.yandex.net/5424038053",
"5424051723": "https://devtools-registry.s3.yandex.net/5424051723",
"5543659225": "https://devtools-registry.s3.yandex.net/5543659225",
"5553311553": "https://devtools-registry.s3.yandex.net/5553311553",
"5554110935": "https://devtools-registry.s3.yandex.net/5554110935",
"5554115224": "https://devtools-registry.s3.yandex.net/5554115224",
"5550376885": "https://devtools-registry.s3.yandex.net/5550376885",
"5531183987": "https://devtools-registry.s3.yandex.net/5531183987",
"5453803895": "https://devtools-registry.s3.yandex.net/5453803895",
"5458408674": "https://devtools-registry.s3.yandex.net/5458408674",
Expand Down Expand Up @@ -110,20 +119,30 @@
"5534059422": "https://devtools-registry.s3.yandex.net/5534059422",
"5476908047": "https://devtools-registry.s3.yandex.net/5476908047",
"5509380757": "https://devtools-registry.s3.yandex.net/5509380757",
"5550834592": "https://devtools-registry.s3.yandex.net/5550834592",
"5476891477": "https://devtools-registry.s3.yandex.net/5476891477",
"5509369518": "https://devtools-registry.s3.yandex.net/5509369518",
"5550838146": "https://devtools-registry.s3.yandex.net/5550838146",
"5476896849": "https://devtools-registry.s3.yandex.net/5476896849",
"5509364024": "https://devtools-registry.s3.yandex.net/5509364024",
"5550826871": "https://devtools-registry.s3.yandex.net/5550826871",
"5476895322": "https://devtools-registry.s3.yandex.net/5476895322",
"5509360013": "https://devtools-registry.s3.yandex.net/5509360013",
"5550843115": "https://devtools-registry.s3.yandex.net/5550843115",
"5476896707": "https://devtools-registry.s3.yandex.net/5476896707",
"5509388614": "https://devtools-registry.s3.yandex.net/5509388614",
"5550838970": "https://devtools-registry.s3.yandex.net/5550838970",
"2980468199": "https://devtools-registry.s3.yandex.net/2980468199"
},
"resources_descriptions": {
"2214720943": "Clang 11.0.0 for darwin-arm64",
"2214542408": "Clang 11.0.0 for darwin-x86_64 from task/828474520 with LTO and PGO",
"1886578148": "Clang 11.0.0 for linux-x86_64 from task/846665983 with LTO and PGO at r7671799",
"2813906025": "Clang 12.0.1 for darwin-arm64",
"2813915651": "Clang 12.0.1 for darwin-x86_64",
"2813921697": "Clang 12.0.1 for linux-ppc64le",
"2813926943": "Clang 12.0.1 for linux-x86_64",
"2819507345": "Clang 12.0.1 for windows-x86_64",
"4748237118": "Clang 14.0.6 for darwin arm64",
"4748241015": "Clang 14.0.6 for darwin x86_64",
"4748280193": "Clang 14.0.6 for linux aarch64",
Expand Down Expand Up @@ -152,6 +171,10 @@
"5424038053": "OTHER_RESOURCE-none-1.21.3-y_go1.21.3.linux-arm64.tar.gz",
"5424051723": "OTHER_RESOURCE-none-1.21.3-y_go1.21.3.windows-amd64.tar.gz",
"5543659225": "OTHER_RESOURCE-none-none-clang-darwin-arm64.tgz",
"5553311553": "OTHER_RESOURCE-none-none-clang-new-darwin-arm64.tgz",
"5554110935": "OTHER_RESOURCE-none-none-clang-new-darwin-x86_64.tgz",
"5554115224": "OTHER_RESOURCE-none-none-clang-new-linux-aarch64.tgz",
"5550376885": "OTHER_RESOURCE-none-none-clang-new.tgz",
"5531183987": "OTHER_RESOURCE-none-none-clang.tgz",
"5453803895": "OTHER_RESOURCE-none-none-lld.tgz",
"5458408674": "OTHER_RESOURCE-none-none-lld.tgz",
Expand Down Expand Up @@ -230,16 +253,21 @@
"5534059422": "yexport for linux",
"5476908047": "ymake for darwin",
"5509380757": "ymake for darwin",
"5550834592": "ymake for darwin",
"5476891477": "ymake for darwin-arm64",
"5509369518": "ymake for darwin-arm64",
"5550838146": "ymake for darwin-arm64",
"5476896849": "ymake for linux",
"5509364024": "ymake for linux",
"5550826871": "ymake for linux",
"5476895322": "ymake for linux-aarch64",
"5509360013": "ymake for linux-aarch64",
"5550843115": "ymake for linux-aarch64",
"5476896707": "ymake.exe for win32-clang-cl",
"5509388614": "ymake.exe for win32-clang-cl",
"5550838970": "ymake.exe for win32-clang-cl",
"2980468199": "ytexec for linux"
},
"resources_info": {},
"tasks": {}
}
}
8 changes: 4 additions & 4 deletions build/platform/clang/clang16.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"by_platform": {
"darwin-arm64": {
"uri": "sbr:5543659225"
"uri": "sbr:5553311553"
},
"darwin-x86_64": {
"uri": "sbr:4597414760"
"uri": "sbr:5554110935"
},
"linux-aarch64": {
"uri": "sbr:4598408410"
"uri": "sbr:5554115224"
},
"linux-x86_64": {
"uri": "sbr:5531183987"
"uri": "sbr:5550376885"
},
"win32-x86_64": {
"uri": "sbr:4597657641"
Expand Down
2 changes: 1 addition & 1 deletion build/platform/test_tool/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IF (TEST_TOOL3_HOST_LOCAL)
MESSAGE(WARNING Host test tool3 $TEST_TOOL3_HOST_LOCAL will be used)
ENDIF()

IF (OPENSOURCE AND USE_OPENSOURCE_TEST_TOOL)
IF (OPENSOURCE)
INCLUDE(host_os.ya.make.inc)
ELSE()
INCLUDE(host.ya.make.inc)
Expand Down
21 changes: 19 additions & 2 deletions build/plugins/cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,25 @@


def oncopy(unit, *args):
keywords = {'RESULT': 1, 'KEEP_DIR_STRUCT': 0, 'DESTINATION': 1, 'FROM': 1}
keywords = {
'RESULT': 1,
'KEEP_DIR_STRUCT': 0,
'DESTINATION': 1,
'FROM': 1,
'OUTPUT_INCLUDES': -1,
'AUTO': 0,
'WITH_CONTEXT': 0,
}

flat_args, spec_args = sort_by_keywords(keywords, args)

dest_dir = spec_args['DESTINATION'][0] if 'DESTINATION' in spec_args else ''
from_dir = spec_args['FROM'][0] if 'FROM' in spec_args else ''
output_includes = spec_args['OUTPUT_INCLUDES'] if 'OUTPUT_INCLUDES' in spec_args else None
keep_struct = 'KEEP_DIR_STRUCT' in spec_args
save_in_var = 'RESULT' in spec_args
auto = 'AUTO' in spec_args
with_context = 'WITH_CONTEXT' in spec_args
targets = []

for source in flat_args:
Expand All @@ -25,6 +36,12 @@ def oncopy(unit, *args):
target_path = os.path.join(dest_dir, rel_path, filename)
if save_in_var:
targets.append(target_path)
unit.oncopy_file([source_path, target_path])
unit.oncopy_file(
[source_path, target_path]
+ (['OUTPUT_INCLUDES'] + output_includes if output_includes else [])
+ (['OUTPUT_INCLUDES', source_path] if with_context else [])
+ (['AUTO'] if auto else [])
)

if save_in_var:
unit.set([spec_args["RESULT"][0], " ".join(targets)])
22 changes: 0 additions & 22 deletions build/scripts/clang_tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,32 +113,10 @@ def find_header(p, h):
raise Exception('can not find inc dir')


def fix_cmd(cmd, bin):
sp = '--sysroot='

for x in cmd:
if '-isystem' in x and '/share/include' in x:
# reparent compiler headers dir into clang-tidy install path
yield '-isystem' + find_header(os.path.dirname(os.path.dirname(bin)), 'stddef.h')
elif x.startswith(sp):
yield '-nostdinc'
sr = x[len(sp) :]
yield '-isystem' + sr + '/usr/include'
yield '-isystem' + sr + '/usr/include/x86_64-linux-gnu'
elif x == '-nostdinc++':
if '.c.o' in str(cmd):
pass
else:
yield x
else:
yield x


def main():
args, clang_cmd = parse_args()
if '/wrapcc.py' in str(clang_cmd):
clang_cmd = list(filter_cmd(clang_cmd))
clang_cmd = list(fix_cmd(clang_cmd, args.clang_tidy_bin))
setup_script(args)
clang_tidy_bin = args.clang_tidy_bin
output_json = args.tidy_json
Expand Down
6 changes: 0 additions & 6 deletions build/scripts/clang_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@


def fix(s):
if s.startswith('-isystem') and s.endswith('/share/include'):
return None

if s.startswith('-imsvc') and s.endswith('/share/include'):
return None

if s == '/Z7' or s == '/Od' or s == '/Ob0' or s == '/D_DEBUG':
return None

Expand Down
2 changes: 1 addition & 1 deletion build/sysincl/stl-to-libcxx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
- __bsd_locale_defaults.h: contrib/libs/cxxsupp/libcxx/include/__bsd_locale_defaults.h
- __bsd_locale_fallbacks.h: contrib/libs/cxxsupp/libcxx/include/__bsd_locale_fallbacks.h
- __config: contrib/libs/cxxsupp/libcxx/include/__config
- __config_site: contrib/libs/cxxsupp/libcxx/include/__config_site
- __config_site.in: contrib/libs/cxxsupp/libcxx/include/__config_site.in
- __debug: contrib/libs/cxxsupp/libcxx/include/__debug
- __errc: contrib/libs/cxxsupp/libcxx/include/__errc
Expand All @@ -186,7 +187,6 @@
- __tree: contrib/libs/cxxsupp/libcxx/include/__tree
- __tuple: contrib/libs/cxxsupp/libcxx/include/__tuple
- __undef_macros: contrib/libs/cxxsupp/libcxx/include/__undef_macros
- __wrappers_config: contrib/libs/cxxsupp/libcxx/include/__wrappers_config
- __algorithm/adjacent_find.h: contrib/libs/cxxsupp/libcxx/include/__algorithm/adjacent_find.h
- __algorithm/all_of.h: contrib/libs/cxxsupp/libcxx/include/__algorithm/all_of.h
- __algorithm/any_of.h: contrib/libs/cxxsupp/libcxx/include/__algorithm/any_of.h
Expand Down
13 changes: 11 additions & 2 deletions build/ymake.core.conf
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,17 @@ macro _CLANG_SA_UNWRAP_PLUGINS(Plugins{input}[]) {
}

CLANG_SA_PLUGINS=
when ($CLANG_SA_ENABLE == "yes" && $_CLANG_SA_CONFIG) {
CLANG_STATIC_ANALYZER_OPTIONS=$YMAKE_PYTHON3 ${input:"build/scripts/clang_static_analyzer.py"} "--testing-src" ${input:SRC} "--clang-bin" $CXX_COMPILER "--source-root" $(SOURCE_ROOT) "--config-file" ${input:_CLANG_SA_CONFIG} "--plugins-begin" "dummy_param" $_CLANG_SA_UNWRAP_PLUGINS($CLANG_SA_PLUGINS) "--plugins-end" $C_FLAGS_PLATFORM $GCC_COMPILE_FLAGS $CXXFLAGS $SRCFLAGS
CLANG_CSA_ROOT=${CLANG_CSA16_RESOURCE_GLOBAL}
CLANG_CSA_BIN=${CLANG_CSA16_RESOURCE_GLOBAL}/bin/clang
when ($CLANG_SA_ENABLE == "yes" && $_CLANG_SA_CONFIG && $CLANG_CSA_ROOT) {
PEERDIR+=build/platform/clang/clang-static-analyzer
CLANG_STATIC_ANALYZER_OPTIONS=$YMAKE_PYTHON3 ${input:"build/scripts/clang_static_analyzer.py"} \
"--testing-src" ${input:SRC} \
"--clang-bin" $CLANG_CSA_BIN \
"--source-root" $(SOURCE_ROOT) \
"--config-file" ${input:_CLANG_SA_CONFIG} \
"--plugins-begin" "dummy_param" $_CLANG_SA_UNWRAP_PLUGINS($CLANG_SA_PLUGINS) "--plugins-end" \
$GCC_COMPILE_FLAGS $CXXFLAGS $SRCFLAGS
}
otherwise {
CLANG_STATIC_ANALYZER_OPTIONS=
Expand Down
6 changes: 0 additions & 6 deletions build/ymake_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1166,9 +1166,6 @@ def get_os_sdk(target):
])

if self.tc.is_clang:
if not self.tc.is_system_cxx:
if 'CLANG' in self.tc.name_marker:
self.c_flags_platform.append('-isystem{}/share/include'.format(self.tc.name_marker))
target_triple = self.tc.triplet_opt.get(target.arch, None)
if not target_triple:
target_triple = select(default=None, selectors=[
Expand Down Expand Up @@ -1987,9 +1984,6 @@ def print_compiler(self):
cxx_warnings = []

if self.tc.use_clang:
if self.tc.from_arcadia:
flags += ['-imsvc{}/share/include'.format(self.tc.name_marker)]

flags += [
# Allow <windows.h> to be included via <Windows.h> in case-sensitive file-systems.
'-fcase-insensitive-paths',
Expand Down
1 change: 0 additions & 1 deletion contrib/.gitignore

This file was deleted.

11 changes: 0 additions & 11 deletions contrib/libs/cxxsupp/libcxx/include/__compare/ordering.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@
# pragma GCC system_header
#endif

#if defined(_MSC_VER) && !defined(__clang__)
// Omit inline namespace __y1, as MSVC2019 fails to find ordering classes
// inside the inlined namespace when compiling the <=> operators.
// See CROWDFUNDING-6 for the details.
namespace std {
#else
_LIBCPP_BEGIN_NAMESPACE_STD
#endif

#if _LIBCPP_STD_VER > 17

Expand Down Expand Up @@ -321,10 +314,6 @@ inline constexpr strong_ordering strong_ordering::greater(_OrdResult::__greater)

#endif // _LIBCPP_STD_VER > 17

#if defined(_MSC_VER) && !defined(__clang__)
}
#else
_LIBCPP_END_NAMESPACE_STD
#endif

#endif // _LIBCPP___COMPARE_ORDERING_H
3 changes: 2 additions & 1 deletion contrib/libs/cxxsupp/libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

#ifndef _LIBCPP___CONFIG
#define _LIBCPP___CONFIG
#include <__wrappers_config>

#include <__config_site>

#if defined(_MSC_VER) && !defined(__clang__)
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ extern "C" {
// build, which will always be at least as new as the ToT NDK, in which case we
// don't need any of the inlines below since libc provides them.
#if __has_include(<android/ndk-version.h>)
#if defined(__has_include) && __has_include(<android/ndk-version.h>)
# include <android/ndk-version.h>
#endif
#include <android/ndk-version.h>
// In NDK versions later than 16, locale-aware functions are provided by
// legacy_stdlib_inlines.h
#if __NDK_MAJOR__ <= 16
Expand Down
Loading
Loading