diff options
Diffstat (limited to 'eclass/llvm-utils.eclass')
-rw-r--r-- | eclass/llvm-utils.eclass | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/eclass/llvm-utils.eclass b/eclass/llvm-utils.eclass index b105e169fbc4..abe8bb7d7d0f 100644 --- a/eclass/llvm-utils.eclass +++ b/eclass/llvm-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 2024 Gentoo Authors +# Copyright 2024-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: llvm-utils.eclass @@ -171,4 +171,19 @@ llvm_prepend_path() { export PATH=${new_path[*]} } +# @FUNCTION: llvm_cmake_use_musl +# @DESCRIPTION: +# Determine whether the given LLVM project should be built with musl +# support. That should be the case if the CTARGET (or CHOST) is a musl +# environment. +# +# If musl should be used, echo "ON", otherwise echo "OFF". +llvm_cmake_use_musl() { + if [[ "${CTARGET:-${CHOST}}" == *-*-*-musl* ]]; then + echo "ON" + else + echo "OFF" + fi +} + fi |