llvm_{12,13,14,15}: fix build with Python 3.13 (#412548)
Python 3.13 removed the "pipes" module, which LLVM used through v16. So we need a patch. It's only used once though! A similar patch was used by Arch: https://gitlab.archlinux.org/archlinux/packaging/packages/llvm15/-/blob/main/nopipes.diff?ref_type=heads
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
diff --git a/test/Bindings/Go/lit.local.cfg b/test/Bindings/Go/lit.local.cfg
|
||||
index 91a0ad89..4da83a1a 100644
|
||||
--- a/test/Bindings/Go/lit.local.cfg
|
||||
+++ b/test/Bindings/Go/lit.local.cfg
|
||||
@@ -1,5 +1,4 @@
|
||||
import os
|
||||
-import pipes
|
||||
import shlex
|
||||
import sys
|
||||
|
||||
@@ -56,7 +55,7 @@ def fixup_compiler_path(compiler):
|
||||
except (AttributeError, OSError):
|
||||
pass
|
||||
|
||||
- return ' '.join([pipes.quote(arg) for arg in args])
|
||||
+ return ' '.join([shlex.quote(arg) for arg in args])
|
||||
|
||||
config.environment['CC'] = fixup_compiler_path(config.host_cc)
|
||||
config.environment['CXX'] = fixup_compiler_path(config.host_cxx)
|
||||
@@ -208,16 +208,16 @@ stdenv.mkDerivation (
|
||||
stripLen = 1;
|
||||
}
|
||||
)
|
||||
++
|
||||
lib.optional (lib.versionOlder release_version "16")
|
||||
# Fix musl build.
|
||||
(
|
||||
fetchpatch {
|
||||
url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
|
||||
relative = "llvm";
|
||||
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
|
||||
}
|
||||
)
|
||||
++ lib.optionals (lib.versionOlder release_version "16") [
|
||||
# Fix musl build.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
|
||||
relative = "llvm";
|
||||
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
|
||||
})
|
||||
# Fix for Python 3.13
|
||||
(getVersionFile "llvm/no-pipes.patch")
|
||||
]
|
||||
++ lib.optionals (lib.versionOlder release_version "14") [
|
||||
# Backport gcc-13 fixes with missing includes.
|
||||
(fetchpatch {
|
||||
|
||||
@@ -204,6 +204,12 @@
|
||||
path = ../12;
|
||||
}
|
||||
];
|
||||
"llvm/no-pipes.patch" = [
|
||||
{
|
||||
before = "16";
|
||||
path = ../12;
|
||||
}
|
||||
];
|
||||
"openmp/fix-find-tool.patch" = [
|
||||
{
|
||||
after = "17";
|
||||
|
||||
Reference in New Issue
Block a user