summaryrefslogtreecommitdiff
path: root/llvm-runtimes/clang-stdlib-config/clang-stdlib-config-20.ebuild
diff options
context:
space:
mode:
authorMichal Rostecki <vadorovsky@protonmail.com>2025-08-27 05:39:24 +0200
committerMichał Górny <mgorny@gentoo.org>2025-09-02 15:17:43 +0200
commit623eab3fa38910ce605108380d23617bf9a0183b (patch)
tree3e3d811cddc5407814477a49d3d8d484a066911e /llvm-runtimes/clang-stdlib-config/clang-stdlib-config-20.ebuild
parent687e64f1549066f23bd8d744d554b626423aa7fe (diff)
downloadgentoo-623eab3fa38910ce605108380d23617bf9a0183b.tar.gz
gentoo-623eab3fa38910ce605108380d23617bf9a0183b.tar.bz2
gentoo-623eab3fa38910ce605108380d23617bf9a0183b.zip
llvm-runtimes/clang-stdlib-config: New package
Provide a new package which creates a partial clang config file `/etc/clang/${LLVM_VERSION}/gentoo-stdlib.cfg`, used to control the default C++ standard library used by clang. Signed-off-by: Michal Rostecki <vadorovsky@protonmail.com> Closes: https://bugs.gentoo.org/951445 Part-of: https://github.com/gentoo/gentoo/pull/42663 Signed-off-by: Michał Górny <mgorny@gentoo.org> Part-of: https://github.com/gentoo/gentoo/pull/42663 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'llvm-runtimes/clang-stdlib-config/clang-stdlib-config-20.ebuild')
-rw-r--r--llvm-runtimes/clang-stdlib-config/clang-stdlib-config-20.ebuild28
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm-runtimes/clang-stdlib-config/clang-stdlib-config-20.ebuild b/llvm-runtimes/clang-stdlib-config/clang-stdlib-config-20.ebuild
new file mode 100644
index 000000000000..5b6630587a07
--- /dev/null
+++ b/llvm-runtimes/clang-stdlib-config/clang-stdlib-config-20.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Default C++ library configuration for clang"
+HOMEPAGE="https://clang.llvm.org/"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="default-libcxx"
+
+RDEPEND="
+ default-libcxx? ( >=llvm-runtimes/libcxx-${PV}[static-libs] )
+ !default-libcxx? ( sys-devel/gcc )
+"
+
+src_install() {
+ insinto "/etc/clang/${SLOT}"
+ newins - gentoo-stdlib.cfg <<-EOF
+ # This file is initially generated by ${CATEGORY}/${PN}.
+ # It is used to control the default C++ standard library used by clang.
+
+ --stdlib=$(usex default-libcxx libc++ libstdc++)
+ EOF
+}