eclass/llvm: Sync with Gentoo

It's from Gentoo commit 59d389e33aef580b4d5ae2aa9acde86dc0081042.
This commit is contained in:
Flatcar Buildbot 2023-10-02 07:11:38 +00:00
parent 5d3b2a8da6
commit bd78b8fca6

View File

@ -80,6 +80,13 @@ DEPEND="!!sys-devel/llvm:0"
# Correct values of LLVM slots, newest first. # Correct values of LLVM slots, newest first.
declare -g -r _LLVM_KNOWN_SLOTS=( {18..8} ) 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 # @FUNCTION: get_llvm_slot
# @USAGE: [-b|-d] [<max_slot>] # @USAGE: [-b|-d] [<max_slot>]
# @DESCRIPTION: # @DESCRIPTION:
@ -242,6 +249,10 @@ llvm_fix_tool_path() {
llvm_pkg_setup() { llvm_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "${@}"
if [[ ${LLVM_ECLASS_SKIP_PKG_SETUP} ]]; then
return
fi
if [[ ${MERGE_TYPE} != binary ]]; then if [[ ${MERGE_TYPE} != binary ]]; then
LLVM_SLOT=$(get_llvm_slot "${LLVM_MAX_SLOT}") LLVM_SLOT=$(get_llvm_slot "${LLVM_MAX_SLOT}")