All Projects → arch-llvm → llvm-svn

arch-llvm / llvm-svn

Licence: other
Arch Linux PKGBUILD for LLVM, Clang et al. (latest SVN code)

Programming Languages

shell
77523 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to llvm-svn

Bsodsurvivor
This project aims to facilitate debugging a kernel driver in windows by adding support for a code change on the fly without reboot/unload, and more!
Stars: ✭ 122 (+577.78%)
Mutual labels:  llvm, clang, lldb
lldbg
A lightweight native GUI for LLDB.
Stars: ✭ 83 (+361.11%)
Mutual labels:  llvm, clang, lldb
Swiftweekly.github.io
A community-driven weekly newsletter about Swift.org
Stars: ✭ 305 (+1594.44%)
Mutual labels:  llvm, clang, lldb
clangbuilder
Building Clang ♡ Utility and Environment
Stars: ✭ 101 (+461.11%)
Mutual labels:  llvm, clang, lldb
Avalonstudio
Cross platform IDE and Shell
Stars: ✭ 1,132 (+6188.89%)
Mutual labels:  llvm, arch-linux, clang
Chromium Clang
Chromium browser compiled with the Clang/LLVM compiler.
Stars: ✭ 77 (+327.78%)
Mutual labels:  llvm, clang, lld
CFI-LB
Adaptive Callsite-sensitive Control Flow Integrity - EuroS&P'19
Stars: ✭ 13 (-27.78%)
Mutual labels:  llvm, clang
CastXMLSuperbuild
Build CastXML and its dependencies (LLVM/Clang)
Stars: ✭ 32 (+77.78%)
Mutual labels:  llvm, clang
llvm-project-prepo
Fork of LLVM with modifications to support a program repository
Stars: ✭ 27 (+50%)
Mutual labels:  llvm, clang
PKGBUILD
PKGBUILDs; almost all on the AUR
Stars: ✭ 16 (-11.11%)
Mutual labels:  aur, pkgbuild
opencilk-project
Monorepo for the OpenCilk compiler, forked from llvm/llvm-project. See the OpenCilk/infrastructure repository for build and installation instructions.
Stars: ✭ 42 (+133.33%)
Mutual labels:  llvm, clang
core-review
Scripts, tools & info for doing Bitcoin Core development and code review
Stars: ✭ 78 (+333.33%)
Mutual labels:  clang, lldb
notion-repackaged
notion executables with the notion-enhancer embedded & a vanilla port of the official app to linux
Stars: ✭ 733 (+3972.22%)
Mutual labels:  aur, arch-linux
open-ops
Open Optimizing Parallelizing System
Stars: ✭ 21 (+16.67%)
Mutual labels:  llvm, clang
proton-clang-build
A set of scripts to build optimized LLVM and binutils toolchains. See https://github.com/kdrag0n/proton-clang for prebuilts.
Stars: ✭ 30 (+66.67%)
Mutual labels:  llvm, clang
raspi-dashboard
Arch Linux based fullscreen web display
Stars: ✭ 27 (+50%)
Mutual labels:  arch-linux, pkgbuild
systemc-compiler
This tool translates synthesizable SystemC code to synthesizable SystemVerilog.
Stars: ✭ 128 (+611.11%)
Mutual labels:  llvm, clang
efi-clang
Build UEFI applications with the Clang compiler and LLD linker.
Stars: ✭ 40 (+122.22%)
Mutual labels:  clang, lld
lsif-clang
Language Server Indexing Format (LSIF) generator for C, C++ and Objective C
Stars: ✭ 28 (+55.56%)
Mutual labels:  llvm, clang
wasm-toolchain
WebAssembly toolchain
Stars: ✭ 34 (+88.89%)
Mutual labels:  llvm, clang

llvm-svn

This is an Arch Linux PKGBUILD for the LLVM compiler infrastructure, the Clang frontend, and the various tools associated with it. It's available in the Arch User Repository as llvm-svn.

Main development is in the master branch, while the AUR git repo is mirrored by the aur branch.

IMPORTANT INFORMATION

PLEASE READ THIS ONE CAREFULLY

This is a fairly complex package. The only recommended and supported method of building is in a clean chroot as described on the Arch Wiki. A crude example is also provided further below. The use of AUR helpers (yaourt, pacaur, etc.) in particular is discouraged; it may or may not work for you.

Also, unlike the official packages, which provide the latest stable releases, this one builds the code straight from the SVN source repository, where development is constantly taking place. Thus, it brings all the latest bells and whistles, but also tends to bring and all the latest bugs. It is therefore strongly recommended to use this LLVM/Clang build only for testing. Use in production should only be reserved for cases where you do need a particular feature (or a fix for some bug), which are not yet available in the stable releases.

