docs

#E0132: 无效的编译器选项

编译器选项的值是它不接受的:未知的 -C 选项或 --emit 种类、缺少值的选项、未知的 -C target-cpu,或者不能一起使用的两个选项(-o 与多个 --emit 种类)。help 会说明应该怎么写;nabic help <command> 会列出选项及其取值。拼错的选项名是用法错误,会指出最接近的选项。

text
$ nabi build -C overflow-check
error[E0132]: unknown codegen option `overflow-check`; did you mean `overflow-checks`?
   = help: `-C` takes `overflow-checks[=yes|no]`, `icf[=yes|no]`, `target-cpu=<cpu>`, `target-feature=+f1,-f2` or `subsystem=console|windows`
run `nabi help build` for usage

按 help 所示书写选项:

text
$ nabi build -C overflow-checks=no

命令在编译任何东西之前就会停止,并像用法错误一样以退出码 2 退出。使用 --message-format=json 时,无论该选项在命令行上的什么位置,错误都会像其他诊断一样作为一行 JSON 输出到标准输出。

相关错误码:E0125 无法读取或写入文件

发现错误? 在 GitHub 上编辑此页 最后更新: