Skip to content

Commit d0a76e7

Browse files
committed
Document --print-supported-extensions and --print-enabled-extensions
This is based on the implementation in Clang.
1 parent 010ebd3 commit d0a76e7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/toolchain-conventions.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,3 +496,20 @@ is platform defined.
496496
- `unlabeled`: Use simple label scheme, the label is always `0`.
497497
- `func-sig`: Use function signature as the label, the label is generated by the
498498
compiler, the rule is defined in psABI spec.
499+
500+
=== `--print-supported-extensions` / `--print-enabled-extensions`
501+
502+
These two flags are used to understand which RISC-V extensions are supported by
503+
a toolchain, and to understand exactly what extensions a given `-march=` or
504+
`-mcpu=` option expands to.
505+
506+
The `--print-supported-extensions` option should print a list of extensions,
507+
with information about the extension ID, the supported version, and a short
508+
one-line description of that extension. LLVM separates this list into supported
509+
and experimental extensions. This output also includes a list of profile names
510+
supported by the compiler.
511+
512+
The `--print-enabled-extension` option is intended to be used with `-march=` or
513+
`-mcpu=`, and prints only the extensions which are enabled for the current
514+
configuration, in the same format as `--print-supported-extensions`. This also
515+
prints the canonical architecture string for the given configuration.

0 commit comments

Comments
 (0)