Package Base Details: llvm-git

Git Clone URL: (read-only, click to copy)
Keywords: clang git lld lldb llvm polly
Submitter: yurikoles
Maintainer: Lone_Wolf (rjahanbakhshi)
Last Packager: rjahanbakhshi
Votes: 113
Popularity: 0.082843
First Submitted: 2018-12-05 13:56
Last Updated: 2021-05-11 11:53

Pinned Comments

Lone_Wolf commented on 2020-08-22 12:18

Archlinux currently has 3 llvm git implementations

  1. This package

    • It aims to provide a full llvm/clang compiler environment for development purposes.
    • Supports cross-compiling , bindings for external stuff (python, ocaml etc) , and some things not in extra-llvm.
    • intended to be used with archlinux core,extra & community repos
    • CONFLICTS with extra llvm/clang packages
    • Currently there's no repo with binary versions
  2. llvm-minimal-git

    • focuses on providing stuff needed for AUR mesa-git. Doesn't support cross-compiling or any bindings for external stuff like ocaml & python.
    • intended to be used with archlinux core,extra & community repos
    • compatible with extra llvm/clang packages
    • no repo with binary versions
  3. packages created & maintained by Lordheavy, an arch developer

    • intended to be used with archlinux testing repos
    • sometimes has problems on systems where testing repos are disabled
    • uses same package structure as llvm/clang in official repos
    • source
    • binary versions in LordHeavys unoffical repo

Lone_Wolf commented on 2019-04-12 20:41

I've looked good at clang-trunk , llvm-svn, repo llvm/clang packages and think this package is now on route to become a worthy successor to llvm-svn .

  • llvm-libs-git holds the runtime libraries.

    It conflicts with the repo llvm-libs package. This is the only way to make sure the llvm linker from git is used, and that's needed for a full dev environment.

  • llvm-git

    has llvm , clang, compiler-rt, ocaml & python bindings, polly , lld , lldb .

The Package now uses a new environment variable to make ninja behave, NINJAFLAGS. If you want to use it adjust the snippet below to your desired values and add it to makepkg.conf.

Incase you are satisfied with ninja defaults you don't need to do anything.

# Add to makepkg.conf
# limit ninja to 20 jobs
# requires special code in PKGBUILD
# see ninja --help for additonal options

The check() function fails rather often, but I do suggest to build with them. If build fails due to test failure you can add --nocheck to skip the tests.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 ... Next › Last »

Lone_Wolf commented on 2020-10-25 11:18

Tested and I found no trace of the 'llvm adds projects just because their code is in certain locations' that forced me to remove sourcecode folders.

prepare() no longer removes spourcecode folders and lld is back where it should be.

For now I haven't put back . This means you can have extra llvm-libs and llvm-libs-git installed together. doesn't appear to b eused by many, are there users who can't use repo and require the git version of ?

Lone_Wolf commented on 2020-10-24 18:25

The error is with building the mach-o target, so doesn't occur when only building X86 & AMDGPU targets. llvm-minimal-git doesn't have this problem also.

Leaving the directories intact does indeed allow build to finish. Unfortunately that leads to llvm building a lot more then the projects specifically named (which is exactly the reason why I started deleting those folders).

Maybe llvm devs changed the build process so it doesn't do that anymore , I'll do some test runs.

Sinistar commented on 2020-10-24 17:54

I do not delete any directories, only build for AMDGPU and X86 in a clean chroot and have not had any problems. I just compiled the Arch kernel and modules with clang and all the llvm replacements with no problems. Edit: just for clarity this is what I build -D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;lld;lldb;polly"

Lone_Wolf commented on 2020-10-23 13:14

No longer building lld, also removed conflict with llvm-libs

Lone_Wolf commented on 2020-10-19 12:41

Investigated further and this is indeed related with llvm libunwind.

keeping the libunwind files allows build to continue but gives runtime errors.

Adding libunwind to projects requires adding libcxx which requires libcxxabi.

That means atleast 3 extra llvm parts to build, none of which are in repos.

The error originates in lld . lld needs which is the reason this package conflicts with repo llvm-libs .

I'm now testing build / run without lld, but doing that would mean this package will need to use repo lld at runtime and no longer provide a full llvm develop environment.

Lone_Wolf commented on 2020-10-10 14:57

