aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins
diff options
context:
space:
mode:
authorhiddenpath <hiddenpath@yandex-team.com>2024-04-02 23:50:23 +0300
committerhiddenpath <hiddenpath@yandex-team.com>2024-04-03 00:02:31 +0300
commit8923c6d2c438e0aeed2e06b8b0275e1864eeee33 (patch)
tree6b5e476699fc0be5091cb650654ef5f602c8afff /build/plugins
parentd18afd09df2a08cd023012593b46109b77713a6c (diff)
downloadydb-8923c6d2c438e0aeed2e06b8b0275e1864eeee33.tar.gz
Update golang to 1.22.1
2967d19c907adf59101a1f47b4208bd0b04a6186
Diffstat (limited to 'build/plugins')
-rw-r--r--build/plugins/gobuild.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/build/plugins/gobuild.py b/build/plugins/gobuild.py
index d0f205ca39..af073ff6ab 100644
--- a/build/plugins/gobuild.py
+++ b/build/plugins/gobuild.py
@@ -30,6 +30,10 @@ def get_import_path(unit):
module_path = rootrel_arc_src(unit.path(), unit)
assert len(module_path) > 0
+
+ if go_package_name(unit) == "main":
+ return "main"
+
import_path = module_path.replace('\\', '/')
if import_path.startswith(std_lib_prefix):
import_path = import_path[len(std_lib_prefix) :]
@@ -38,6 +42,10 @@ def get_import_path(unit):
else:
import_path = arc_project_prefix + import_path
assert len(import_path) > 0
+
+ if import_path.endswith("/gotest"):
+ return import_path[:-7]
+
return import_path
@@ -63,15 +71,6 @@ def compare_versions(version1, version2):
return 1 if v1 < v2 else -1
-def need_compiling_runtime(import_path, gostd_version):
- return (
- import_path in ('runtime', 'reflect', 'syscall')
- or import_path.startswith('runtime/internal/')
- or compare_versions('1.17', gostd_version) >= 0
- and import_path == 'internal/bytealg'
- )
-
-
def go_package_name(unit):
name = unit.get('GO_PACKAGE_VALUE')
if not name:
@@ -236,8 +235,6 @@ def on_go_process_srcs(unit):
if compare_versions('1.16', gostd_version) >= 0:
import_path = get_import_path(unit)
symabis_flags.extend(['FLAGS', '-p', import_path])
- if need_compiling_runtime(import_path, gostd_version):
- symabis_flags.append('-compiling-runtime')
unit.on_go_compile_symabis(asm_files + symabis_flags)
# Process cgo files