[llvm] [docs] Document `-mtriple` option in opt command guide (NFC) (PR #213942)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 21:12:59 PDT 2026


================
@@ -53,6 +53,28 @@ OPTIONS
  `invoking opt <../NewPassManager.html#invoking-opt>`_ for more details on the
  pass pipeline syntax.
 
+.. option:: -mtriple=<target triple>
+
+ Override the target triple specified in the input file with the specified
+ string.
+
+.. option:: -march=<arch>
+
+ Specify the architecture for which to generate LLVM IR, overriding the target
+ encoded in the input file. See the output of ``opt -help`` for a list of
+ valid architectures. By default this is inferred from the target triple or
+ autodetected to the current architecture.
+
+.. option:: -mcpu=<cpuname>
+
+ Specify a specific chip in the current architecture to generate LLVM IR for.
+ By default this is inferred from the target triple and autodetected to
+ the current architecture. For a list of available CPUs, use:
+
+ .. code-block:: none
+
+   llvm-as < /dev/null | opt -mcpu=help
----------------
rnk wrote:

Clang copies docs/** into build/tools/clang/docs/doctree (sp), and then it uses tablegen to spit out command line flags and attribute docs into the doctree. It then runs sphinx-build on that doctree. See #211411 for a recent change here.

I wouldn't block minor improvements on fixing the duplication.

https://github.com/llvm/llvm-project/pull/213942


More information about the llvm-commits mailing list