diff options
author | Alexey Sokolov <alexey+gentoo@asokolov.org> | 2023-09-15 08:29:55 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-09-27 11:12:32 +0200 |
commit | 59d389e33aef580b4d5ae2aa9acde86dc0081042 (patch) | |
tree | 62fac778a1c67f3af49bc06b4821c475dbe9f0dc /eclass | |
parent | dev-python/cffi: Bump to 1.16.0_rc2 (diff) | |
download | gentoo-59d389e33aef580b4d5ae2aa9acde86dc0081042.tar.gz gentoo-59d389e33aef580b4d5ae2aa9acde86dc0081042.tar.bz2 gentoo-59d389e33aef580b4d5ae2aa9acde86dc0081042.zip |
llvm.eclass: add option to skip llvm_pkg_setup
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>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/llvm.eclass | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass index 8198650aad9a..57faa48819db 100644 --- a/eclass/llvm.eclass +++ b/eclass/llvm.eclass @@ -80,6 +80,13 @@ DEPEND="!!sys-devel/llvm:0" # Correct values of LLVM slots, newest first. declare -g -r _LLVM_KNOWN_SLOTS=( {18..8} ) +# @ECLASS_VARIABLE: LLVM_ECLASS_SKIP_PKG_SETUP +# @INTERNAL +# @DESCRIPTION: +# If set to a non-empty value, llvm_pkg_setup will not perform LLVM version +# check, nor set PATH. Useful for bootstrap-prefix.sh, where AppleClang has +# unparseable version numbers, which are irrelevant anyway. + # @FUNCTION: get_llvm_slot # @USAGE: [-b|-d] [<max_slot>] # @DESCRIPTION: @@ -242,6 +249,10 @@ llvm_fix_tool_path() { llvm_pkg_setup() { debug-print-function ${FUNCNAME} "${@}" + if [[ ${LLVM_ECLASS_SKIP_PKG_SETUP} ]]; then + return + fi + if [[ ${MERGE_TYPE} != binary ]]; then LLVM_SLOT=$(get_llvm_slot "${LLVM_MAX_SLOT}") |