aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpg <pg@yandex-team.com>2023-08-11 23:20:15 +0300
committerpg <pg@yandex-team.com>2023-08-12 00:16:11 +0300
commit70a711d3c34d65e0070b97eb1c65f106204916df (patch)
tree07424557dd3b09a76ae89664ebaa755c30103163
parent04260fe9b66001e8c72e5b33661b12d335d65883 (diff)
downloadydb-70a711d3c34d65e0070b97eb1c65f106204916df.tar.gz
fixes for clang16
https://discourse.llvm.org/t/llvm-15-default-pie-issue/67125
-rw-r--r--build/scripts/go_tool.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/build/scripts/go_tool.py b/build/scripts/go_tool.py
index b6b0f4e994..058ff7ad0d 100644
--- a/build/scripts/go_tool.py
+++ b/build/scripts/go_tool.py
@@ -491,17 +491,20 @@ def do_link_exe(args):
if args.link_flags:
cmd += args.link_flags
+ extldflags = []
+
if args.buildmode:
cmd.append('-buildmode={}'.format(args.buildmode))
elif args.mode in ('exe', 'test'):
cmd.append('-buildmode=exe')
+ if 'ld.lld' in str(args):
+ extldflags.append('-Wl,-no-pie')
elif args.mode == 'dll':
cmd.append('-buildmode=c-shared')
else:
assert False, 'Unexpected mode: {}'.format(args.mode)
cmd.append('-extld={}'.format(args.extld))
- extldflags = []
if args.extldflags is not None:
filter_musl = bool
if args.musl: