aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts
diff options
context:
space:
mode:
authorpg <pg@yandex-team.com>2023-08-16 23:41:22 +0300
committerpg <pg@yandex-team.com>2023-08-17 01:51:57 +0300
commit6be110dc5f9adedffc26ca843f90a6b4a99897a1 (patch)
treeaee0d1744e9b18b135d3cc9542356b2b2b879e6e /build/scripts
parent979c077893fc74f97bb08744e449987949aa9b4c (diff)
downloadydb-6be110dc5f9adedffc26ca843f90a6b4a99897a1.tar.gz
support explicit pic/pie
Diffstat (limited to 'build/scripts')
-rw-r--r--build/scripts/link_exe.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/build/scripts/link_exe.py b/build/scripts/link_exe.py
index 01e9b9f41f..72d8608269 100644
--- a/build/scripts/link_exe.py
+++ b/build/scripts/link_exe.py
@@ -167,7 +167,11 @@ if __name__ == '__main__':
cmd = fix_sanitize_flag(cmd)
if 'ld.lld' in str(cmd):
- cmd.append('-Wl,-no-pie')
+ if '-fPIE' in str(cmd) or '-fPIC' in str(cmd):
+ # support explicit PIE
+ pass
+ else:
+ cmd.append('-Wl,-no-pie')
if opts.dynamic_cuda:
cmd = fix_cmd_for_dynamic_cuda(cmd)