[PoC] sys-devel/clang: configuration file support
This patch set modifies 16.0.0_pre* snapshot to include configuration file support and uses it to select default runtimes and specify GCC install directory. It involves adding patches that have not yet been reviewed upstream.
The rough idea is that:
- Clang looks for a bunch of config files in
${EPREFIX}/etc/clang, either${CHOST}.cfgwhen calling${CHOST}-clang*, ordefault.cfgwhen callingclang*. -
sys-devel/clang-commoninstalls the respective config files that include one another and two Gentoo-specific files:gentoo-runtimes.cfgandgentoo-gcc-install.cfg. -
gentoo-runtimes.cfgis generated based on USE flags on-common, and it sets the default runtimes used (i.e. compiler-rt+libunwind vs libgcc, libc++ vs libstdc++, ld vs lld). -
gentoo-gcc-install.cfguses a new--gcc-install-dir=option to specify where we have GCC installed. Initially-commongenerates it fromgcc-configoutput but in the futuregcc-configwill be writing it directly.
The advantages are:
- runtime switching will now be possible without having to rebuild clang every time
- upstream will no longer have to maintain gcc-config support in C++ driver code
- we can use config files to easily switch defaults like
-Werror=...for testing
CC @gentoo/llvm
Pull request CI report
Report generated at: 2022-09-18 08:47 UTC Newest commit scanned: cbf8f5d62f324a4e400b1c308502c5d0607313eb Status: :white_check_mark: good
There are existing issues already. Please look into the report to make sure none of them affect the packages in question: https://qa-reports.gentoo.org/output/gentoo-ci/736ecae0e1/output.html
Pull request CI report
Report generated at: 2022-09-18 12:17 UTC Newest commit scanned: e4ad6de8252bb8ef5f669c7fed86c19a6bbb07c4 Status: :white_check_mark: good
There are existing issues already. Please look into the report to make sure none of them affect the packages in question: https://qa-reports.gentoo.org/output/gentoo-ci/27fd024494/output.html
Pull request CI report
Report generated at: 2022-09-19 12:07 UTC Newest commit scanned: 86914fe4deb8d75300fd77e989cef3226899c89b Status: :white_check_mark: good
There are existing issues already. Please look into the report to make sure none of them affect the packages in question: https://qa-reports.gentoo.org/output/gentoo-ci/046bb13ad6/output.html
Pull request CI report
Report generated at: 2022-09-20 20:02 UTC Newest commit scanned: 94dcfa8c6334e98a5acc7d7f074bdea85bb04688 Status: :white_check_mark: good
There are existing issues already. Please look into the report to make sure none of them affect the packages in question: https://qa-reports.gentoo.org/output/gentoo-ci/144da77026/output.html
Pull request CI report
Report generated at: 2022-09-21 18:02 UTC Newest commit scanned: f8a856b62db3803db9acee942c779d7beb1b060e Status: :white_check_mark: good
There are existing issues already. Please look into the report to make sure none of them affect the packages in question: https://qa-reports.gentoo.org/output/gentoo-ci/62d0a71683/output.html
Pull request CI report
Report generated at: 2022-09-29 09:17 UTC Newest commit scanned: 5a5dc024e7744d2a04871f2960cb4f29a09af11a Status: :white_check_mark: good
There are existing issues already. Please look into the report to make sure none of them affect the packages in question: https://qa-reports.gentoo.org/output/gentoo-ci/bfda2b2054/output.html
This was since merged.