diff options
author | spreis <spreis@yandex-team.com> | 2024-08-08 09:37:44 +0300 |
---|---|---|
committer | spreis <spreis@yandex-team.com> | 2024-08-08 09:48:19 +0300 |
commit | d832a7c17b2662d436d9c68825ab8c656eef8742 (patch) | |
tree | fe7f531ef1015d518baf54a230b04dc8549e635c /build | |
parent | ee2193bf1c142170f0fcd38de910ffc3675e0450 (diff) | |
download | ydb-d832a7c17b2662d436d9c68825ab8c656eef8742.tar.gz |
Move no-pie to conf
0863674d44d570c182d324e821946e3f4d898d94
Diffstat (limited to 'build')
-rw-r--r-- | build/conf/linkers/ld.conf | 8 | ||||
-rw-r--r-- | build/scripts/link_exe.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/build/conf/linkers/ld.conf b/build/conf/linkers/ld.conf index 0f4e387619..326d165f6d 100644 --- a/build/conf/linkers/ld.conf +++ b/build/conf/linkers/ld.conf @@ -68,6 +68,13 @@ LD_ICF_FLAG+=$_LD_ICF_FLAG LD_ICF_FLAG+=$_LD_ICF_FLAG_PRINT_SECTIONS ICF_FLAG= +_LD_NO_PIE_FLAG= +when ($_LINKER_ID == "lld" && $PIE != "yes" && ($PIC != "yes" || $PIC_NO_PIE == "yes")) { + when ($OS_LINUX == "yes") { + _LD_NO_PIE_FLAG=-Wl,-no-pie + } +} + STRIP_FLAG= C_LIBRARY_PATH= @@ -159,6 +166,7 @@ _EXE_FLAGS=\ $STRIP_FLAG \ $DCE_FLAG \ $ICF_FLAG \ + $_LD_NO_PIE_FLAG \ $_LINKER_TIME_TRACE_FLAG _SONAME_FLAG=-Wl,$_SONAME_OPTION,$_SONAME diff --git a/build/scripts/link_exe.py b/build/scripts/link_exe.py index 2b69486183..6ea2f91c3d 100644 --- a/build/scripts/link_exe.py +++ b/build/scripts/link_exe.py @@ -332,14 +332,6 @@ if __name__ == '__main__': cmd = fix_sanitize_flag(cmd, opts) - if 'ld.lld' in str(cmd): - 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) else: |