From bd78b8fca66fb33b53c5086c42fe73d3f84b8dbc Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 2 Oct 2023 07:11:38 +0000 Subject: [PATCH] eclass/llvm: Sync with Gentoo It's from Gentoo commit 59d389e33aef580b4d5ae2aa9acde86dc0081042. --- .../src/third_party/portage-stable/eclass/llvm.eclass | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sdk_container/src/third_party/portage-stable/eclass/llvm.eclass b/sdk_container/src/third_party/portage-stable/eclass/llvm.eclass index 8198650aad..57faa48819 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/llvm.eclass +++ b/sdk_container/src/third_party/portage-stable/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] [] # @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}")