Merge pull request #85445 from manveru/crystal-all-llvm

crystal: use llvm 10 exclusively
gstqt5
Graham Christensen 2020-05-07 07:49:03 -04:00 committed by GitHub
commit fb587d7bb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub, fetchurl, makeWrapper
, coreutils, git, gmp, nettools, openssl, readline, tzdata, libxml2, libyaml
, coreutils, git, gmp, hostname, openssl, readline, tzdata, libxml2, libyaml
, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib, pkgconfig
, callPackage }:
@ -62,9 +62,12 @@ let
substituteInPlace src/crystal/system/unix/time.cr \
--replace /usr/share/zoneinfo ${tzdata}/share/zoneinfo
ln -s spec/compiler spec/std
ln -sf spec/compiler spec/std
# Dirty fix for when no sandboxing is enabled
rm -rf /tmp/crystal
mkdir -p /tmp/crystal
mkdir /tmp/crystal
substituteInPlace spec/std/file_spec.cr \
--replace '/bin/ls' '${coreutils}/bin/ls' \
--replace '/usr/share' '/tmp/crystal' \
@ -81,7 +84,7 @@ let
--replace '{% if flag?(:gnu) %}"listen: "{% else %}"bind: "{% end %}' '"bind: "'
substituteInPlace spec/std/system_spec.cr \
--replace '`hostname`' '`${nettools}/bin/hostname`'
--replace '`hostname`' '`${hostname}/bin/hostname`'
# See https://github.com/crystal-lang/crystal/pull/8640
substituteInPlace spec/std/http/cookie_spec.cr \
@ -108,6 +111,8 @@ let
"all" "docs"
];
LLVM_CONFIG = "${llvm}/bin/llvm-config";
FLAGS = [
"--release"
"--single-module" # needed for deterministic builds

View File

@ -8120,8 +8120,7 @@ in
cryptol = haskell.lib.justStaticExecutables haskellPackages.cryptol;
inherit (callPackages ../development/compilers/crystal {
stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
inherit (llvmPackages) clang llvm;
inherit (llvmPackages_10) stdenv clang llvm;
})
crystal_0_31
crystal_0_32