gentoo icon indicating copy to clipboard operation
gentoo copied to clipboard

[PoC] sys-devel/clang: configuration file support

Open mgorny opened this issue 3 years ago • 5 comments

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:

  1. Clang looks for a bunch of config files in ${EPREFIX}/etc/clang, either ${CHOST}.cfg when calling ${CHOST}-clang*, or default.cfg when calling clang*.
  2. sys-devel/clang-common installs the respective config files that include one another and two Gentoo-specific files: gentoo-runtimes.cfg and gentoo-gcc-install.cfg.
  3. gentoo-runtimes.cfg is 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).
  4. gentoo-gcc-install.cfg uses a new --gcc-install-dir= option to specify where we have GCC installed. Initially -common generates it from gcc-config output but in the future gcc-config will 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

mgorny avatar Sep 18 '22 08:09 mgorny

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

gentoo-repo-qa-bot avatar Sep 18 '22 08:09 gentoo-repo-qa-bot

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

gentoo-repo-qa-bot avatar Sep 18 '22 12:09 gentoo-repo-qa-bot

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

gentoo-repo-qa-bot avatar Sep 19 '22 12:09 gentoo-repo-qa-bot

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

gentoo-repo-qa-bot avatar Sep 20 '22 20:09 gentoo-repo-qa-bot

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

gentoo-repo-qa-bot avatar Sep 21 '22 18:09 gentoo-repo-qa-bot

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

gentoo-repo-qa-bot avatar Sep 29 '22 09:09 gentoo-repo-qa-bot

This was since merged.

thesamesam avatar Oct 10 '22 23:10 thesamesam