RFR: JDK-8170280: Enable -g for all java compilation in the build
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Thu Nov 24 14:43:19 UTC 2016
On 2016-11-23 16:10, Erik Joelsson wrote:
> It was pointed out that the changes to Images.gmk could be made
> simpler. Here is a new webrev:
>
> http://cr.openjdk.java.net/~erikj/8170280/webrev.top.02
Looks good, except for the new DEBUG_SYMBOLS. I'm not entirely sure it's
needed (since there are no users of it) and I'm not too fond of coding
for future vaguely anticipated needs.
Also, there's a bug in this code. You should have been testing for
$1_DEBUG_SYMBOLS. Which proves my point of not coding for the future. ;-)
But, I can see the reason of having symmetry with NativeCompilation, and
if you want to keep it, do so. Just fix the bug.
/Magnus
>
> /Erik
>
>
> On 2016-11-23 15:25, Erik Joelsson wrote:
>> For a long time, a lot of people have been wanting the JDK classes to
>> be compiled with debug symbols enabled by default. I believe the
>> reason we haven't so far is to keep footprint down for the JRE image.
>> The usecase for debug information is mainly in the JDK image, which
>> is used for development. The problem so far has then been that we
>> don't want to compile everything twice, once with and once without
>> debug symbols.
>>
>> With jlink, we now have the option of stripping debug information at
>> link time. This adds a bit of time creating the images, but it's
>> small compared to recompiling all classes. Because of this, I propose
>> that we enable debug symbols for all java compilation in the build by
>> default and add stripping to all images that are footprint sensitive.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8170280
>>
>> Webrev: http://cr.openjdk.java.net/~erikj/8170280/webrev.top.01
>>
>> /Erik
>>
>
More information about the build-dev
mailing list