Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crystal: fix build with newer versions of clang #262659

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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