Package Details: llvm12-git 12.0.1_rc1.23.gadae17728bad-1

Git Clone URL: https://aur.archlinux.org/llvm12-git.git (read-only, click to copy)
Package Base: llvm12-git
Description: LLVM 12 Toolchain with clang, clang-tools-extra, compiler-rt, openmp, polly, lldb, lld
Upstream URL: https://llvm.org/
Keywords: 12 clang clang-tools-extra compiler-rt lld lldb LLVM openmp polly
Licenses: custom:Apache 2.0 with LLVM Exception
Conflicts: clang, clang-analyzer, clang-tools-extra, compiler-rt, lld, lldb, llvm, llvm-git, llvm-libs, llvm-libs-git, llvm-ocaml, llvm-ocaml-git, openmp, polly
Provides: clang, clang=12.0.0, clang-analyzer, clang-tools-extra, compiler-rt, lld, lldb, llvm, llvm-libs, llvm-ocaml, openmp, polly
Replaces: clang, clang-analyzer, clang-tools-extra, compiler-rt, lld, lldb, llvm, llvm-libs, llvm-ocaml, openmp, polly
Submitter: nullik
Maintainer: nullik
Last Packager: nullik
Votes: 1
Popularity: 0.49
First Submitted: 2021-05-10 17:51
Last Updated: 2021-06-14 22:14

Required by (1000)

Sources (6)

Pinned Comments

nullik commented on 2021-05-10 18:02

Import GPG Key: gpg --keyserver pgp.mit.edu --recv-keys 33ED753E14757D79FA17E57DC4C1F715B2B66B95

Be carefull tests have fails, but they is't critical for x86_64 systems. LLVM 12.0.0 in official archive https://releases.llvm.org/download.html#12.0.0 have tests fails too. Please answer Y for question "Skip build tests (Y/N)?"!!! I bild mesa 21.1.2, kernel 5.12.10(with LTO-Thine), libjpeg-turbo, zlib-ng with this LLVM Clang. All works fine. I recommend to build this package with clang and llvm toolchain(pacman -Syu llvm llvm-libs clang lld).

How to build kernel with LLVM https://www.kernel.org/doc/html/latest/kbuild/llvm.html For LTO Need to set LLVM_IAS=1. Configure kernel General architecture-dependent options->Link Time Optimization(LTO)-> make you choose. I recommend ThinLTO https://clang.llvm.org/docs/ThinLTO.html For build kernel you are can use my flexible build script https://github.com/h0tc0d3/kbuild

For build MESA 21.1.2 with clang and llvm toolchain please install also https://aur.archlinux.org/packages/libclc12-git/ and edit yours /etc/makepkg.conf and remove debug flags -fvar-tracking-assignments, add strings:

export CC=clang
export CXX=clang++
export LD=ld.lld
export CC_LD=lld
export CXX_LD=lld
export AR=llvm-ar
export NM=llvm-nm
export STRIP=llvm-strip
export OBJCOPY=llvm-objcopy
export OBJDUMP=llvm-objdump
export READELF=llvm-readelf
export RANLIB=llvm-ranlib
export HOSTCC=clang
export HOSTCXX=clang++
export HOSTAR=llvm-ar
export HOSTLD=ld.lld

For rebuild performance important packages with llvm you are can use my build scripts https://github.com/h0tc0d3/arch-packages

My /etc/makepkg.conf

CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"

CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"
#-- Compiler and Linker Flags
export CC=clang
export CXX=clang++
export LD=ld.lld
export CC_LD=lld
export CXX_LD=lld
export AR=llvm-ar
export NM=llvm-nm
export STRIP=llvm-strip
export OBJCOPY=llvm-objcopy
export OBJDUMP=llvm-objdump
export READELF=llvm-readelf
export HOSTCC=clang
export HOSTCXX=clang++
export HOSTAR=llvm-ar
export HOSTLD=ld.lld

CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-fdiagnostics-color=always -pipe -O2 -march=native -fstack-protector-strong"
CXXFLAGS="-fdiagnostics-color=always -pipe -O2 -march=native -fstack-protector-strong"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
RUSTFLAGS="-C opt-level=2"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j$(nproc)"
NINJAFLAGS="-j$(nproc)"
#-- Debugging flags
DEBUG_CFLAGS="-g"
DEBUG_CXXFLAGS="-g"
#DEBUG_CFLAGS="-g -fvar-tracking-assignments"
#DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
#DEBUG_RUSTFLAGS="-C debuginfo=2"

