Browse Source

Merge branch 'rightlib' into merge-libs-250122-0020

Alexander Smirnov 1 month ago
parent
commit
47763d31b2

+ 8 - 12
build/conf/java.conf

@@ -752,10 +752,10 @@ when ($BUILD_TYPE == "DEBUG" && $NO_DEBUGINFO != "yes") {
 }
 
 _PACK_SRC_JAR_IMPL=\
-&& $FS_TOOLS md ${BINDIR}/src \
-&& $JAR_GEN_JSRCS \
-&& $LINK_JAR_JSOURCES \
-&& ${cwd;suf=/src:BINDIR} $JDK_RESOURCE/bin/jar cfvm ${output;pre=${BINDIR}/${MODULE_PREFIX};suf=-sources.jar:REALPRJNAME} $VCS_JAVA .
+    && $FS_TOOLS md ${BINDIR}/src \
+    && $JAR_GEN_JSRCS \
+    && $LINK_JAR_JSOURCES \
+    && ${cwd;suf=/src:BINDIR} $JDK_RESOURCE/bin/jar cfvm ${output;pre=${BINDIR}/${MODULE_PREFIX};suf=-sources.jar:REALPRJNAME} $VCS_JAVA .
 _PACK_SRC_JAR=
 
 # tag:java-specific
@@ -835,9 +835,9 @@ MAVEN_EXPORT_CMD=
 # tag:java-specific
 JAVA_COVERAGE_SRCLIST_FLAG=--coverage ${output;pre=${MODULE_PREFIX};suf=.cpsf:REALPRJNAME} --source-root ${ARCADIA_ROOT}
 JAVA_COVERAGE_SRCLIST=
-PREPARE_JAVA_BUILD_DIRS=$FS_TOOLS md ${BINDIR}/cls && $FS_TOOLS md ${BINDIR}/misc
-COLLECT_JAVA_SRCLIST=${YMAKE_PYTHON} ${input:"build/scripts/make_java_srclists.py"} \
-    --moddir ${CURDIR} --java ${BINDIR}/all-java.srclst ${KT_SRSCLIST} ${JAVA_COVERAGE_SRCLIST} \
+PREPARE_JAR_BUILD=${cwd:BINDIR} ${YMAKE_PYTHON3} ${input:"build/scripts/prepare_jar_build.py"} \
+    --bindir ${BINDIR} --moddir ${CURDIR} \
+    --java ${BINDIR}/all-java.srclst ${KT_SRSCLIST} ${JAVA_COVERAGE_SRCLIST} \
     --ya-start-command-file ${ext=.gentar:AUTO_INPUT} ${ALL_JAR_SOURCES} ${ext=.java:AUTO_INPUT} ${ext=.kt:AUTO_INPUT} --ya-end-command-file \
     ${hide;input:"build/scripts/process_command_files.py"} \
     ${hide;input:"build/scripts/java_pack_to_file.py"} \
@@ -847,8 +847,7 @@ LINK_CLASSPATH=${YMAKE_PYTHON} ${input:"build/scripts/make_manifest_from_bf.py"}
 COMPILE_JAVA_SRCLIST=$_JAVAC_RUN_HELPER($JAVAC_CMD)
 PACK_JAR=$_PACK_JAR_HELPER($TARGET)
 LINK_JAR=${hide:JAVA_FAKEID} ${hide;kv:"p JV"} ${hide;kv:"pc light-blue"} ${hide;kv:"show_out"} ${hide;requirements:"cpu:2"} \
-      && $PREPARE_JAVA_BUILD_DIRS \
-      && $COLLECT_JAVA_SRCLIST \
+      && $PREPARE_JAR_BUILD \
       && $JAR_GEN_SRCS \
       && $ALL_KT_COMMANDS \
       && $COLLECT_CLASSPATH \
@@ -1324,9 +1323,6 @@ module _JAR_TEST: _COMPILABLE_JAR_BASE {
     SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
 }
 
-# tag:java-specific
-JAVA_SWIG_DELIM=JAVA_SWIG_DELIM
-
 # tag:java-specific
 JDK_REAL_VERSION=
 JDK_VERSION=

