Skip to content

Commit ca9072d

Browse files
committed
downloads: upgrade LLVM/Clang to 11.0.0
This required a patch to gdbm to get it to compile.
1 parent 3f27615 commit ca9072d

File tree

3 files changed

+49
-24
lines changed

3 files changed

+49
-24
lines changed

cpython-unix/build-gdbm.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,24 @@ tar -xf gdbm-${GDBM_VERSION}.tar.gz
1313

1414
pushd gdbm-${GDBM_VERSION}
1515

16+
# Patch to work with -fno-common, which LLVM 11 enabled.
17+
patch -p1 <<EOF
18+
diff --git a/src/parseopt.c b/src/parseopt.c
19+
index a7b504f..1f6b561 100644
20+
--- a/src/parseopt.c
21+
+++ b/src/parseopt.c
22+
@@ -255,8 +255,6 @@ print_option_descr (const char *descr, size_t lmargin, size_t rmargin)
23+
}
24+
25+
char *parseopt_program_name;
26+
-char *parseopt_program_doc;
27+
-char *parseopt_program_args;
28+
const char *program_bug_address = "<" PACKAGE_BUGREPORT ">";
29+
void (*parseopt_help_hook) (FILE *stream);
30+
31+
EOF
32+
33+
1634
# CPython setup.py looks for libgdbm_compat and gdbm-ndbm.h,
1735
# which require --enable-libgdbm-compat.
1836
CLFAGS="${EXTRA_TARGET_CFLAGS} -fPIC" CPPFLAGS="${EXTRA_TARGET_CFLAGS} -fPIC" ./configure \

cpython-unix/build.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ def add_target_env(env, platform, build_env):
5757
# Suppress extremely verbose warnings we see with LLVM 10.
5858
"-Wno-nullability-completeness",
5959
"-Wno-expansion-to-defined",
60+
# LLVM 11 contains commit https://reviews.llvm.org/D83250,
61+
# which enables -Werror for undef-prefix=TARGET_OS_.
62+
# However, the macOS SDK has headers that reference deprecated
63+
# TARGET_OS defines, like TARGET_OS_EMBEDDED. So LLVM 11 refuses
64+
# to work with the macOS SDKs out of the box. We work around
65+
# this by undoing the -Werror=undef-prefix in that commit.
66+
"-Wno-undef-prefix",
6067
]
6168
)
6269

pythonbuild/downloads.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@
2929
"license_file": "LICENSE.bzip2.txt",
3030
},
3131
"clang": {
32-
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang-10.0.1.src.tar.xz",
33-
"size": 14046188,
34-
"sha256": "f99afc382b88e622c689b6d96cadfa6241ef55dca90e87fc170352e12ddb2b24",
35-
"version": "10.0.1",
32+
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/clang-11.0.0.src.tar.xz",
33+
"size": 14982988,
34+
"sha256": "0f96acace1e8326b39f220ba19e055ba99b0ab21c2475042dbc6a482649c5209",
35+
"version": "11.0.0",
3636
},
3737
"clang-compiler-rt": {
38-
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/compiler-rt-10.0.1.src.tar.xz",
39-
"size": 2085712,
40-
"sha256": "d90dc8e121ca0271f0fd3d639d135bfaa4b6ed41e67bd6eb77808f72629658fa",
41-
"version": "10.0.1",
38+
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/compiler-rt-11.0.0.src.tar.xz",
39+
"size": 2141408,
40+
"sha256": "374aff82ff573a449f9aabbd330a5d0a441181c535a3599996127378112db234",
41+
"version": "11.0.0",
4242
},
4343
"cmake-linux-bin": {
4444
"url": "https://github.com/Kitware/CMake/releases/download/v3.15.1/cmake-3.15.1-Linux-x86_64.tar.gz",
@@ -132,16 +132,16 @@
132132
"version": "1.0.7",
133133
},
134134
"libc++": {
135-
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/libcxx-10.0.1.src.tar.xz",
136-
"size": 1839172,
137-
"sha256": "def674535f22f83131353b3c382ccebfef4ba6a35c488bdb76f10b68b25be86c",
138-
"version": "10.0.1",
135+
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/libcxx-11.0.0.src.tar.xz",
136+
"size": 1892416,
137+
"sha256": "6c1ee6690122f2711a77bc19241834a9219dda5036e1597bfa397f341a9b8b7a",
138+
"version": "11.0.0",
139139
},
140140
"libc++abi": {
141-
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/libcxxabi-10.0.1.src.tar.xz",
142-
"size": 552940,
143-
"sha256": "a97ef810b2e9fb70e8f7e317b74e646ed4944f488b02ac5ddd9c99e385381a7b",
144-
"version": "10.0.1",
141+
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/libcxxabi-11.0.0.src.tar.xz",
142+
"size": 554284,
143+
"sha256": "58697d4427b7a854ec7529337477eb4fba16407222390ad81a40d125673e4c15",
144+
"version": "11.0.0",
145145
},
146146
"libedit": {
147147
"url": "https://www.thrysoee.dk/editline/libedit-20191231-3.1.tar.gz",
@@ -204,16 +204,16 @@
204204
"license_file": "LICENSE.libxcb.txt",
205205
},
206206
"lld": {
207-
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/lld-10.0.1.src.tar.xz",
208-
"size": 1134580,
209-
"sha256": "591449e0aa623a6318d5ce2371860401653c48bb540982ccdd933992cb88df7a",
210-
"version": "10.0.1",
207+
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/lld-11.0.0.src.tar.xz",
208+
"size": 1247188,
209+
"sha256": "efe7be4a7b7cdc6f3bcf222827c6f837439e6e656d12d6c885d5c8a80ff4fd1c",
210+
"version": "11.0.0",
211211
},
212212
"llvm": {
213-
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-10.0.1.src.tar.xz",
214-
"size": 35270168,
215-
"sha256": "c5d8e30b57cbded7128d78e5e8dad811bff97a8d471896812f57fa99ee82cdf3",
216-
"version": "10.0.1",
213+
"url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/llvm-11.0.0.src.tar.xz",
214+
"size": 39480848,
215+
"sha256": "913f68c898dfb4a03b397c5e11c6a2f39d0f22ed7665c9cefa87a34423a72469",
216+
"version": "11.0.0",
217217
},
218218
"mpc": {
219219
"url": "http://www.multiprecision.org/downloads/mpc-1.0.3.tar.gz",

0 commit comments

Comments
 (0)