Latest Comments

nullik commented on 2021-06-11 13:52

@deemon try build and install with yay https://aur.archlinux.org/packages/yay Build with clang and llvm toolchain? [Y/n] Y If you are answer Y, please install pacman -Syu llvm llvm-libs clang lld. Also сheck what you are using bash, script was written to bash and not compatible with other shells. Check yours ${NINJAFLAGS}. Just checked with myself, I have no such errors.

deemon commented on 2021-06-10 22:34

==> Making package: llvm12-git 12.0.1_rc1.gb54ccef144d2-1 (R 11 juuni 2021 01:29:29)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Starting build()...
Build with clang and llvm toolchain? [Y/n] Y
Skip build tests? [Y/n] Y
Skip build documentation? [Y/n] Y
Skip build OCaml and Go bindings? [Y/n] Y

...

-- Build files have been written to: /home/deemon/.cache/yay/llvm12-git/src/llvm-project/build
ninja: Entering directory `build'
ninja: error: empty path
==> ERROR: A failure occurred in build().
    Aborting...
error making: llvm12-git

did I choose some of the questions wrong? anything else I am missing?

nullik commented on 2021-05-10 19:04

Thanks, fixit.

FabioLolix commented on 2021-05-10 18:52

git is missing as makedepends

One where should get llvm-config.h since you're using local://?

nullik commented on 2021-05-10 18:02

Import GPG Key: gpg --keyserver pgp.mit.edu --recv-keys 33ED753E14757D79FA17E57DC4C1F715B2B66B95

Be carefull tests have fails, but they is't critical for x86_64 systems. LLVM 12.0.0 in official archive https://releases.llvm.org/download.html#12.0.0 have tests fails too. Please answer Y for question "Skip build tests (Y/N)?"!!! I bild mesa 21.1.2, kernel 5.12.10(with LTO-Thine), libjpeg-turbo, zlib-ng with this LLVM Clang. All works fine. I recommend to build this package with clang and llvm toolchain(pacman -Syu llvm llvm-libs clang lld).

How to build kernel with LLVM https://www.kernel.org/doc/html/latest/kbuild/llvm.html For LTO Need to set LLVM_IAS=1. Configure kernel General architecture-dependent options->Link Time Optimization(LTO)-> make you choose. I recommend ThinLTO https://clang.llvm.org/docs/ThinLTO.html For build kernel you are can use my flexible build script https://github.com/h0tc0d3/kbuild

For build MESA 21.1.2 with clang and llvm toolchain please install also https://aur.archlinux.org/packages/libclc12-git/ and edit yours /etc/makepkg.conf and remove debug flags -fvar-tracking-assignments, add strings:

export CC=clang
export CXX=clang++
export LD=ld.lld
export CC_LD=lld
export CXX_LD=lld
export AR=llvm-ar
export NM=llvm-nm
export STRIP=llvm-strip
export OBJCOPY=llvm-objcopy
export OBJDUMP=llvm-objdump
export READELF=llvm-readelf
export RANLIB=llvm-ranlib
export HOSTCC=clang
export HOSTCXX=clang++
export HOSTAR=llvm-ar
export HOSTLD=ld.lld

For rebuild performance important packages with llvm you are can use my build scripts https://github.com/h0tc0d3/arch-packages

My /etc/makepkg.conf

CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"

CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"
#-- Compiler and Linker Flags
export CC=clang
export CXX=clang++
export LD=ld.lld
export CC_LD=lld
export CXX_LD=lld
export AR=llvm-ar
export NM=llvm-nm
export STRIP=llvm-strip
export OBJCOPY=llvm-objcopy
export OBJDUMP=llvm-objdump
export READELF=llvm-readelf
export HOSTCC=clang
export HOSTCXX=clang++
export HOSTAR=llvm-ar
export HOSTLD=ld.lld

CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-fdiagnostics-color=always -pipe -O2 -march=native -fstack-protector-strong"
CXXFLAGS="-fdiagnostics-color=always -pipe -O2 -march=native -fstack-protector-strong"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
RUSTFLAGS="-C opt-level=2"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j$(nproc)"
NINJAFLAGS="-j$(nproc)"
#-- Debugging flags
DEBUG_CFLAGS="-g"
DEBUG_CXXFLAGS="-g"
#DEBUG_CFLAGS="-g -fvar-tracking-assignments"
#DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
#DEBUG_RUSTFLAGS="-C debuginfo=2"