Merge pull request #262659 from reckenrode/crystal-fix

crystal: fix build with newer versions of clang

authored by

toonn and committed by
GitHub
754ada3a e437fe25

+5
+5
pkgs/development/compilers/crystal/default.nix
··· 148 148 # See https://github.com/NixOS/nixpkgs/pull/195606#issuecomment-1356491277 149 149 substituteInPlace spec/compiler/loader/unix_spec.cr \ 150 150 --replace 'it "parses file paths"' 'pending "parses file paths"' 151 + '' + lib.optionalString (stdenv.cc.isClang && (stdenv.cc.libcxx != null)) '' 152 + # Darwin links against libc++ not libstdc++. Newer versions of clang (12+) require 153 + # libc++abi to be linked explicitly (see https://github.com/NixOS/nixpkgs/issues/166205). 154 + substituteInPlace src/llvm/lib_llvm.cr \ 155 + --replace '@[Link("stdc++")]' '@[Link("c++", "-l${stdenv.cc.libcxx.cxxabi.libName}")]' 151 156 ''; 152 157 153 158 # Defaults are 4