diff options
author | thegeorg <thegeorg@yandex-team.ru> | 2022-05-16 16:18:40 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.ru> | 2022-05-16 16:18:40 +0300 |
commit | 5e43bd290eea0c0799394c484e7c77ccd452eba8 (patch) | |
tree | df8484d8a419ee4c3a438eea0ffad9a725bd869e /build/ymake_conf.py | |
parent | ca04e360f54a3601b44d9227ad5898a14bc69b73 (diff) | |
download | ydb-5e43bd290eea0c0799394c484e7c77ccd452eba8.tar.gz |
Use lld linker on Linux unless USE_LINKER_GOLD() is explicitly specified
* Drop heuristical switching to gold when compiling with gcc and musl
* Drop `USE_LINKER_BFD()` and `USE_LINKER_LLD()` macros.
* User can still request to `USE_LINKER_GOLD()`, as it is capable to workaround _relocation out of range_ problem in certain cases.
ref:3c5181f8be6eb35067f5cfe14aad3e7d2a1748eb
Diffstat (limited to 'build/ymake_conf.py')
-rwxr-xr-x | build/ymake_conf.py | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/build/ymake_conf.py b/build/ymake_conf.py index 173eab7ad0..fd06591d8e 100755 --- a/build/ymake_conf.py +++ b/build/ymake_conf.py @@ -1779,18 +1779,7 @@ class Linker(object): return Linker.LLD elif self.build.target.is_linux: - # DEVTOOLS-6782: LLD8 fails to link LTO builds with in-memory ELF objects larger than 4 GiB - blacklist_lld = is_positive('CLANG7') and is_positive('USE_LTO') and not is_positive('MUSL') - if self.tc.is_clang and not blacklist_lld: - return Linker.LLD - else: - # GCC et al. - - if self.tc.is_gcc and is_positive('MUSL'): - # See MUSL_BFD comment below - return Linker.BFD - - return Linker.GOLD + return Linker.LLD # There is no linker choice on Darwin (ld64) or Windows (link.exe) return None @@ -1882,11 +1871,6 @@ class LD(Linker): if self.musl.value: self.ld_flags.extend(['-Wl,--no-as-needed']) - if self.tc.is_gcc: - # MUSL_BFD: musl build uses --no-dynamic-linker linker flag - # which gold doesn't know about. And we can only specify linker - # type, not it's path as we do for Clang through linker selector. - self.ld_flags.append('-fuse-ld=bfd') elif target.is_linux: self.ld_flags.extend(['-ldl', '-lrt', '-Wl,--no-as-needed']) if self.tc.is_gcc: |