mbox series

[bug#56452,0/5] Fix and update LLVM and clang-toolchain.

Message ID cover.1657206203.git.code@greghogan.com
Headers show
Series Fix and update LLVM and clang-toolchain. | expand

Message

Greg Hogan July 8, 2022, 3:57 p.m. UTC
This patchset updates and fixes the builds of llvm-3.7, llvm-3.8, and
llvm-8 and also updates llvm-14.

The only failing depedent package is beignet, which has failed to build
since last year's replacement of ocl-icd with opencl-icd-loader. beignet
has no dependents and was last updated in 2017.

By building clang-toolchain with a libomp built with the same version of
llvm we remove the additional copy of llvm and reduce the size of the
closure from 1330.9 MB to 1156 MB.

If this is accepted I would look to submit a follow-on patchset adding
libomp varients for clang-toolchain-12 and earlier.

$ guix size clang-toolchain@14 | grep 'clang\|llvm\|libomp'
/gnu/store/rhs2ws9xqx5ln44ix2kvjmmjv3jg5aw1-clang-14.0.5           886.1   215.6  16.2%
/gnu/store/pkcw25plv6310pmmm7yi276fzzpnl6zq-llvm-14.0.5            257.2   185.2  13.9%
/gnu/store/579xrf7vz85ynjlk62njaczgnayam1ar-llvm-13.0.1            247.1   175.0  13.2%
/gnu/store/p0spbhzkk7wa3phiyk126n1kkfdsnmw9-clang-runtime-14.0.5   227.9    31.6   2.4%
/gnu/store/js2yvkq2ki2zbl166g2mfa53qlrilxhn-libomp-13.0.1          253.9     1.8   0.1%
/gnu/store/ahr3mcg1l1nml67x4i1znws25ph84bb2-clang-toolchain-14.0.5  1330.9     0.3   0.0%

$ ./pre-inst-env guix size clang-toolchain@14 | grep 'clang\|llvm\|libomp'
/gnu/store/hcypy6mb3v19a58hvaf265283jgd37mm-clang-14.0.6           886.1   215.6  18.6%
/gnu/store/0ip696hw07p8rmwyqks0slm642mhdzfh-llvm-14.0.6            257.2   185.2  16.0%
/gnu/store/bckl8q1wra5k0cgwfiyb2syay556gwjr-clang-runtime-14.0.6   227.9    31.6   2.7%
/gnu/store/rpk14gkhav3mrcf5wppyc77yd2jh5syi-libomp-14.0.6          264.2     1.9   0.2%
/gnu/store/bynhq99qdd71n1v4y52x533bxghz6i1x-clang-toolchain-14.0.6  1156.0     0.3   0.0%

Greg Hogan (5):
  gnu: llvm-8: Fix build with gcc-10.
  gnu: llvm-3.7, llvm-3.8: Fix build with gcc.
  gnu: faust-2: Update to 2.41.1.
  gnu: LLVM, Clang, LLD: Update to 14.0.6.
  gnu: clang-toolchain-14: Build with libomp-14.

 gnu/local.mk                                  |   3 +
 gnu/packages/audio.scm                        |   8 +-
 gnu/packages/llvm.scm                         | 134 +++++++++++-------
 ...g-runtime-3.7-fix-build-with-python3.patch |  16 +++
 .../llvm-3.x.1-fix-build-with-gcc.patch       |  15 ++
 .../llvm-8-fix-build-with-gcc-10.patch        |  34 +++++
 6 files changed, 155 insertions(+), 55 deletions(-)
 create mode 100644 gnu/packages/patches/clang-runtime-3.7-fix-build-with-python3.patch
 create mode 100644 gnu/packages/patches/llvm-3.x.1-fix-build-with-gcc.patch
 create mode 100644 gnu/packages/patches/llvm-8-fix-build-with-gcc-10.patch

Comments

Ludovic Courtès July 11, 2022, 11:17 p.m. UTC | #1
Hello,

Greg Hogan <code@greghogan.com> skribis:

> This patchset updates and fixes the builds of llvm-3.7, llvm-3.8, and
> llvm-8 and also updates llvm-14.

Yay!

> The only failing depedent package is beignet, which has failed to build
> since last year's replacement of ocl-icd with opencl-icd-loader. beignet
> has no dependents and was last updated in 2017.
>
> By building clang-toolchain with a libomp built with the same version of
> llvm we remove the additional copy of llvm and reduce the size of the
> closure from 1330.9 MB to 1156 MB.

It’s still terrible, but it’s an improvement.

> If this is accepted I would look to submit a follow-on patchset adding
> libomp varients for clang-toolchain-12 and earlier.

Sounds good.

>   gnu: llvm-8: Fix build with gcc-10.
>   gnu: llvm-3.7, llvm-3.8: Fix build with gcc.
>   gnu: faust-2: Update to 2.41.1.
>   gnu: LLVM, Clang, LLD: Update to 14.0.6.
>   gnu: clang-toolchain-14: Build with libomp-14.

Applied it all except the faust patch; let me know what to do with that
one.

Thanks!

Ludo’.