Commit Graph

13 Commits

Author SHA1 Message Date
Itai Ferber
0591ece77d dev-lang/swift: update LLVM_COMPAT
Updates LLVM_COMPAT to allow building Swift 6 with LLVM/Clang 22, and
reintroduces a `libcxx` USE flag to allow dropping a hard dependency on
GCC <16 on systems that don't want to use it.

Swift 5.10 does not build with Clang 22.

Signed-off-by: Itai Ferber <itai@itaiferber.net>
2026-07-02 06:28:31 -04:00
Itai Ferber
80fbc4c2ac dev-lang/swift: backport patch for linux/scc.h
Backports an upstream patch for building LLVM sanitizers on systems
where `<linux/scc.h>` is no longer present.

Signed-off-by: Itai Ferber <itai@itaiferber.net>
2026-07-02 06:28:31 -04:00
Itai Ferber
0caf226210 dev-lang/swift: fix builds with GCC 16 present
Swift defaults to building against GCC's libstdc++ runtime, but GCC 16's
headers can only be parsed by Clang 22 and later. Swift's LLVM will pick
up on the newest headers available on disk, which means that even if GCC
16 is simply installed on the build machine, Swift will fail to build.
Depending on GCC <16 and explicitly setting `--gcc-install-dir` allows
the right headers to be picked up.

Closes: https://bugs.gentoo.org/974722
Signed-off-by: Itai Ferber <itai@itaiferber.net>
2026-07-02 06:28:31 -04:00
Katalin Rebhan
731832ced0 dev-lang/swift: remove #include <linux/scc.h>
This header was removed recently (looks like with Linux 7.1).
Remove the usage for it in libsanitizer so that it builds again.

See https://github.com/llvm/llvm-project/issues/194110.

Signed-off-by: Katalin Rebhan <me@dblsaiko.net>
2026-07-01 02:57:40 +02:00
Itai Ferber
3af0aa6d14 dev-lang/swift: fix ebuild local var name
d201619d3 introduced a check for a Swift compiler to use for
bootstrapping Swift 6, but typo'd the variable name used in one case.
This only affected in-place upgrades with no other Swift version
installed, so wasn't caught in testing.

Signed-off-by: Itai Ferber <itai@itaiferber.net>
2026-06-09 18:27:43 -04:00
Itai Ferber
f8324fb859 dev-lang/swift: update python_gen_cond_dep
When `PYTHON_COMPAT` was updated to support `python3_14`,
`python_gen_cond_dep` wasn't also updated; since we're not trying to
filter Python versions beyond `PYTHON_COMPAT`, we don't actually need to
pass anything in.

Signed-off-by: Itai Ferber <itai@itaiferber.net>
2026-06-06 09:10:09 -04:00
Itai Ferber
d201619d3d dev-lang/swift: allow building using swift-bin
swift-6* ebuilds checked for the latest installed version of
`dev-lang/swift` to build against, but we want to enable bootstrapping
from `dev-lang/swift-bin`. Instead of checking for the latest Swift
using `best_version`, we can check `eselect swift` directly.

Signed-off-by: Itai Ferber <itai@itaiferber.net>
2026-06-06 09:10:08 -04:00
Itai Ferber
2de6608e81 dev-lang/swift: ignore rm failure in postrm
The postrm() phase attempts to remove symlinks to installed Swift
versions; the `rm` invocation was missing `|| die` or `-f` to clearly
indicate what should happen on failure. (In this case, it's okay to
ignore the error and move on.)

Signed-off-by: Itai Ferber <itai@itaiferber.net>
2026-04-22 10:12:06 -04:00
Itai Ferber
712f2b61ba dev-lang/swift: fix building when dev-libs/libdispatch is present
Swift currently fails to build if `dev-libs/libdispatch` is installed
because it globally installs private `libdispatch` headers which get
unexpectedly picked up during the Swift build. Since the headers are not
expected to be present when building Swift on non-Darwin platforms, the
check for the header can be patched out.

Signed-off-by: Itai Ferber <itai@itaiferber.net>
2026-04-19 21:49:36 -04:00
David Roman
68fbddeaec */*: drop py3.11 & remove dead py impls
Part-of: https://github.com/gentoo/guru/pull/447
Closes: https://github.com/gentoo/guru/pull/447
Signed-off-by: David Roman <stkw0@disroot.org>
2026-03-10 10:54:23 +01:00
Itai Ferber
2ba91fc323 dev-lang/swift: update to llvm-r2.eclass
Signed-off-by: Itai Ferber <itai@itaiferber.net>
2026-03-06 13:48:51 -05:00
Itai Ferber
de756f6545 dev-lang/swift: update LLVM_COMPAT
Drop non-existent LLVM 15, and extend compatibility through LLVM 21.

Signed-off-by: Itai Ferber <itai@itaiferber.net>
2026-02-27 16:25:43 -05:00
Itai Ferber
53fad1e56b dev-lang/swift: add 6.2.4
Signed-off-by: Itai Ferber <itai@itaiferber.net>
2026-02-27 16:25:39 -05:00