Unverified Commit 21af6ad5 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

Merge pull request #269778 from NixOS/backport-269290-to-release-23.11

[Backport release-23.11] usql: fix build with clang 12+
parents 64c7a58b aa8fed1c
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"