Am 07.09.2018 um 22:16 schrieb jr:
> clipka <ano### [at] anonymousorg> wrote:
>> Random fact I just figured out, in case anyone else might be wondering
>> how to do this:
>> If both clang and gcc are installed on a machine, the POV-Ray build
>> process defaults to using gcc; to force the use of clang instead, use:
>> ./configure CXX="clang++" ...
> ok, that's the how. now to the why. is there any benefit in preferring one of
> those over the other?
To me, definitely: building with clang allows me to test whether the
source code I'm writing will... well, build with clang ;) - /before/
uploading it to the GitHub repository and making a fool of myself. I
find few things more embarassing than pushing a commit to the repo that
is supposed to silence some warnings of the clang compiler, only to
learn from the automated build tests that I've just broken the clang
build entirely ;)
Why support clang in the first place? Well, that's what some people
happen to be using. On Mac, for instance, clang seems to be the default
Also, clang tends to spit out different warnings than gcc, some of which
may hint at flaws in the code.
Performance-wise it doesn't seem to pay off to switch to clang; I'm
seeing ~85s (gcc) vs. 90s (clang) wall clock time for the benchmark. But
that may change with future versions.
Post a reply to this message