mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
crystal: fix build with newer versions of clang
Crystal requires linking libc++abi when building with newer versions of clang. See https://github.com/NixOS/nixpkgs/issues/166205.
This commit is contained in:
parent
b9e9e443a9
commit
2ce46f4fc0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user