aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortekireeva <tekireeva@yandex-team.ru>2022-06-28 15:34:27 +0300
committertekireeva <tekireeva@yandex-team.ru>2022-06-28 15:34:27 +0300
commit1bb893fa7e33b87bac9c8c82527543d1bf6e33c0 (patch)
tree5503f3dc29a55476b87c26d16666aad88a95900d
parent761cee71a642382c07f2540d9dec173db52ea398 (diff)
downloadydb-1bb893fa7e33b87bac9c8c82527543d1bf6e33c0.tar.gz
Create GOLANG_VERSION macro
ref:73e5ea23d07c29ad9d91bd0fbc28278bfb29b4d5
-rw-r--r--build/scripts/go_tool.py3
-rw-r--r--build/ymake.core.conf8
2 files changed, 10 insertions, 1 deletions
diff --git a/build/scripts/go_tool.py b/build/scripts/go_tool.py
index 025c2ecfbc..7aa2d700e1 100644
--- a/build/scripts/go_tool.py
+++ b/build/scripts/go_tool.py
@@ -354,6 +354,8 @@ def _do_compile_go(args):
'-goversion',
'go{}'.format(args.goversion)
]
+ if args.lang:
+ cmd.append('-lang=go{}'.format(args.lang))
cmd.extend(get_trimpath_args(args))
compiling_runtime = False
if is_std_module:
@@ -817,6 +819,7 @@ if __name__ == '__main__':
parser.add_argument('++extld', nargs='?', default=None)
parser.add_argument('++extldflags', nargs='+', default=None)
parser.add_argument('++goversion', required=True)
+ parser.add_argument('++lang', nargs='?', default=None)
parser.add_argument('++asm-flags', nargs='*')
parser.add_argument('++compile-flags', nargs='*')
parser.add_argument('++link-flags', nargs='*')
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 95de9b5d95..9d81374be4 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -8249,6 +8249,12 @@ macro GO_LINK_FLAGS(Flags...) {
}
# tag:go-specific
+_GO_LANG_VERSION_VALUE=
+macro GOLANG_VERSION(Arg) {
+ SET(_GO_LANG_VERSION_VALUE $Arg)
+}
+
+# tag:go-specific
_GO_TOOL_MODE=
# tag:go-specific
@@ -8300,7 +8306,7 @@ GO_TOOL=$YMAKE_PYTHON ${input:"build/scripts/go_tool.py"} ${input;hide:"build/sc
# tag:go-specific
macro _GO_LINK_LIB_IMPL(CGO_FILES[], EXTRA_INPUTS[], GO_FILES...) {
- .CMD=${hide:_GO_FAKEID} $GO_TOOL ${hide;input:EXTRA_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_FBS:PEERS} --ya-end-command-file ${kv;hide:"p GO"} ${kv;hide:"pc light-red"} ${kv;hide:"show_out"}
+ .CMD=${hide:_GO_FAKEID} $GO_TOOL ${hide;input:EXTRA_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++lang $_GO_LANG_VERSION_VALUE ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_FBS:PEERS} --ya-end-command-file ${kv;hide:"p GO"} ${kv;hide:"pc light-red"} ${kv;hide:"show_out"}
}
# tag:go-specific