RFE: configuration for compiling HotSpot with Clang
volker.simonis at gmail.com
Mon Feb 14 06:23:04 PST 2011
That's a good point. Yes I used precompiled headers for both
configurations - at least I thought I did it.
I just reread the section about Precompiled Headers in the Clang Users
Manual and stumbled about the following note: "Clang does not
automatically use PCH files for headers that are directly included
within a source file." This is a small GCC incompatibility which may
have a considerable performance impact on compilation times (GCC
automatically uses the .gch file for headers which are directly
included from the source file, and this is exactly the way how PCH is
implemented in HotSpot: there's one "precompiled.hpp" file which
includes most of the other headers and which is precompiled at the
beginning of the build. This "precompiled.hpp" file is than included
in most of the .cpp files.).
@Chris: is there any, perhaps undocumented, command line option which
changes this behavior? I think this may be a general issue for GCC
projects with precompiled headers migrating to Clang.
So I plan to do a new series of measurements and take in to account
all the other suggestions I got here and by private communication. But
please be a little patient - this is just a hobby project for the
Thank you and best regards,
On Mon, Feb 14, 2011 at 11:38 AM, Florian Weimer <fweimer at bfk.de> wrote:
> * Volker Simonis:
>> For the impatient the summary is that Clang is still slower than
>> current GCC versions and the generated code seems to be slightly
>> slower as well.
> Interesting indeed. Did you use precompiled headers?
> Florian Weimer <fweimer at bfk.de>
> BFK edv-consulting GmbH http://www.bfk.de/
> Kriegsstraße 100 tel: +49-721-96201-1
> D-76133 Karlsruhe fax: +49-721-96201-99
More information about the hotspot-dev