On Fri, 2020-06-05 at 19:23 +0200, Florian Weimer wrote:
* Jeff Law:
> I'm not suggesting switching the default. I'm suggesting the compiler
> choice be made by the upstream projects. Some prefer LLVM, others
> prefer GCC. Fedora should get out of the way and use the same tools
> that the upstream projects are using.
Do we know how many upstream projects actually recommend building with a
recent Clang upstream release? Chromium explicitly does not:
Not really. I'm
not in a great position to know the set of upstream projects
that recommend Clang/LLVM.
> Chromium ships a prebuilt clang binary. It's just upstream clang built
> at a known-good revision that we bump every two weeks or so.
> This is the only supported compiler for building
Chromium.
<
https://chromium.googlesource.com/chromium/src/+/master/docs/clang.md> Yea,
Tom mentioned this tidbit to me privately.
Currently, it's this build:
$ ./src/third_party/llvm-build/Release+Asserts/bin/clang++ --version
clang version 11.0.0 (
https://github.com/llvm/llvm-project/
a6ae333a0c23fc9b0783ca45e2676abac00c6723)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/test/chromium/./src/third_party/llvm-
build/Release+Asserts/bin
So something pulled recently from the development branch, not a release
branch.
In my experience, this is pretty typical: Upstreams leaning towards
Clang expect that you use their prebuilt compiler, not a system
compiler.
I suspect you're right.
Using Clang downstream may make things simpler for packagers, but a
system-supplied Clang compiler is rarely a preferred upstream choice
(not even on Macos, where there is no real choice anymore).
I'm not sure making
this distinction is that useful. If upstream prefers an pre-
built clang, then ISTM we'd either be using that pre-built clang or our system
clang. Forcing a packager to use GCC seems wrong in this case.
On the other hand, there is demand from users (not just packagers) for
the LLVM-based toolchain, and increased use by Fedora packagers will
help us to improve the quality of Fedora's version of it. Fortunately,
for this effect, it does not matter *why* Fedora packagers choose Clang.
Right.
jeff