[9] RFR(M) 8166416: [AOT] Integrate JDK build changes and launcher 'jaotc' for AOT compiler

Vladimir Kozlov vladimir.kozlov at oracle.com
Sat Oct 29 02:23:20 UTC 2016


Updated build webrevs (webrev.2)

http://cr.openjdk.java.net/~kvn/aot/top.webrev.2/
http://cr.openjdk.java.net/~kvn/aot/hs.make.webrev.2/

Use one ENABLE_AOT variable in all config and make files (removed NEEDS_LIB_JELFSHIM).

Moved HOTSPOT_SETUP_JVM_FEATURES after LIB_SETUP_LIBRARIES.

First, check for linux-x64 presence of jdk.aot and jdk.vm.compiler directories. Set ENABLE_AOT=true if all are present. Throw config errors if --enable-aot is specified but sources are missing or on 
different platforms.

Second, in lib-elf.m4, when ENABLE_AOT==true check if libelf.h is present and usable.
Throw config errors if --enable-aot is specified but libelf.h is missing.
Otherwise warnings and set ENABLE_AOT==false.

Third, check ENABLE_AOT in HOTSPOT_SETUP_JVM_FEATURES to set JVM_FEATURES.

Thanks,
Vladimir

On 10/28/16 3:27 AM, Erik Joelsson wrote:
>
>
> On 2016-10-28 11:09, Volker Simonis wrote:
>> On Fri, Oct 28, 2016 at 10:57 AM, Erik Joelsson
>> <erik.joelsson at oracle.com> wrote:
>>> Hello,
>>>
>>>
>>> On 2016-10-28 09:56, Vladimir Kozlov wrote:
>>>> Webrevs updated in place (please, reload webpage to get new version).
>>>> generated-configure.sh changes are included.
>>>>
>>>> http://cr.openjdk.java.net/~kvn/aot/top.webrev/
>>>> http://cr.openjdk.java.net/~kvn/aot/jdk.webrev/
>>>> http://cr.openjdk.java.net/~kvn/aot/hs.make.webrev/
>>>>
>>>> libelfshim generation is guarded by ENABLE_AOT as Volker suggested.
>>>>
>>>> I did not figure out how switch off ENABLE_AOT if libelf not found. So I
>>>> changed warning to configuration error:
>>>>
>>>> error: libelf not found, cannot build AOT. Disable AOT build:
>>>> --enable-aot=no. You might be able to fix this by running 'sudo yum install
>>>> elfutils-libelf-devel'.
>>>>
>>>> Which is not correct since AOT build is enabled by default on linux-x64.
>>>> Need help with this.
>>>>
>>> I think it should be fine moving HOTSPOT_SETUP_JVM_FEATURES to after
>>> LIB_SETUP_LIBRARIES in configure.ac. (Note that many of these calls are just
>>> ordered as they happened to be, though some really need to be before or
>>> after others. I cannot find a reason for these two.) Then you can
>>> enable/disable AOT after looking for libelf. It depends on what kind of
>>> behavior you want.
>>>
>>> If libelf isn't commonly installed, then having configure use it, and enable
>>> AOT if it is, and semi silently just disabling AOT if it's not is fine. We
>>> can define our Oracle builds to explicitly set --enable-aot to get an early
>>> fail on a missing dependency. That's inline with current configure behavior
>>> so I like that.
>> I'm fine with that. But then we shouldn't warn if we don't find
>> libelf. We should only warn, if '--enable-aot' was explicitly
>> requested by the user and if this request can't be fulfilled because
>> of the missing libelf dependency.
> --enable-aot and not finding libelf should result in an error. If on linux-x64 where aot is default enabled, there should be a warning that it was disabled because libelf is missing. This warning
> would now need to be in the ENABLE_AOT logic.
>
> /Erik



More information about the build-dev mailing list