various: unpin or bump LLVM (#434642)

This commit is contained in:
Emily 2025-08-18 19:05:22 +01:00 committed by GitHub
commit 72f5bfc3b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with 89 additions and 103 deletions

View File

@ -52,7 +52,7 @@ let
or (throw "scudo not supported on ${pkgs.stdenv.hostPlatform.system}");
in
{
libPath = "${pkgs.llvmPackages_14.compiler-rt}/lib/linux/libclang_rt.scudo-${systemPlatform}.so";
libPath = "${pkgs.llvmPackages.compiler-rt}/lib/linux/libclang_rt.scudo-${systemPlatform}.so";
description = ''
A user-mode allocator based on LLVM Sanitizers CombinedAllocator,
which aims at providing additional mitigations against heap based

View File

@ -32,7 +32,7 @@
libuuid,
libxkbcommon,
libxml2,
llvmPackages_13,
llvmPackages,
matio,
mpfr,
ncurses,
@ -102,7 +102,7 @@ stdenv.mkDerivation {
libuuid
libxkbcommon
libxml2
llvmPackages_13.libllvm.lib
llvmPackages.libllvm.lib
matio
mpfr
ncurses

View File

@ -11,7 +11,7 @@
gtest,
pkg-config,
lit,
llvmPackages_16,
llvmPackages,
}:
let
# Old vendored package which has no other use than here, so not packaged in nixpkgs.
@ -35,8 +35,8 @@ stdenv.mkDerivation {
cmakeFlags = [
"-DLIT_EXECUTABLE=${lit}/bin/lit"
"-DFILECHECK_EXECUTABLE=${llvmPackages_16.libllvm}/bin/FileCheck"
"-DYAML2OBJ_EXECUTABLE=${llvmPackages_16.libllvm}/bin/yaml2obj"
"-DFILECHECK_EXECUTABLE=${llvmPackages.libllvm}/bin/FileCheck"
"-DYAML2OBJ_EXECUTABLE=${llvmPackages.libllvm}/bin/yaml2obj"
];
postPatch = ''
@ -66,7 +66,7 @@ stdenv.mkDerivation {
capstone
gtest
lit
llvmPackages_16.libllvm
llvmPackages.libllvm
];
doCheck = true;

View File

@ -2,24 +2,24 @@
lib,
fetchFromGitHub,
cmake,
llvmPackages_16,
llvmPackages_18,
unstableGitUpdater,
}:
let
c2ffiBranch = "llvm-16.0.0";
llvmPackages = llvmPackages_16;
c2ffiBranch = "llvm-18.1.0";
llvmPackages = llvmPackages_18;
in
llvmPackages.stdenv.mkDerivation {
pname = "c2ffi-${c2ffiBranch}";
version = "0-unstable-2023-11-18";
version = "0-unstable-2024-04-20";
src = fetchFromGitHub {
owner = "rpav";
repo = "c2ffi";
rev = "097cbe61ca02dc79ea60859aa056975131a9d985";
hash = "sha256-pflolW5OoEkVDozy4cjCdUIVxgE/SfVKIhQyNBDhENc=";
rev = "0de81efb64acc82c08c5eee4a7108ddcb1b00d86";
hash = "sha256-q81Vxq/6h/5jgQ1Leq15klN/8L+UiavlxkARGo2SrJ0=";
};
passthru.updateScript = unstableGitUpdater {

View File

@ -1,7 +1,6 @@
{
lib,
stdenv,
llvmPackages_17,
fetchurl,
coreutils,
cctools,
@ -13,13 +12,6 @@
testers,
}@args:
let
# x64 darwin fails with invalid memory reference with clang-18 & 19.
# https://github.com/cisco/ChezScheme/issues/896
# aarch64 darwin fails to execute `system` calls with clang-18 & 19.
# https://github.com/cisco/ChezScheme/issues/928
stdenv = if args.stdenv.hostPlatform.isDarwin then llvmPackages_17.stdenv else args.stdenv;
in
stdenv.mkDerivation (finalAttrs: {
pname = "chez-scheme";
version = "10.2.0";

View File

@ -20,8 +20,7 @@
yaml-cpp,
ncurses,
file,
libutil,
sigtool,
darwin,
nixosTests,
installShellFiles,
reflection-cpp,
@ -53,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: {
qt6.wrapQtAppsHook
installShellFiles
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ sigtool ];
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool ];
buildInputs = [
boxed-cpp
@ -74,7 +73,7 @@ stdenv.mkDerivation (finalAttrs: {
]
++ lib.optionals stdenv.hostPlatform.isLinux [ libutempter ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libutil
darwin.libutil
];
cmakeFlags = [ "-DCONTOUR_QT_VERSION=6" ];

View File

@ -2,7 +2,7 @@
lib,
rustPlatform,
fetchFromGitHub,
llvm_17,
llvm,
libffi,
libz,
libxml2,
@ -35,7 +35,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
];
nativeBuildInputs = [
llvm_17
llvm
makeWrapper
];
@ -62,6 +62,8 @@ rustPlatform.buildRustPackage (finalAttrs: {
};
};
__darwinAllowLocalNetworking = true;
meta = {
description = "Language for building concurrent software with confidence";
homepage = "https://inko-lang.org/";

View File

@ -4,7 +4,7 @@
fetchFromGitHub,
makeWrapper,
cargo,
llvm_16,
llvm,
stdenv,
libffi,
libz,
@ -39,7 +39,7 @@ rustPlatform.buildRustPackage (finalAttr: {
--prefix PATH : ${
lib.makeBinPath [
cargo
llvm_16.dev
llvm.dev
stdenv.cc
]
} \

View File

@ -2,7 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
llvmPackages_16,
llvmPackages_18,
ncurses,
cmake,
libxml2,
@ -14,17 +14,17 @@
}:
let
luajitRev = "50936d784474747b4569d988767f1b5bab8bb6d0";
luajitRev = "83954100dba9fc0cf5eeaf122f007df35ec9a604";
luajitBase = "LuaJIT-${luajitRev}";
luajitArchive = "${luajitBase}.tar.gz";
luajitSrc = fetchFromGitHub {
owner = "LuaJIT";
repo = "LuaJIT";
rev = luajitRev;
sha256 = "1g87pl014b5v6z2nnhiwn3wf405skawszfr5wdzyfbx00j3kgxd0";
hash = "sha256-L9T6lc32dDLAp9hPI5mKOzT0c4juW9JHA3FJCpm7HNQ=";
};
llvmPackages = llvmPackages_16;
llvmPackages = llvmPackages_18;
llvmMerged = symlinkJoin {
name = "llvmClangMerged";
paths = with llvmPackages; [
@ -37,20 +37,20 @@ let
];
};
cuda = cudaPackages.cudatoolkit_11;
cuda = cudaPackages.cudatoolkit;
clangVersion = llvmPackages.clang-unwrapped.version;
in
stdenv.mkDerivation rec {
pname = "terra";
version = "1.1.0";
version = "1.2.0";
src = fetchFromGitHub {
owner = "terralang";
repo = "terra";
rev = "release-${version}";
sha256 = "0v9vpxcp9ybwnfljskqn41vjq7c0srdfv7qs890a6480pnk4kavd";
hash = "sha256-CukNCvTHZUhjdHyvDUSH0YCVNkThUFPaeyLepyEKodA=";
};
nativeBuildInputs = [ cmake ];
@ -65,9 +65,7 @@ stdenv.mkDerivation rec {
cmakeFlags =
let
resourceDir =
"${llvmMerged}/lib/clang/"
+ (if lib.versionOlder clangVersion "16" then clangVersion else lib.versions.major clangVersion);
resourceDir = "${llvmMerged}/lib/clang/${lib.versions.major clangVersion}";
in
[
"-DHAS_TERRA_VERSION=0"

View File

@ -4,8 +4,8 @@
fetchFromGitHub,
pkg-config,
go,
llvm_16,
clang_16,
llvm,
clang,
bash,
writableTmpDirAsHomeHook,
gitMinimal,
@ -28,9 +28,9 @@ stdenv.mkDerivation (finalAttrs: {
];
buildInputs = [
clang_16
clang
go
llvm_16
llvm
pkg-config
];

View File

@ -3,7 +3,7 @@
buildGoModule,
fetchFromGitHub,
clang_14,
clang,
pkg-config,
elfutils,
@ -37,10 +37,13 @@ buildGoModule rec {
enableParallelBuilding = true;
# needed to build bpf libs
hardeningDisable = [ "stackprotector" ];
hardeningDisable = [
"stackprotector"
"zerocallusedregs"
];
nativeBuildInputs = [
clang_14
clang
pkg-config
];
buildInputs = [

View File

@ -18,7 +18,6 @@
fetchgit,
runCommand,
llvmPackages,
llvmPackages_15,
patchelf,
openbox,
xorg,
@ -217,7 +216,7 @@ stdenv.mkDerivation (finalAttrs: {
cp -pr --reflink=auto $swiftshader src/flutter/third_party/swiftshader
chmod -R u+w -- src/flutter/third_party/swiftshader
ln -s ${llvmPackages_15.llvm.monorepoSrc} src/flutter/third_party/swiftshader/third_party/llvm-project
ln -s ${llvmPackages.llvm.monorepoSrc} src/flutter/third_party/swiftshader/third_party/llvm-project
mkdir -p src/flutter/buildtools/${constants.alt-platform}
ln -s ${llvm} src/flutter/buildtools/${constants.alt-platform}/clang

View File

@ -184,7 +184,7 @@ builtins.intersectAttrs super {
# Doesn't declare LLVM dependency, needs llvm-config
llvm-codegen = addBuildTools [
pkgs.llvmPackages_17.llvm.dev # for native llvm-config
pkgs.llvmPackages.llvm.dev # for native llvm-config
] super.llvm-codegen;
# hledger* overrides

View File

@ -26,8 +26,7 @@
gst-plugins-base,
gtk3,
dconf,
llvmPackages_15,
overrideLibcxx,
llvmPackages_19,
darwin,
# options
@ -328,16 +327,9 @@ let
qtwayland = callPackage ../modules/qtwayland.nix { };
qtwebchannel = callPackage ../modules/qtwebchannel.nix { };
qtwebengine = callPackage ../modules/qtwebengine.nix {
# The version of Chromium used by Qt WebEngine 5.15.x does not build with clang 16 due
# to the following errors:
# * -Wenum-constexpr-conversion: This is a downgradable error in clang 16, but it is planned
# to be made into a hard error in a future version of clang. Patches are not available for
# the version of v8 used by Chromium in Qt WebEngine, and fixing the code is non-trivial.
# * -Wincompatible-function-pointer-types: This is also a downgradable error generated
# starting with clang 16. Patches are available upstream that can be backported.
# Because the first error is non-trivial to fix and suppressing it risks future breakage,
# clang is pinned to clang 15. That also makes fixing the second set of errors unnecessary.
stdenv = if stdenv.cc.isClang then overrideLibcxx llvmPackages_15.stdenv else stdenv;
# Wont build with Clang 20, as `-Wenum-constexpr-conversion`
# was made a hard error.
stdenv = if stdenv.cc.isClang then llvmPackages_19.stdenv else stdenv;
inherit (srcs.qtwebengine) version;
inherit (darwin) bootstrap_cmds;
python = python3;

View File

@ -0,0 +1,25 @@
Backported from: <https://github.com/chromium/chromium/commit/f8f21fb4aa01f75acbb12abf5ea8c263c6817141.patch>
Original author: Daniel Richard G <iskunk@gmail.com>
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py
index 5ee4905..6c500a0 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py
@@ -36,10 +36,13 @@ def generate_gperf(gperf_path, gperf_input, gperf_args):
# https://savannah.gnu.org/bugs/index.php?53028
gperf_output = re.sub(r'\bregister ', '', gperf_output)
# -Wimplicit-fallthrough needs an explicit fallthrough statement,
- # so replace gperf's /*FALLTHROUGH*/ comment with the statement.
- # https://savannah.gnu.org/bugs/index.php?53029
- gperf_output = gperf_output.replace('/*FALLTHROUGH*/',
- ' FALLTHROUGH;')
+ # so replace gperf 3.1's /*FALLTHROUGH*/ comment with the statement.
+ # https://savannah.gnu.org/bugs/index.php?53029 (fixed in 3.2)
+ if re.search(
+ r'/\* C\+\+ code produced by gperf version 3\.[01](\.\d+)? \*/',
+ gperf_output):
+ gperf_output = gperf_output.replace('/*FALLTHROUGH*/',
+ ' [[fallthrough]];')
# -Wpointer-to-int-cast warns about casting pointers to smaller ints
# Replace {(int)(long)&(foo), bar} with
# {static_cast<int>(reinterpret_cast<uintptr_t>(&(foo)), bar}

View File

@ -219,6 +219,9 @@ qtModule (
hash = "sha256-DcAYOV9b30ogPCiedvQimEmiZpUJquk5j6WLjJxR54U=";
extraPrefix = "";
})
# Fix the build with gperf ≥ 3.2 and Clang 19.
./qtwebengine-gperf-3.2.patch
];
postPatch = ''

View File

@ -36,7 +36,6 @@ deployAndroidPackage {
nss
nspr
alsa-lib
llvmPackages_15.libllvm.lib
waylandpp.lib
]
)
@ -70,10 +69,6 @@ deployAndroidPackage {
patchelf --replace-needed libtiff.so.5 libtiff.so "$file" || true
done
for file in $out/libexec/android-sdk/emulator/lib64/vulkan/libvulkan_lvp.so; do
patchelf --replace-needed libLLVM-15.so.1 libLLVM-15.so "$file" || true
done
autoPatchelf $out
# Wrap emulator so that it can load required libraries at runtime

View File

@ -6,7 +6,7 @@
cmake,
qt5,
libxcrypt,
llvmPackages_15,
llvmPackages,
}:
stdenv.mkDerivation {
@ -18,7 +18,7 @@ stdenv.mkDerivation {
cd sources/shiboken2
'';
CLANG_INSTALL_DIR = llvmPackages_15.libclang.out;
CLANG_INSTALL_DIR = llvmPackages.libclang.out;
nativeBuildInputs = [
cmake
@ -32,7 +32,7 @@ stdenv.mkDerivation {
];
buildInputs = [
llvmPackages_15.libclang
llvmPackages.libclang
python.pkgs.setuptools
qt5.qtbase
qt5.qtxmlpatterns

View File

@ -9,7 +9,7 @@
libiconv,
libffi,
libxml2,
llvm_14,
llvm,
ncurses,
zlib,
}:
@ -99,7 +99,7 @@ in
pname = "wasmer-compiler-llvm";
buildAndTestSubdir = "packages/compiler-llvm";
cargoHash = "sha256-oHyjzEqv88e2CHhWhKjUh6K0UflT9Y1JD//3oiE/UBQ=";
extraNativeBuildInputs = [ llvm_14 ];
extraNativeBuildInputs = [ llvm ];
extraBuildInputs = [
libffi
libxml2.out

View File

@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
# Build2 needs to use lld on Darwin because it creates thin archives when it detects `llvm-ar`,
# which ld64 does not support.
(lib.getBin buildPackages.llvmPackages_16.lld)
(lib.getBin buildPackages.llvmPackages.lld)
];
doCheck = true;

View File

@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
# Build2 needs to use lld on Darwin because it creates thin archives when it detects `llvm-ar`,
# which ld64 does not support.
(lib.getBin buildPackages.llvmPackages_16.lld)
(lib.getBin buildPackages.llvmPackages.lld)
];
postPatch = ''

View File

@ -2,7 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
llvmPackages_17,
llvmPackages_19,
boost,
cmake,
spdlog,
@ -20,7 +20,7 @@ let
# ```
#
# > Where `.#` is the flake path were the repo `wasmedge` was cloned at the expected version.
llvmPackages = llvmPackages_17;
llvmPackages = llvmPackages_19;
in
llvmPackages.stdenv.mkDerivation (finalAttrs: {
pname = "wasmedge";

View File

@ -1,7 +1,7 @@
{
buildPgrxExtension,
cargo-pgrx_0_12_0_alpha_1,
clang_16,
clang,
fetchFromGitHub,
lib,
nix-update-script,
@ -10,20 +10,9 @@
postgresql,
postgresqlTestExtension,
replaceVars,
rustPlatform,
}:
let
# Upstream only works with clang 16, so we're pinning it here to
# avoid future incompatibility.
# See https://docs.vectorchord.ai/developers/development.html#set-up-development-environment, step 2
clang = clang_16;
rustPlatform' = rustPlatform // {
bindgenHook = rustPlatform.bindgenHook.override { inherit clang; };
};
in
(buildPgrxExtension.override { rustPlatform = rustPlatform'; }) (finalAttrs: {
buildPgrxExtension (finalAttrs: {
inherit postgresql;
cargo-pgrx = cargo-pgrx_0_12_0_alpha_1;

View File

@ -1472,11 +1472,6 @@ with pkgs;
### APPLICATIONS/TERMINAL-EMULATORS
contour = callPackage ../by-name/co/contour/package.nix {
inherit (darwin) libutil sigtool;
stdenv = if stdenv.hostPlatform.isDarwin then llvmPackages_17.stdenv else stdenv;
};
cool-retro-term = libsForQt5.callPackage ../applications/terminal-emulators/cool-retro-term { };
kitty = callPackage ../by-name/ki/kitty/package.nix {
@ -5319,7 +5314,7 @@ with pkgs;
ghdl-llvm = callPackage ../by-name/gh/ghdl/package.nix {
backend = "llvm";
inherit (llvmPackages_15) llvm;
inherit (llvmPackages) llvm;
};
gcc-arm-embedded = gcc-arm-embedded-14;
@ -8632,10 +8627,6 @@ with pkgs;
libusb-compat-0_1 = callPackage ../development/libraries/libusb-compat/0.1.nix { };
libunicode = callPackage ../by-name/li/libunicode/package.nix {
stdenv = if stdenv.hostPlatform.isDarwin then llvmPackages_17.stdenv else stdenv;
};
libunwind =
# Use the system unwinder in the SDK but provide a compatibility package to:
# 1. avoid evaluation errors with setting `unwind` to `null`; and
@ -9108,8 +9099,7 @@ with pkgs;
perl
gtk3
python3
llvmPackages_15
overrideLibcxx
llvmPackages_19
darwin
;
inherit (__splicedPackages.gst_all_1) gstreamer gst-plugins-base;
@ -9391,7 +9381,6 @@ with pkgs;
tclap_1_4 = callPackage ../development/libraries/tclap/1.4.nix { };
termbench-pro = callPackage ../by-name/te/termbench-pro/package.nix {
stdenv = if stdenv.hostPlatform.isDarwin then llvmPackages_17.stdenv else stdenv;
fmt = fmt_11;
};

View File

@ -89,7 +89,7 @@ let
backoff = callPackage ../development/ocaml-modules/backoff { };
bap = callPackage ../development/ocaml-modules/bap {
inherit (pkgs.llvmPackages_14) llvm;
inherit (pkgs.llvmPackages) llvm;
};
base64 = callPackage ../development/ocaml-modules/base64 { };

View File

@ -16500,7 +16500,7 @@ self: super: with self; {
shellingham = callPackage ../development/python-modules/shellingham { };
shiboken2 = toPythonModule (
callPackage ../development/python-modules/shiboken2 { inherit (pkgs) cmake llvmPackages_15 qt5; }
callPackage ../development/python-modules/shiboken2 { inherit (pkgs) cmake llvmPackages qt5; }
);
shiboken6 = toPythonModule (