toki1990, error confirmed to also appear on uptodate archlinux system.

I've done some searching and it looks like lld build expects to be able to use llvm libunwind implementation , not the gnu libunwind used on archlinux . may be related. Not sure yet how to solve this.

toki1990 commented on 2020-10-09 17:53

warn("Container node skipped: type={0}".format(mdnode.t)) [6444/7329] Building CXX object tools/.../lldMachO2.dir/UnwindInfoSection.cpp.o FAILED: tools/lld/MachO/CMakeFiles/lldMachO2.dir/UnwindInfoSection.cpp.o /usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/lld/MachO -I/home/user/temp/llvm-git/src/llvm-project/lld/MachO -I/home/user/temp/llvm-git/src/llvm-project/lld/include -Itools/lld/include -Iinclude -I/home/user/temp/llvm-git/src/llvm-project/llvm/include -I/home/user/temp/llvm-git/src/llvm-project/llvm/../libunwind/include -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -std=c++14 -MD -MT tools/lld/MachO/CMakeFiles/lldMachO2.dir/UnwindInfoSection.cpp.o -MF tools/lld/MachO/CMakeFiles/lldMachO2.dir/UnwindInfoSection.cpp.o.d -o tools/lld/MachO/CMakeFiles/lldMachO2.dir/UnwindInfoSection.cpp.o -c /home/user/temp/llvm-git/src/llvm-project/lld/MachO/UnwindInfoSection.cpp In file included from /home/user/temp/llvm-git/src/llvm-project/lld/MachO/UnwindInfoSection.cpp:9: /home/user/temp/llvm-git/src/llvm-project/lld/MachO/UnwindInfoSection.h:15:10: fatal error: mach-o/compact_unwind_encoding.h: No such file or directory 15 | #include "mach-o/compact_unwind_encoding.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. [6461/7329] Building CXX object tools/...les/lldELF.dir/SyntheticSections.cpp.o ninja: build stopped: subcommand failed. ==> ERROR: A failure occurred in build(). Aborting...

tried on new installed full updated manjaro testing branch.

shoober420 commented on 2020-08-22 15:19

I don’t see llvm-libs-svn in the AUR anywhere. Even if it did exist in 2015, it doesn’t make any sense to me to leave it in there. So lordheavy’s version of llvm-libs-git is meant to allow multiple installations? I see, well that’s kind of wacky. That explains everything then. He could at least gave it a different name to avoid confusion like you do with your “minimal” package. I’m just going to use official llvm builds and keep it simple.

Lone_Wolf commented on 2020-08-22 14:18

  • Guess I should have clarified what I meant with package structure

    • llvm/clang from repo has
      • llvm
      • llvm-libs
      • llvm-ocaml
      • clang
      • compiler-rt
    • AUR llvm-git has
      • llvm-git
      • llvm-libs-git
      • llvm-ocaml-git
      • does provide clang-git, compiler-rt-git, lld-git, lldb-git and polly-git in llvm-git
    • LH llvm-git has
      • llvm-git
      • llvm-libs-git
      • llvm-ocaml-git
      • clang-git
      • compiler-rt-git
  • To get in touch with Lordheavy about things related to his mesa-git repo, try posting in .

  • LordHeavy introduced llvm-libs specfically to allow multiple llvm versions to coexist.

    • Most parts from llvm needed at runtime are versioned, but the linker isn't .
    • Lordheavy llvm-libs-git doesn't include the git version of the linker, aur llvm-libs-git DOES.
    • Kerberizer who maintained llvm-svn for years always felt that an llvm/clang vcs version should provide a full environment including the linker and I have stuck to that.

Aur llvm-libs-svn has conflicted with llvm-libs since (atleast) 2nd half of 2015 and aur llvm-libs-git continues that. LH llvm-libs-git and llvm-libs-svn before that never conflicted with llvm-libs.

shoober420 commented on 2020-08-22 13:25

The package structure differs enough between the official llvm package and lordheavy’s, mainly being that the official PKGBUILD ( doesn’t include a provides= and conflicts= section. It shouldn’t anyway since it’s an official repo package, most official repo packages don’t include these sections (harfbuzz and freetype2 are the only that come to mind) Anyway, saying they are the same structure is a stretch, considering “llvm-libs-svn” isn’t even a thing.