summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* llvm-utils.eclass: Split out PATH prepending logicMichał Górny2024-02-101-24/+1
| | | | | | | Split the logic prepending PATH from pkg_setup() into a dedicated llvm_prepend_path() function. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm-utils.eclass: Introduce an eclass for common helpersMichał Górny2024-02-101-89/+3
| | | | | | | | Move some reusable functions from llvm.eclass to llvm-utils.eclass. This is with minimal modifications so far (only argument checks were cleaned up). Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Allow LLVM 19Michał Górny2024-01-241-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: add tuple -> LLVM_TARGETS translate functionMatoro Mahri2023-12-071-0/+31
| | | | | | | | | | To be used in support of dev-lang/rust under crossdev. Cross-compiled rust needs LLVM with support for both host and destination targets. Bug: https://bugs.gentoo.org/680652 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Closes: https://github.com/gentoo/gentoo/pull/33996 Signed-off-by: Sam James <sam@gentoo.org>
* llvm.eclass: add option to skip llvm_pkg_setupAlexey Sokolov2023-09-271-0/+11
| | | | | | | | | To be used during prefix bootstrap using LLVM toolchain. Without this, several LLVM packages don't build. Bug: https://bugs.gentoo.org/758167 Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: fix _LLVM_KNOWN_SLOTS for LLVM 18Sam James2023-07-261-1/+1
| | | | | | Thanks to vimproved for reporting. Signed-off-by: Sam James <sam@gentoo.org>
* llvm.eclass: export LLVM_CONFIG if not cross-compilingSam James2023-06-151-0/+6
| | | | | | | | | | Set LLVM_CONFIG to help Meson (bug #907965) but only do it for empty ESYSROOT (as a proxy for "are we cross-compiling?"). Closes: https://bugs.gentoo.org/907965 Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/31429 Signed-off-by: Sam James <sam@gentoo.org>
* llvm.eclass: Allow LLVM 17Michał Górny2023-02-031-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: canonicalize eclass structureDavid Seifert2022-12-271-4/+4
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* llvm.eclass: Remove EAPI 6Michał Górny2022-12-241-35/+8
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Set LLVM_SLOT in pkg_setup()Michał Górny2022-12-081-17/+35
| | | | | | | | | | | Set LLVM_SLOT in pkg_setup() to the selected LLVM slot, for inspection from the package. For example, it can be used to easily compare the version number. Split get_llvm_slot() out of get_llvm_prefix() to factor out the common code. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Fix LLVM tool paths to prevent overriding themMichał Górny2022-10-191-0/+27
| | | | | | | | | | | Fix the LLVM tool path in variables such as AR, LD, etc. to their current locations prior to manipulating PATH, in order to prevent llvm.eclass from overriding them. Otherwise, a package requiring older LLVM libraries could force older tool versions, possibly incompatible with the object files produced by a newer clang version. Closes: https://github.com/gentoo/gentoo/pull/27803 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Fix CC/CXX version to prevent the eclass overriding itMichał Górny2022-10-191-0/+36
| | | | | | | | | | | Fix the clang executable in CC, CPP and CXX variables to include the version number, in order to prevent the PATH manipulations done by llvm.eclass from overriding the compiler. Otherwise, a package requiring older LLVM libraries could cause an older compiler version being used, effectively resulting in a system built by mixed set of clang versions. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Allow slot 16Michał Górny2022-07-281-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* *.eclass: @ECLASS-VARIABLE renamed to @ECLASS_VARIABLEUlrich Müller2022-03-241-2/+2
| | | | | Bug: https://bugs.gentoo.org/835396 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* llvm.eclass: enable EAPI 8Stephan Hartmann2022-02-141-2/+2
| | | | Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
* llvm.eclass: Allow slot 15Michał Górny2022-02-061-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Allow slot 14Michał Górny2021-07-301-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/llvm.eclass: clarify error messageGeorgy Yakovlev2021-04-271-1/+1
| | | | | | | llvm_check_deps() may return false even if slot found, but use requirements are not satisfied. Mention it. Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
* llvm.eclass: modernise Clang versions in exampleSam James2021-04-101-7/+7
| | | | | | | | We're already regenerating cache for the cmake-utils reference in the documentation, so let's refresh the Clang versions in the example while we're here. Signed-off-by: Sam James <sam@gentoo.org>
* llvm.eclass: drop cmake-utils referencesSam James2021-04-101-2/+2
| | | | | | | May be confusing as cmake-utils is deprecated and we're now using just the cmake eclass. Signed-off-by: Sam James <sam@gentoo.org>
* llvm.eclass: Support LLVM 13Michał Górny2021-02-201-2/+2
| | | | | Closes: https://bugs.gentoo.org/771699 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Add 12 to known slotsMichał Górny2020-07-151-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Fix prepending LLVM path before system pathsMichał Górny2020-05-281-2/+23
| | | | | | | | | Do not prepend LLVM path before system path, in particular before ccache/distcc paths. Instead, prepend it before the first LLVM version found in PATH, or append to the end if no LLVM is found in PATH. Closes: https://bugs.gentoo.org/627726 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Remove remnants of slot :0 supportMichał Górny2020-05-281-13/+5
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Remove old slotsMichał Górny2020-05-011-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* */*: Bump copyright on files touched this yearMichał Górny2020-02-111-1/+1
| | | | | | | Update the copyright notice on all files that were touched since January 1st but did not have the notice updated. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Permit LLVM 11Michał Górny2020-01-251-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Permit slot 10Michał Górny2019-07-201-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Update @SUPPORTED_EAPISMichał Górny2019-05-241-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Enable EAPI 7Michał Górny2019-05-241-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Add EAPI 7 API to get_llvm_prefixMichał Górny2019-05-241-6/+45
| | | | | | | | | | Add two switches to get_llvm_prefix(), '-b' and '-d' to enable use of LLVM API cross support. '-b' is intended to be used whenever prefix to CBUILD llvm-config is needed, and '-d' (the default) is intended to be used whenever prefix to CHOST bindir is needed (to find CMake modules). Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Update examples for newer LLVM versionsMichał Górny2019-05-241-6/+8
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Remove unnecessary '_rc' from < exampleMichał Górny2019-05-241-1/+1
| | | | | | | Since LLVM versions use three components, 'x.0.0_rcN' will be always greater than 'x'. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: Allow slot 9Michał Górny2019-01-181-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.eclass: add @SUPPORTED_EAPISMichał Górny2018-08-151-0/+1
|
* llvm.eclass: Add LLVM 8 awarenessMichał Górny2018-08-021-1/+1
|
* llvm.eclass: Support slot 7Michał Górny2018-01-041-2/+2
|
* llvm.eclass: Do not prepend /usr/bin to PATH, #622866Michał Górny2017-08-121-1/+7
|
* llvm.eclass: Support checking LLVM deps via llvm_check_deps()Michał Górny2017-08-121-15/+45
| | | | | | | | Introduce the support for llvm_check_deps() function to override the default LLVM slot acceptance test (checking whether sys-devel/llvm is installed). This can be used to match more complex dependency specifications, e.g. to find a LLVM slot that has a matching clang version, or to request USE dependencies on LLVM or clang.
* llvm.eclass: Check for installed package rather than executableMichał Górny2017-08-121-7/+6
| | | | | | | | | Ensure that a specific LLVM slot is installed via using has_version on "sys-devel/llvm:${SLOT}" rather than checking whether llvm-config is installed in expected location. While it is a bit slower, this is closer to a canonical way of testing it and will be useful when we allow testing for more specific dependency strings. Right now, it could be helpful if one has broken LLVM installation (i.e. stray files).
* llvm.eclass: Recognize slot 6 (for 9999)Michał Górny2017-07-241-1/+1
|
* Drop $Id$ per council decision in bug #611234.Robin H. Johnson2017-02-281-1/+0
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* llvm.eclass: An eclass to handle dependencies on slotted LLVMMichał Górny2017-02-151-0/+139
Introduce an eclass to support dependencies building against slotted LLVM. It provides a function to find the newest installed LLVM version that is not newer than the max supported slot, and a trivial pkg_setup() implementation that adds executable directory of this install to PATH. This ensures that: a) build systems will find the correct llvm-config and use it to use the correct version of LLVM, b) CMake's find_package() will find the correct LLVMConfig / ClangConfig files.