diff options
author | sterni <sternenseemann@systemli.org> | 2021-10-07T19·57+0200 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2021-10-10T10·03+0000 |
commit | 04f7cc3880912abb738d3d3bc20e7622a211f25e (patch) | |
tree | f140a021234bcfdfa2a64e2892fb5eb069595b43 /third_party/nix/default.nix | |
parent | ac17de3cbd2c5bcb1d12992c2fe5c6a554ab4716 (diff) |
fix(3p): resolve linker issues with clang-compiled C++ packages r/2956
The point where this broke is likely when llvmPackages_11.stdenv started respecting stdenv.hostPlatform.linker and thus using GNU binutils' ld.bfd for linking. That linker can't deal with clang's C++ ABI. To fix this we introduce a modified version of llvmPackages_11.stdenv which uses llvmPackages_11.bintools for linking purposes (I also aim to upstream this in some form, but am not sure about the details atm, so we'll just do this in the tvl overlay for now). This is the precondition for getting our C++ packages in //third_party to work again. Additionally the following fixes were necessary: * abseil-cpp needed to be updated (by overriding the version from nixpkgs for now, since I can't update the subtree on my own) to fulfill grpc's requirements (grpc 1.41.0 needs abseil-cpp LTS 20210324). * gtest needs a patch from nixpkgs which fixes the path to its include directory for CMake. * We need to build re2 with clang as well, otherwise linking will fail. Fixes b/132. Change-Id: I7b64579fe96451547babe070fd35db398581e49d Reviewed-on: https://cl.tvl.fyi/c/depot/+/3701 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'third_party/nix/default.nix')
-rw-r--r-- | third_party/nix/default.nix | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/third_party/nix/default.nix b/third_party/nix/default.nix index 909bff9be5a9..3fc89fc7ebdc 100644 --- a/third_party/nix/default.nix +++ b/third_party/nix/default.nix @@ -57,7 +57,7 @@ let cp ${pkgs.busybox}/bin/busybox $out/bin ''; -in lib.fix (self: pkgs.llvmPackages_11.libcxxStdenv.mkDerivation { +in lib.fix (self: pkgs.fullLlvm11Stdenv.mkDerivation { pname = "tvix"; version = "2.3.4"; inherit src; @@ -187,9 +187,6 @@ in lib.fix (self: pkgs.llvmPackages_11.libcxxStdenv.mkDerivation { # TODO(tazjin): integration test setup? # TODO(tazjin): docs generation? - # TODO(b/132): Reenable when linker errors are fixed. - meta.ci = false; - passthru = { build-shell = self.overrideAttrs (up: rec { run_clang_tidy = pkgs.writeShellScriptBin "run-clang-tidy" '' |