3

GitHub 上的 Substrate VM 文档(例如CONFIGURE.md提到了多个-H:...选项,例如-H:ReflectionConfigurationResources-H:ConfigurationFileDirectories。在哪里可以找到这些选项的参考文档?GraalVM Reference > Native Image仅提供基本概述。

4

2 回答 2

1

native-image --help建议调用native-image --help-extra哪个建议调用的输出

native-image --expert-options-all

打印记录的选项列表:https ://gist.github.com/happylynx/ce642816411ee5c98f04fedd80f4c417 。

于 2019-11-13T21:54:26.487 回答
0

目前,命令有不同的级别help

  • native-image --help使用用于生成本机图像的常规选项打印默认帮助消息
  • native-image --help-extra打印非标准选项的帮助,它清楚地显示了接下来两个选项的用法
  • native-image --expert-options打印帮助以供专家使用更高级的选项
  • native-image --expert-options-all打印所有可用的图像构建选项,在输出消息中很清楚,最后一个命令应该由您自担风险使用

因此,您可以将 grep 表达式附加到上述四个命令之一并检索有关特定命令的帮助。这是一个例子:

native-image --expert-options | grep -A 1 ReflectionConfigurationResources

如果第一行被截断,我正在使用grepwith来显示多行-A 1

前面的命令显示如下输出:

-H:ReflectionConfigurationResources=... Resources describing program elements to be made available for reflection (see ReflectionConfigurationFiles). Default: None
于 2019-11-14T14:43:18.747 回答