Skip to content

Commit

Permalink
Merge pull request #262659 from reckenrode/crystal-fix
Browse files Browse the repository at this point in the history
crystal: fix build with newer versions of clang
  • Loading branch information
toonn authored Nov 5, 2023
2 parents e437fe2 + 2ce46f4 commit 754ada3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/development/compilers/crystal/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ let
# See https://github.com/NixOS/nixpkgs/pull/195606#issuecomment-1356491277
substituteInPlace spec/compiler/loader/unix_spec.cr \
--replace 'it "parses file paths"' 'pending "parses file paths"'
'' + lib.optionalString (stdenv.cc.isClang && (stdenv.cc.libcxx != null)) ''
# Darwin links against libc++ not libstdc++. Newer versions of clang (12+) require
# libc++abi to be linked explicitly (see https://github.com/NixOS/nixpkgs/issues/166205).
substituteInPlace src/llvm/lib_llvm.cr \
--replace '@[Link("stdc++")]' '@[Link("c++", "-l${stdenv.cc.libcxx.cxxabi.libName}")]'
'';

# Defaults are 4
Expand Down

0 comments on commit 754ada3

Please sign in to comment.