On failing regression tests

Note that failing regression tests do not necessarily indicate a problem with the package. Such failures are fairly normal for an actively developed code (i.e. SVN trunk or Git master). If this happens, wait for some time before trying the build again: a few hours to a day or two at most should be enough. If you desperately need the package built right away, you may also comment out the make check and make check-clang lines or append || true to them, but do this only if you really know what you're doing and why.

Binary packages

Pre-built, binary packages are available from two unofficial repositories:

  • lordheavy's mesa-git, which may be particularly useful for those who need LLVM solely as a Mesa dependency. Note that the packages are built against the [testing] repos. lordheavy is an Arch Linux developer and trusted user (TU).

  • kerberizer's llvm-svn, which is automatically rebuilt every 6 hours from this PKGBUILD and the latest SVN code. The packages are built against the [core/extra] repos. kerberizer is the current maintainer.

Both repos provide x86_64 and multilib packages. kerberizer's repo is also PGP signed.

Signature "unknown trust" error

For PGP signed unofficial repositories to work correctly their signing key needs to be added to Pacman's keyring. The process is described here. For the llvm-svn repo in particular, it boils down to:

  1. Fetch the necessary key from a keyserver:
# pacman-key -r 0x76563F75679E4525
  1. Verify the key fingerprint; it must be exactly D16C F22D 27D1 091A 841C 4BE9 7656 3F75 679E 4525:
$ pacman-key -f 0x76563F75679E4525
  1. If the fingerprint matches, sign the key locally:
# pacman-key --lsign-key 0x76563F75679E4525

If using LLVM as Mesa dependency

You may find helpful the topic "mesa-git - latest videodrivers & issues" on the Arch Linux forums.

Building in a clean chroot example

If you need a more detailed and specific example on how to build this package in a clean chroot, a crude excerpt from the build script of the kerberizer's binary repo is presented here. You can also check the full script.

It is meant to allow building lib32-llvm-svn too, hence why gcc-multilib is used. The code takes advantage of multiple cores when building and compressing; the example here is tailored to an 8-core/threads system. The user's ccache cache is utilised as well, so frequent rebuilds can be much faster. If you don't sign your packages, omit the lines mentioning PACKAGER and GPGKEY, otherwise they need to be set correctly. The chroot (${x86_64_chroot}) is best set up in /tmp, but this requires a lot of RAM (most likely at least 32 GB, since /tmp is by default half the size of the physical RAM detected); second best solution is on an SSD. The latter goes for ~/.ccache as well. Note that the latest versions of systemd mount /tmp with the nosuid flag. You need to turn this flag off before building on /tmp, or else the build will fail.

cd /path/to/where/llvm-svn/is/cloned

x86_64_chroot="/chroot/x86_64"

sudo mkdir -p "${x86_64_chroot}/root"

sudo /usr/bin/mkarchroot \
    -C /usr/share/devtools/pacman-multilib.conf \
    -M /usr/share/devtools/makepkg-x86_64.conf \
    -c /var/cache/pacman/pkg \
    "${x86_64_chroot}/root" \
    base-devel ccache

sudo /usr/bin/arch-nspawn "${x86_64_chroot}/root" /bin/bash -c "yes | pacman -Sy gcc-multilib"

sudo /usr/bin/arch-nspawn "${x86_64_chroot}/root" /bin/bash -c \
    "echo -e \"CCACHE_DIR='/.ccache'\nXZ_DEFAULTS='--threads=8'\" >>/etc/environment ; \
     sed \
        -e 's/^#MAKEFLAGS=.*$/MAKEFLAGS=\"-j9\"/' \
        -e '/^BUILDENV=/s/\!ccache/ccache/' \
        -e 's/^#PACKAGER=.*$/PACKAGER=\"Some One <[email protected]>\"/' \
        -e 's/^#GPGKEY=.*$/GPGKEY=\"0x0000000000000000\"/' \
        -i /etc/makepkg.conf"

sudo /usr/bin/makechrootpkg -c -d ~/.ccache:/.ccache -r "${x86_64_chroot}"

It's advisable to always start this from scratch, i.e. don't reuse the old chroot, but create it anew for each build (it uses the local pacman cache, so doesn't waste bandwidth, and if located in /tmp or on an SSD, is pretty fast).

Bugs

  • When an older or generally different version of llvm-ocaml{,-svn} is installed on the build system, the build would likely fail with inconsistent assumptions over interface errors. The PKGBUILD will detect such situation and spit out an appropriate suggestion: namely, to either uninstall any currently installed llvm-ocaml* package before building, or, preferably, to build in a clean chroot, as described on the Arch Linux wiki.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].