+ 0 - 6
build/conf/linkers/ld.conf

@@ -334,12 +334,6 @@ LINK_EXEC_DYN_LIB=\
     $DWARF_COMMAND && \
     $LINK_ADDITIONAL_SECTIONS_COMMAND
 
-SWIG_DLL_JAR_CMD=\
-    $GENERATE_MF && \
-    $GENERATE_VCS_C_INFO_NODEP && \
-    $REAL_SWIG_DLL_JAR_CMD && \
-    $DWARF_COMMAND
-
 _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

+ 0 - 2
build/conf/linkers/msvc_linker.conf

@@ -174,8 +174,6 @@ REAL_LINK_DYN_LIB_CMDLINE=\
 
 REAL_LINK_DYN_LIB=$REAL_LINK_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)
 
-SWIG_DLL_JAR_CMD=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_SWIG_DLL_JAR_CMD
-
 _MSVC_HEAD_LINK_LIB=${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LIB_WRAPPER} ${LINK_LIB_CMD}
 _MSVC_TAIL_LINK_LIB=\
     --ya-start-command-file \

+ 0 - 2
build/conf/swig.conf

@@ -17,8 +17,6 @@ _SWIG_JNI_JAVA_CMD=$YMAKE_PYTHON3 ${input:"build/scripts/jni_swig.py"} --swig ${
 _SWIG_JNI_CMD=$YMAKE_PYTHON3 ${input:"build/scripts/jni_swig.py"} --swig ${_SWIG_TOOL} --default-module ${nopath;noext:SRC} --src ${input:SRC} --out-header ${output;main;noext;suf=_wrap.swg.h:SRC} --package-by-file ru/yandex/${input;rootrel:SRC} --jsrc ${output;suf=.jsrc:SRC} -- ${pre=-I:_SWIG__INCLUDE} -o ${output;noext;suf=_wrap.swg.cpp:SRC} ${hide;kv:"p SW"} ${hide;kv:"pc yellow"}
 _SWIG_JNI_PEERDIR=contrib/libs/jdk
 
-REAL_SWIG_DLL_JAR_CMD=$GENERATE_VCS_JAVA_INFO_NODEP && ${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/build_dll_and_java.py"} $JAVA_SWIG_DELIM $REAL_LINK_DYN_LIB $JAVA_SWIG_DELIM $COMPILE_JAVA $JAVA_SWIG_DELIM $AUTO_INPUT $JAVA_SWIG_DELIM $TARGET $JAVA_SWIG_DELIM ${output;suf=.jar:REALPRJNAME} $JAVA_SWIG_DELIM ${output;suf=-sources.jar:REALPRJNAME} $JAVA_SWIG_DELIM $ARCADIA_BUILD_ROOT $ARCADIA_ROOT
-
 when ($USE_SYSTEM_JDK == "yes" || $OS_ANDROID == "yes") {
     _SWIG_JNI_PEERDIR=
 }

+ 1 - 0
build/config/tests/cpp_style/config.clang-format

@@ -91,6 +91,7 @@ NamespaceMacros: [Y_UNIT_TEST_SUITE]
 AttributeMacros: [Y_PRINTF_FORMAT, Y_NO_SANITIZE, Y_FORCE_INLINE, Y_NO_INLINE, Y_WARN_UNUSED_RESULT, Y_HIDDEN, Y_PUBLIC, Y_PURE_FUNCTION]
 IndentExternBlock: Indent
 TypenameMacros: [Y_THREAD, Y_STATIC_THREAD, Y_POD_THREAD, Y_POD_STATIC_THREAD]
+StatementAttributeLikeMacros: [ythrow]
 SpacesInLineCommentPrefix:
  Minimum: 1
  Maximum: 1

+ 10 - 0
build/mapping.conf.json

@@ -959,6 +959,7 @@
         "7552080809": "https://devtools-registry.s3.yandex.net/7552080809",
         "7830390213": "https://devtools-registry.s3.yandex.net/7830390213",
         "7833244075": "https://devtools-registry.s3.yandex.net/7833244075",
+        "7832768362": "https://devtools-registry.s3.yandex.net/7832768362",
         "5776379446": "https://devtools-registry.s3.yandex.net/5776379446",
         "5777100597": "https://devtools-registry.s3.yandex.net/5777100597",
         "5909067709": "https://devtools-registry.s3.yandex.net/5909067709",
@@ -973,6 +974,7 @@
         "7552077729": "https://devtools-registry.s3.yandex.net/7552077729",
         "7830388201": "https://devtools-registry.s3.yandex.net/7830388201",
         "7833241952": "https://devtools-registry.s3.yandex.net/7833241952",
+        "7832766692": "https://devtools-registry.s3.yandex.net/7832766692",
         "5776375952": "https://devtools-registry.s3.yandex.net/5776375952",
         "5777098178": "https://devtools-registry.s3.yandex.net/5777098178",
         "5909065014": "https://devtools-registry.s3.yandex.net/5909065014",
@@ -987,6 +989,7 @@
         "7552072726": "https://devtools-registry.s3.yandex.net/7552072726",
         "7830384362": "https://devtools-registry.s3.yandex.net/7830384362",
         "7833238161": "https://devtools-registry.s3.yandex.net/7833238161",
+        "7832762570": "https://devtools-registry.s3.yandex.net/7832762570",
         "5776374505": "https://devtools-registry.s3.yandex.net/5776374505",
         "5777096988": "https://devtools-registry.s3.yandex.net/5777096988",
         "5909063641": "https://devtools-registry.s3.yandex.net/5909063641",
@@ -1001,6 +1004,7 @@
         "7552070388": "https://devtools-registry.s3.yandex.net/7552070388",
         "7830382341": "https://devtools-registry.s3.yandex.net/7830382341",
         "7833236145": "https://devtools-registry.s3.yandex.net/7833236145",
+        "7832760150": "https://devtools-registry.s3.yandex.net/7832760150",
         "5776377955": "https://devtools-registry.s3.yandex.net/5776377955",
         "5777099502": "https://devtools-registry.s3.yandex.net/5777099502",
         "5909066324": "https://devtools-registry.s3.yandex.net/5909066324",
@@ -1015,6 +1019,7 @@
         "7552075245": "https://devtools-registry.s3.yandex.net/7552075245",
         "7830386085": "https://devtools-registry.s3.yandex.net/7830386085",
         "7833240023": "https://devtools-registry.s3.yandex.net/7833240023",
+        "7832764927": "https://devtools-registry.s3.yandex.net/7832764927",
         "6391354461": "https://devtools-registry.s3.yandex.net/6391354461",
         "7805449010": "https://devtools-registry.s3.yandex.net/7805449010",
         "6990868751": "https://devtools-registry.s3.yandex.net/6990868751",
@@ -2148,6 +2153,7 @@
         "7552080809": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
         "7830390213": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
         "7833244075": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
+        "7832768362": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
         "5776379446": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
         "5777100597": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
         "5909067709": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
@@ -2162,6 +2168,7 @@
         "7552077729": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
         "7830388201": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
         "7833241952": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
+        "7832766692": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
         "5776375952": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
         "5777098178": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
         "5909065014": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
@@ -2176,6 +2183,7 @@
         "7552072726": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
         "7830384362": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
         "7833238161": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
+        "7832762570": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
         "5776374505": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
         "5777096988": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
         "5909063641": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
@@ -2190,6 +2198,7 @@
         "7552070388": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
         "7830382341": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
         "7833236145": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
+        "7832760150": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
         "5776377955": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
         "5777099502": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
         "5909066324": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
@@ -2204,6 +2213,7 @@
         "7552075245": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
         "7830386085": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
         "7833240023": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
+        "7832764927": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
         "6391354461": "none-none-none-result_resources/protoc-linux-x86_64.tgz",
         "7805449010": "none-none-none-result_resources/protoc-linux-x86_64.tgz",
         "6990868751": "none-none-none-sandbox/backup/3527d100-e2d0-4b0e-bb7a-905010853d98/yfm-docs.tar",

+ 5 - 5
build/platform/java/jdk/jdk17/jdk.json

@@ -1,19 +1,19 @@
 {
   "by_platform": {
     "darwin-arm64": {
-      "uri": "sbr:6941864137"
+      "uri": "sbr:7832768362"
     },
     "darwin-x86_64": {
-      "uri": "sbr:6941861330"
+      "uri": "sbr:7832766692"
     },
     "linux-x86_64": {
-      "uri": "sbr:6941855347"
+      "uri": "sbr:7832760150"
     },
     "linux-aarch64": {
-      "uri": "sbr:6941857195"
+      "uri": "sbr:7832762570"
     },
     "win32-x86_64": {
-      "uri": "sbr:6941859166"
+      "uri": "sbr:7832764927"
     }
   }
 }

+ 0 - 47
build/scripts/build_dll_and_java.py

@@ -1,47 +0,0 @@
-import os
-import subprocess
-import sys
-
-
-def just_do_it(argv):
-    delim = argv[0]
-    args = []
-    for item in argv:
-        if item == delim:
-            args.append([])
-        else:
-            args[-1].append(item)
-    dll_cmd, java_cmd, inputs, dll_out, java_out, jsrs_out, roots = args
-    dll_out, java_out, jsrs_out, build_root, source_root = dll_out[0], java_out[0], jsrs_out[0], roots[0], roots[1]
-    for inp in inputs:
-        origin_inp = inp
-        if os.path.isabs(inp):
-            if os.path.relpath(inp, build_root).startswith('..'):
-                inp = os.path.relpath(inp, source_root)
-            else:
-                inp = os.path.relpath(inp, build_root)
-        ext = os.path.splitext(inp)[1]
-        if ext in ('.o', '.obj'):
-            if os.path.join(build_root, inp) in java_cmd:
-                inp = os.path.join(build_root, inp)
-            if sys.platform == 'win32':
-                inp = inp.replace('\\', '/')
-                if inp not in java_cmd:
-                    inp = build_root + '/' + inp
-            java_cmd.remove(inp)
-        if ext in ('.java', '.jsrc'):
-            if origin_inp in dll_cmd:
-                inp = origin_inp
-            elif os.path.join(build_root, inp) in dll_cmd:
-                inp = os.path.join(build_root, inp)
-            if sys.platform == 'win32':
-                inp = inp.replace('\\', '/')
-            dll_cmd.remove(inp)
-    java_cmd.insert(java_cmd.index(dll_out), java_out)
-    java_cmd.remove(dll_out)
-    subprocess.check_call(java_cmd)
-    subprocess.check_call(dll_cmd)
-
-
-if __name__ == '__main__':
-    just_do_it(sys.argv[1:])

+ 9 - 0
build/scripts/make_java_srclists.py → build/scripts/prepare_jar_build.py

@@ -112,16 +112,25 @@ class SourcesConsumer:
             self.coverage.append(rel)
 
 
+def prepare_build_dirs(bindir):
+    for dir in [os.path.join(bindir, dirname) for dirname in ['cls', 'misc']]:
+        if not os.path.exists(dir):
+            os.makedirs(dir)
+
+
 def main():
     args = pcf.get_args(sys.argv[1:])
     parser = argparse.ArgumentParser()
     parser.add_argument('--moddir')
+    parser.add_argument('--bindir')
     parser.add_argument('--java')
     parser.add_argument('--kotlin')
     parser.add_argument('--coverage')
     parser.add_argument('--source-root')
     args, remaining_args = parser.parse_known_args(args)
 
+    prepare_build_dirs(args.bindir)
+
     src_sorter = SourcesSorter(args.moddir)
     src_consumer = SourcesConsumer(
         source_root=args.source_root,

+ 1 - 2
build/scripts/ya.make

@@ -41,7 +41,6 @@ ELSEIF (PY3)
     TEST_SRCS(
         append_file.py
         autotar_gendirs.py
-        build_dll_and_java.py
         build_info_gen.py
         build_java_codenav_index.py
         build_java_with_error_prone2.py
@@ -100,7 +99,7 @@ ELSEIF (PY3)
         make_container.py
         make_container_layer.py
         make_java_classpath_file.py
-        make_java_srclists.py
+        prepare_jar_build.py
         make_manifest_from_bf.py
         merge_coverage_data.py
         merge_files.py

Some files were not shown because too many files changed in this diff