We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba468d4 commit 1072fcdCopy full SHA for 1072fcd
clang/include/clang/Driver/Options.td
@@ -1382,9 +1382,13 @@ def dsym_dir : JoinedOrSeparate<["-"], "dsym-dir">,
1382
def dumpdir : Separate<["-"], "dumpdir">, Visibility<[ClangOption, CC1Option]>,
1383
MetaVarName<"<dumppfx>">,
1384
HelpText<"Use <dumpfpx> as a prefix to form auxiliary and dump file names">;
1385
-def dumpmachine : Flag<["-"], "dumpmachine">;
+def dumpmachine : Flag<["-"], "dumpmachine">,
1386
+ Visibility<[ClangOption, FlangOption]>,
1387
+ HelpText<"Display the compiler's target processor">;
1388
+def dumpversion : Flag<["-"], "dumpversion">,
1389
1390
+ HelpText<"Display the version of the compiler">;
1391
def dumpspecs : Flag<["-"], "dumpspecs">, Flags<[Unsupported]>;
-def dumpversion : Flag<["-"], "dumpversion">;
1392
def dylib__file : Separate<["-"], "dylib_file">;
1393
def dylinker__install__name : JoinedOrSeparate<["-"], "dylinker_install_name">;
1394
def dylinker : Flag<["-"], "dylinker">;
flang/test/Driver/driver-help-hidden.f90
@@ -21,6 +21,8 @@
21
! CHECK-NEXT: -ccc-print-phases Dump list of actions to perform
22
! CHECK-NEXT: -cpp Enable predefined and command line preprocessor macros
23
! CHECK-NEXT: -c Only run preprocess, compile, and assemble steps
24
+! CHECK-NEXT: -dumpmachine Display the compiler's target processor
25
+! CHECK-NEXT: -dumpversion Display the version of the compiler
26
! CHECK-NEXT: -D <macro>=<value> Define <macro> to <value> (or 1 if <value> omitted)
27
! CHECK-NEXT: -emit-llvm Use the LLVM representation for assembler and object files
28
! CHECK-NEXT: -E Only run the preprocessor
flang/test/Driver/driver-help.f90
@@ -17,6 +17,8 @@
17
! HELP-NEXT: -### Print (but do not run) the commands to run for this compilation
18
! HELP-NEXT: -cpp Enable predefined and command line preprocessor macros
19
! HELP-NEXT: -c Only run preprocess, compile, and assemble steps
20
+! HELP-NEXT: -dumpmachine Display the compiler's target processor
+! HELP-NEXT: -dumpversion Display the version of the compiler
! HELP-NEXT: -D <macro>=<value> Define <macro> to <value> (or 1 if <value> omitted)
! HELP-NEXT: -emit-llvm Use the LLVM representation for assembler and object files
! HELP-NEXT: -E Only run the preprocessor
flang/test/Driver/dumpmachine.f90
@@ -0,0 +1,8 @@
1
+! Test that -dumpmachine prints the target triple.
2
+
3
+! Note: Debian GCC may omit "unknown-".
4
+! RUN: %flang --target=x86_64-linux-gnu -dumpmachine | FileCheck %s --check-prefix=X86_64
5
+! X86_64: x86_64-unknown-linux-gnu
6
7
+! RUN: %flang --target=xxx-pc-freebsd -dumpmachine | FileCheck %s --check-prefix=FREEBSD
8
+! FREEBSD: xxx-pc-freebsd
flang/test/Driver/immediate-options.f90
@@ -0,0 +1,2 @@
+! RUN: %flang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
+! DUMPVERSION: {{[0-9]+\.[0-9.]+}}
0 commit comments