Merge pull request #218905 from GZGavinZhao/ldc

ldc: 1.30.0 -> 1.31.0, bump bootstrap ldc to 1.30.0, bump LLVM to 14
This commit is contained in:
Sandro 2023-05-10 19:24:11 +02:00 committed by GitHub
commit 1715b160f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 15 deletions

View file

@ -1,11 +1,11 @@
{ callPackage }:
callPackage ./binary.nix {
version = "1.25.0";
version = "1.30.0";
hashes = {
# Get these from `nix-prefetch-url https://github.com/ldc-developers/ldc/releases/download/v1.19.0/ldc2-1.19.0-osx-x86_64.tar.xz` etc..
osx-x86_64 = "sha256-6iKnbS+oalLKmyS8qYD/wS21b7+O+VgsWG2iT4PrWPU=";
linux-x86_64 = "sha256-sfg47RdlsIpryc3iZvE17OtLweh3Zw6DeuNJYgpuH+o=";
linux-aarch64 = "sha256-UDZ43x4flSo+SfsPeE8juZO2Wtk2ZzwySk0ADHnvJBI=";
osx-arm64 = "sha256-O/x0vy0wwQFaDc4uWSeMhx+chJKqbQb6e5QNYf+7DCw=";
# Get these from `nix store prefetch-file https://github.com/ldc-developers/ldc/releases/download/v1.19.0/ldc2-1.19.0-osx-x86_64.tar.xz` etc..
osx-x86_64 = "sha256-AAWZvxuZC82xvrW6fpYm783TY+H8k3DvqE94ZF1yjmk=";
linux-x86_64 = "sha256-V4TUzEfQhFrwiX07dHOgjdAoGkzausCkhnQIQNAU/eE=";
linux-aarch64 = "sha256-kTeglub75iv/jWWNPCn15aCGAbmck0RQl6L7bFOUu7Y=";
osx-arm64 = "sha256-Nb/owBdIeroB9jLMDvwjo8bvsTC9vFyJPLMTOMsSAd4=";
};
}

View file

@ -1,4 +1,4 @@
import ./generic.nix {
version = "1.30.0";
sha256 = "sha256-/bs3bwgkLZF5IqaiKnc5gCF/r6MQBG/F1kWUkK8j2s0=";
version = "1.31.0";
sha256 = "sha256-8cjs6eHjWAbDRBvyT75mbN3Y7vN1WSwZzY/uRwHNVFg=";
}

View file

@ -1,5 +1,5 @@
{ version, sha256 }:
{ lib, stdenv, fetchurl, cmake, ninja, llvm_11, curl, tzdata
{ lib, stdenv, fetchurl, cmake, ninja, llvm_14, curl, tzdata
, libconfig, lit, gdb, unzip, darwin, bash
, callPackage, makeWrapper, runCommand, targetPackages
, ldcBootstrap ? callPackage ./bootstrap.nix { }
@ -30,12 +30,12 @@ stdenv.mkDerivation rec {
patchShebangs .
''
+ ''
rm ldc-${version}-src/tests/d2/dmd-testsuite/fail_compilation/mixin_gc.d
rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/xtest46_gc.d
rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/testptrref_gc.d
rm ldc-${version}-src/tests/dmd/fail_compilation/mixin_gc.d
rm ldc-${version}-src/tests/dmd/runnable/xtest46_gc.d
rm ldc-${version}-src/tests/dmd/runnable/testptrref_gc.d
# test depends on current year
rm ldc-${version}-src/tests/d2/dmd-testsuite/compilable/ddocYear.d
rm ldc-${version}-src/tests/dmd/compilable/ddocYear.d
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
# https://github.com/NixOS/nixpkgs/issues/34817
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
postPatch = ''
# Setting SHELL=$SHELL when dmd testsuite is run doesn't work on Linux somehow
substituteInPlace tests/d2/dmd-testsuite/Makefile --replace "SHELL=/bin/bash" "SHELL=${bash}/bin/bash"
substituteInPlace tests/dmd/Makefile --replace "SHELL=/bin/bash" "SHELL=${bash}/bin/bash"
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace runtime/phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" ""
@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [
cmake ldcBootstrap lit lit.python llvm_11.dev makeWrapper ninja unzip
cmake ldcBootstrap lit lit.python llvm_14.dev makeWrapper ninja unzip
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Foundation