Commit aa8fed1c authored by Anthony Roussel's avatar Anthony Roussel Committed by github-actions[bot]
Browse files

usql: fix build with clang 12+

See #166205

(cherry picked from commit 811294e5)
parent 56359ec4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, buildGoModule
, unixODBC
@@ -49,6 +50,11 @@ buildGoModule rec {
    "no_adodb"
  ];

  # Work around https://github.com/NixOS/nixpkgs/issues/166205.
  env = lib.optionalAttrs stdenv.cc.isClang {
    NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
  };

  ldflags = [
    "-s"
    "-w"