Skip to content

Commit 53c895b

Browse files
committed
[GR-70807] Add regex for preserve option
PullRequest: graal/22430
2 parents af405bd + f9ef5e0 commit 53c895b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/reference-manual/native-image/BuildOptions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ GraalVM 25 introduces the `-H:Preserve` option. This lets you instruct the `nati
141141
You can use `-H:Preserve` in the following ways:
142142

143143
* `-H:Preserve=all`: preserves all elements from the entire JDK and classpath. This creates larger images but ensures all code is included, which can help resolve missing metadata issues.
144-
* `-H:Preserve=module=<module>`: preserves all elements from a given module
144+
* `-H:Preserve=module=<module>`: preserves all elements from a given module.
145145
* `-H:Preserve=module=ALL-UNNAMED`: preserves all elements from the classpath (provided with `-cp`).
146-
* `-H:Preserve=package=<package>`: preserves all elements from a given package
146+
* `-H:Preserve=package=<package>`: preserves all elements from a given package. You can use `*` to include all subpackages, for example: `-H:Preserve=package=com.my.pkg.*,package=com.another.pkg.*`. Note that only the `*` wildcard is supported; other regex patterns are not allowed.
147147
* `-H:Preserve=path=<cp-entry>`: preserves all elements from a given class-path entry
148148
* You can combine any of the previous uses by separating them with a comma (`,`). For example: `-H:Preserve=path=<cp-entry>,module=<module>,module=<module2>,package=<package>`
149149

0 commit comments

Comments
 (0)