clang vs gcc build performance (executable not build time)
Stephan Bergmann
sbergman at redhat.com
Wed Nov 24 09:58:12 UTC 2021
On 23/11/2021 17:11, Luboš Luňák wrote:
> On Tuesday 23 of November 2021, Michael Meeks wrote:
>> On 22/11/2021 16:28, Arnaud Versini wrote:
>>> There is no
>>> significant difference between both clang builds (changing lib C++ from
>>> libstdc++ to libc++) but gcc is slower than clang. Of course all builds
>>> don't use system libraries in this case to compare between lib C++, and
>>> builds are optimised and use LTO.
>>
>> Looks interesting.
>>
>> Lubos - what are our build defaults currently and do you have thoughts
>> on changing them ? it would be great to poke at Arnaud's blog / work
>> as/when it gets published =)
>
> That decision is not really up to me. AFAIK projects like Firefox or Chromium
> build exclusively using Clang. I wouldn't mind using Clang for everything,
> but I don't know how others would see that.
A decision to make Clang the only compiler with which LO can be built,
or even just a decision to no longer test (via Jenkins and tinderboxes,
say) with any compiler other than Clang? I would not be happy with
that, as I think the heterogeneous set of compilers we target is an
important factor in keeping our code base healthy and close to
standards. And a standards-conforming code base gives us flexibility,
e.g. when trying out a promising new build toolchain or static or
dynamic analysis tool.
> Stephan Bergmann does clang-cl builds on Windows, so it should work, although
> I don't remember how difficult it is to set up.
There's the horribly outdated
<https://wiki.documentfoundation.org/Development/clang-cl> that Ilmari
already mentioned, But setting up LLVM/Clang (which should only be
necessary if you want to --enable-compiler-plugins, which is my
motivation for doing those clang-cl builds; otherwise, the Clang bundled
with VS probably works fine) and doing a LO build with it has become
much simpler since when I wrote that. (If there is demand, I could try
and update the wiki page, just ping me.)
More information about the LibreOffice
mailing list