mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-11 15:06:58 +02:00
eclass/llvm-utils: Sync with Gentoo
It's from Gentoo commit b465171bf81e25c18bc6443185215e6f80838766.
This commit is contained in:
parent
a2fc6c9fa1
commit
8f6331e169
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2024 Gentoo Authors
|
# Copyright 2024-2025 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
# @ECLASS: llvm-utils.eclass
|
# @ECLASS: llvm-utils.eclass
|
||||||
@ -171,4 +171,19 @@ llvm_prepend_path() {
|
|||||||
export PATH=${new_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
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user