RFR: JDK-8244036 Refresh SetupJavaCompilation, and remove support for sjavac
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Wed Apr 29 06:50:29 UTC 2020
On 2020-04-29 00:35, Erik Joelsson wrote:
> Hello Magnus,
>
> Nice job! Looks good.
>
> Is the disabling of the warning "options" actually needed in that many
> places or did you just add it everywhere where GENERATE_OLDBYTECODE
> was used?
It is really needed -- I started out without it, and added it wherever
the warning crept up.
My next step is to go over each java compilation and scrutinize them.
Hopefully I can tune the options to get rid of this warning. That might
mean that the output class files can change though, so I need to make
sure that it's okay.
>
> Minor notes:
>
> JavaCompilation.gmk
> 39: spelling
> 206: do -> does
Thanks for catching that! I fixed it before I pushed.
/Magnus
>
> /Erik
>
> On 2020-04-28 13:37, Magnus Ihse Bursie wrote:
>> The code for setting up Java compilation has long been quite hard to
>> understand, and has a tricky API. Part of this is due to the support
>> for the sjavac ("smart javac") system. We do not use sjavac anymore,
>> and it has not been tested for long. Part of the sjavac effort was
>> extracted into the "depend" javac plugin, and another part ended up
>> as the java server, both of which we still use.
>>
>> This patch removes the "traditional" sjavac support, keeping just the
>> depend plugin and javac server.
>>
>> It also redesigns the SetupJavaCompilation API on how to define which
>> compiler to use (from the boot jdk or the interim compiler built as
>> part of the buildtools), and what JDK to target. This captures more
>> precisely what was expressed by the cryptic "Setups" in
>> SetupJavaCompilers.gmk.
>>
>> The generated Java code that goes into the product should be
>> byte-by-byte identical with this patch. However, I've not applied the
>> same level of strictness for our build tools, where I have accepted
>> changes in bytecode to make the new API calls simpler. This does not
>> affect the output from the build tools.
>>
>> I imagine a second pass will be needed after this, to clear up some
>> remaining stuff. For instance, it is not clear that all instances of
>> SetupJavaCompilation really ask for the correct thing.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8244036
>> WebRev:
>> http://cr.openjdk.java.net/~ihse/JDK-8244036-remove-sjavac/webrev.01
>>
>> /Magnus
More information about the build-dev
mailing list