diff options
author | Mukilan Thiyagarajan <mukilan@igalia.com> | 2023-08-18 11:48:05 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-18 06:18:05 +0000 |
commit | 1efecf9b50b9ae057f6937acedb448e0a22eed6a (patch) | |
tree | 74238faf4fb03d8b825dd69c7e923510fa88ee07 /python/servo/platform/base.py | |
parent | 218ad8f574317846b591784c4c60af07aa72730d (diff) | |
download | servo-1efecf9b50b9ae057f6937acedb448e0a22eed6a.tar.gz servo-1efecf9b50b9ae057f6937acedb448e0a22eed6a.zip |
Use system lld on NixOS instead of rust-lld (#30123)
The -Zgcc-ld=lld flag makes rust use the rust-lld
linker that is distributed as part of rust toolchain.
However, this flag doesn't work on nixos correctly
as
1) rust-lld needs to be patched to have the correct rpath
to find libz.so
2) the bin/gcc-ld/ld.lld wrapper which calls rust-lld also
needs to be patched to use the correct dynamic loader
3) rust-lld doesn't respect NIX_LDFLAGS which contains
the additional search path derived from buildInputs.
The system linkers on nixos are wrapped so that
NIX_LDFLAGS is added as the rpath to the final binary.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Diffstat (limited to 'python/servo/platform/base.py')
-rw-r--r-- | python/servo/platform/base.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/servo/platform/base.py b/python/servo/platform/base.py index a1bce7e3bb8..7fde2b60c97 100644 --- a/python/servo/platform/base.py +++ b/python/servo/platform/base.py @@ -67,7 +67,10 @@ class Base: def library_path_variable_name(self): raise NotImplementedError("Do not know how to set library path for platform.") - def executable_suffix(self): + def linker_flag(self) -> str: + return "" + + def executable_suffix(self) -> str: return "" def _platform_bootstrap(self, _force: bool) -> bool: |