Merge pull request #295139 from wegank/libclc-bump
spirv-llvm-translator: add llvm 18 support
This commit is contained in:
@@ -274,6 +274,12 @@ in let
|
||||
nixSupport.cc-cflags = [ "-fno-exceptions" ];
|
||||
});
|
||||
|
||||
# Has to be in tools despite mostly being a library,
|
||||
# because we use a native helper executable from a
|
||||
# non-cross build in cross builds.
|
||||
libclc = callPackage ../common/libclc.nix {
|
||||
inherit buildLlvmTools;
|
||||
};
|
||||
});
|
||||
|
||||
libraries = lib.makeExtensible (libraries: let
|
||||
|
||||
@@ -16,7 +16,11 @@ let
|
||||
|
||||
# ROCm, if actively updated will always be at the latest version
|
||||
branch =
|
||||
if llvmMajor == "17" || isROCm then rec {
|
||||
if llvmMajor == "18" then rec {
|
||||
version = "18.1.0";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-64guZiuO7VpaX01wNIjV7cnjEAe6ineMdY44S6sA33k=";
|
||||
} else if llvmMajor == "17" || isROCm then rec {
|
||||
version = "17.0.0";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Rzm5Py9IPFtS9G7kME+uSwZ/0gPGW6MlL35ZWk4LfHM=";
|
||||
@@ -48,7 +52,15 @@ disable-warnings-if-gcc13 (stdenv.mkDerivation {
|
||||
inherit (branch) rev hash;
|
||||
};
|
||||
|
||||
patches = lib.optionals (lib.versionAtLeast llvmMajor "15") [
|
||||
patches = lib.optionals (llvmMajor == "18") [
|
||||
# Fixes build after SPV_INTEL_maximum_registers breaking change
|
||||
# TODO: remove on next spirv-headers release
|
||||
(fetchpatch {
|
||||
url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/d970c9126c033ebcbb7187bc705eae2e54726b74.patch";
|
||||
revert = true;
|
||||
hash = "sha256-71sJuGqVjTcB549eIiCO0LoqAgxkdEHCoxh8Pd/Qzz8=";
|
||||
})
|
||||
] ++ lib.optionals (lib.versionAtLeast llvmMajor "15" && lib.versionOlder llvmMajor "18") [
|
||||
# Fixes build after spirv-headers breaking change
|
||||
(fetchpatch {
|
||||
url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/0166a0fb86dc6c0e8903436bbc3a89bc3273ebc0.patch";
|
||||
|
||||
Reference in New Issue
Block a user