LLVM.ORG.ECLASS

Section: eclass-manpages (5)
Updated: Oct 2021
Index Return to Main Contents

NAME

llvm.org.eclass - Common bits for fetching & unpacking llvm.org projects

DESCRIPTION

The llvm.org eclass provides common code to fetch and unpack parts of the llvm.org project tree. It takes care of handling both git checkouts and source tarballs, making it possible to unify the code of live and release ebuilds and effectively reduce the work needed to package new releases/RCs/branches.

In order to use this eclass, the ebuild needs to declare LLVM_COMPONENTS and then call llvm.org_set_globals. If tests require additional components, they need to be listed in LLVM_TEST_COMPONENTS. The eclass exports an implementation of src_unpack() phase.

Example:

inherit llvm.org

LLVM_COMPONENTS=( lld )
LLVM_TEST_COMPONENTS=( llvm/utils/lit )
llvm.org_set_globals

SUPPORTED EAPIS

7 8

FUNCTIONS

llvm.org_set_globals
Set global variables. This must be called after setting LLVM_* variables used by the eclass.
llvm.org_src_unpack
Unpack or checkout requested LLVM components.
llvm.org_src_prepare
Call appropriate src_prepare (cmake or default) depending on inherited eclasses. Make sure that PATCHES and user patches are applied in top ${WORKDIR}, so that patches straight from llvm-project repository work correctly with -p1.
get_lit_flags
Get the standard recommended lit flags for running tests, in CMake list form (;-separated).
llvm_are_manpages_built
Return true (0) if manpages are going to be built from source, false (1) if preinstalled manpages will be used.
llvm_install_manpages
Install pregenerated manpages if available. No-op otherwise.

ECLASS VARIABLES

LLVM_COMPONENTS (REQUIRED)
List of components needed unconditionally. Specified as bash array with paths relative to llvm-project git. Automatically translated for tarball releases.

The first path specified is used to construct default S.

LLVM_TEST_COMPONENTS
List of additional components needed for tests.
LLVM_MANPAGES
Set to 'build', include the dependency on dev-python/sphinx to build the manpages. If set to 'pregenerated', fetch and install pregenerated manpages from the archive.
LLVM_PATCHSET
LLVM patchset version. No patchset is used if unset.
LLVM_USE_TARGETS
Add LLVM_TARGETS flags. The following values are supported:

- provide - this package provides LLVM targets. USE flags
  and REQUIRED_USE will be added but no dependencies.

- llvm - this package uses targets from LLVM. RDEPEND+DEPEND
  on matching sys-devel/llvm versions with requested flags will
  be added.

Note that you still need to pass enabled targets to the build system, usually grabbing them from ${LLVM_TARGETS} (via USE_EXPAND).

ALL_LLVM_EXPERIMENTAL_TARGETS (GENERATED BY ECLASS)
The complete list of LLVM experimental targets available in this LLVM version. The value depends on ${PV}.
ALL_LLVM_PRODUCTION_TARGETS (GENERATED BY ECLASS)
The complete list of LLVM production-ready targets available in this LLVM version. The value depends on ${PV}.
ALL_LLVM_TARGET_FLAGS (GENERATED BY ECLASS)
The list of USE flags corresponding to all LLVM targets in this LLVM version. The value depends on ${PV}.
LIT_JOBS (USER VARIABLE)
Number of test jobs to run simultaneously. If unset, defaults to '-j' in MAKEOPTS. If that is not found, default to nproc.

AUTHORS

Micha[u0142] G[u00F3]rny <mgorny@gentoo.org>

MAINTAINERS

Micha[u0142] G[u00F3]rny <mgorny@gentoo.org>

REPORTING BUGS

Please report bugs via https://bugs.gentoo.org/

FILES

llvm.org.eclass

SEE ALSO

ebuild(5)
https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/llvm.org.eclass


Index

NAME
DESCRIPTION
SUPPORTED EAPIS
FUNCTIONS
ECLASS VARIABLES
AUTHORS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:27:01 GMT, October 16, 2021