Skip to content

Feature: Improve library-support checking by running native image with -H:Preserve=all and -H:TrackDynamicAccess=all #844

@jormundur00

Description

@jormundur00

Is your feature request related to a problem?

We should improve the detection of supported libraries (or at least libraries that don't require metadata) by running native-image with -H:Preserve=all and -H:TrackDynamicAccess and seeing if any dynamic access calls are detected.

Describe the solution you'd like

When a library support check is requested, we should run a native-image build with an empty main as an entrypoint, and the requested library as the only dependency, using the options -H:Preserve=all and -H:TrackDynamicAccess=all. This way, all method calls are reachable, and if -H:TrackDynamicAccess=all doesn't detect any dynamic access calls, we can assume that the library requires no metadata.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions