Please update the ebuilds for it to accept either Clang/LLVM-15 or 16, instead of only 15 (or 15 or 14, in case of the esr version).
You can modify the ebuilds in a local overlay to try it out, but it will be a while before that change comes to ::gentoo Check out the discussion in Bug 872578
there is no hurries, rust will not make the llvm-16 switch before 1.70 ; it landed in nightly a week ago but was swiftly reverted.
So you could have support for clang:16 & llvm:16 when -clang use flag is selected, but it'll make the ebuild so complicated I'm getting weird errors like "error: /var/tmp/portage/www-client/firefox-112.0/work/firefox_build/browser/app/nsBrowserApp.o: Unknown attribute kind (86) (Producer: 'LLVM16.0.1' Reader: 'LLVM 15.0.7')" since both clang:15 and clang:16 are now installed. I'd rather update the whole stack when rust has support for llvm:16. I tried with something like this (typing out of memory): || ( ( sys-devel/clang:15 sys-devel/llvm:15 clang? ( || ( sys-devel/lld:15 sys-devel/mold ) virtual/rust:0/llvm-15 pgo? ( =sys-libs/compiler-rt-sanitizers-15*[profile] ) ) ) ( sys-devel/clang:16 sys-devel/llvm:16 clang? ( || ( sys-devel/lld:15 sys-devel/mold ) virtual/rust:0/llvm-15 pgo? ( =sys-libs/compiler-rt-sanitizers-15*[profile] ) ) ) ) but portage automation can't seem to be able to deal with it. Maybe the logic is wrong too, especially with lto. I'm starting to become blind for it, maybe better to take a new look tomorrow. Let me know if you spot some error that could be enhanced so it works in every case.
There is a known issue w/ building mozilla products with clang-16 and LTO/PGO enabled. Even if gentoo were to support clang-16 officially with firefox, it would have to either disable LTO/PGO or disable the release flag for mozilla products https://github.com/llvm/llvm-project/issues/58776
there is at least one serious issue with using llvm-16: https://github.com/llvm/llvm-project/issues/61932
[09:42:27] <+sam_> fyi: https://bugzilla.mozilla.org/show_bug.cgi?id=1831242 https://github.com/rust-lang/rust/issues/111229 https://github.com/llvm/llvm-project/issues/58776#issuecomment-1535653476 [09:42:40] <+sam_> firefox won't work with llvm 16 yet [09:42:55] <+sam_> there's both ff UB + a rust bug involved [09:42:58] <+sam_> gyakovlev: ^
There is hope. I have been compiling rust and firefox with llvm/clang/lld-16 for a while now. The compiling part worked fine, but there have been runtime problems (tabs crashing). I just tried firefox-114.0_beta7 and the crashes seem to have gone away :)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f2975c5f586e53bcc33b09cde86c08c272d527c commit 0f2975c5f586e53bcc33b09cde86c08c272d527c Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-06-02 16:14:24 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-06-02 16:15:53 +0000 www-client/firefox: enable clang-16 support via rust:0/llvm-16 on 113 Bug: https://bugs.gentoo.org/903061 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/firefox-113.0.2.ebuild | 34 +++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd7cdb71cb19aae6a72a538dc209b7e9cf5107ad commit cd7cdb71cb19aae6a72a538dc209b7e9cf5107ad Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-06-02 18:58:38 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-06-02 18:59:55 +0000 Revert "www-client/firefox: enable clang-16 support via rust:0/llv..." This reverts commit 0f2975c5f586e53bcc33b09cde86c08c272d527c. - "-clang" might be broken and there are runtime issues with llvm:16. Bug: https://bugs.gentoo.org/903061 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/firefox-113.0.2.ebuild | 34 ++++++++----------------------- 1 file changed, 9 insertions(+), 25 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bca7c74a7cbf5d9a8dc14d73c7ef148d6615ab43 commit bca7c74a7cbf5d9a8dc14d73c7ef148d6615ab43 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-06-03 06:07:41 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-06-03 06:09:04 +0000 www-client/firefox: enable llvm-16 support via rust:0/llvm-16 on 113 - another take with upstream llvm-16 patch added. Bug: https://bugs.gentoo.org/903061 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/Manifest | 1 + www-client/firefox/firefox-113.0.2.ebuild | 36 ++++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 10 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5448a004c202c6bd69f3999db480a17537d9a8f commit b5448a004c202c6bd69f3999db480a17537d9a8f Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-07-19 07:45:41 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-07-19 07:48:06 +0000 www-client/firefox: add 115.0.3 - note: this is the ESR version. - a great opportunity to push 115-esr into the tree as 115.0.3 only contains Windows-related fixes. This allows syncing 115+:rapid and 115+:esr in the tree when going forward for any ebuild-related updates. - pushed as unkeyworded because this is still a testing version. Keywords will be added when Mozilla encourages esr users to update from 102 into 115. The next major ESR, 115.1.0, will be package.masked. Closes: https://bugs.gentoo.org/903061 Closes: https://bugs.gentoo.org/908992 Closes: https://bugs.gentoo.org/907963 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/Manifest | 101 +++ www-client/firefox/firefox-115.0.3.ebuild | 1406 +++++++++++++++++++++++++++++ 2 files changed, 1507 insertions(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bba0a47da9dca26c21b25639f063b328d450ec9d commit bba0a47da9dca26c21b25639f063b328d450ec9d Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-07-20 13:44:08 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-07-20 13:46:37 +0000 www-client/firefox: bump LLVM compatibility to 16 on 102esr Closes: https://bugs.gentoo.org/903061 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/firefox-102.13.0.ebuild | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)