[llvm] 310b0a1 - [llvm-ml] Adds /quiet flag to llvm-ml (#107308)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 01:28:26 PDT 2024


Author: Matt Bolitho
Date: 2024-09-06T11:28:22+03:00
New Revision: 310b0a1cf39aaf25a8fb5c88afc3a47a5776cec2

URL: https://github.com/llvm/llvm-project/commit/310b0a1cf39aaf25a8fb5c88afc3a47a5776cec2
DIFF: https://github.com/llvm/llvm-project/commit/310b0a1cf39aaf25a8fb5c88afc3a47a5776cec2.diff

LOG: [llvm-ml] Adds /quiet flag to llvm-ml (#107308)

In PR #106794, it was noted that `llvm-ml` does not support the `/quiet`
flag. The original reason it was added by Microsoft to `ml`/`ml64` was
to remove extraneous CMake build output (see [CMake GitLab
issue](https://gitlab.kitware.com/cmake/cmake/-/issues/23537)) much like
in the linked PR .

If the goal is for `llvm-ml` to be a drop-in replacement for
`ml`/`ml64`, then I think it makes sense to support the `/quiet` flag,
much like how `/nologo` is supported.

Added: 
    

Modified: 
    llvm/test/tools/llvm-ml/run.asm
    llvm/tools/llvm-ml/Opts.td

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-ml/run.asm b/llvm/test/tools/llvm-ml/run.asm
index 0e4f2bf137f18a..11e2d72ae06c2d 100644
--- a/llvm/test/tools/llvm-ml/run.asm
+++ b/llvm/test/tools/llvm-ml/run.asm
@@ -1,3 +1,4 @@
 ; RUN: llvm-ml --help | FileCheck %s
+; RUN: llvm-ml /nologo /quiet
 
 ; CHECK: USAGE: llvm-ml

diff  --git a/llvm/tools/llvm-ml/Opts.td b/llvm/tools/llvm-ml/Opts.td
index 686edded23b853..8b748bb64b278b 100644
--- a/llvm/tools/llvm-ml/Opts.td
+++ b/llvm/tools/llvm-ml/Opts.td
@@ -72,6 +72,7 @@ def define : MLJoinedOrSeparate<"D">, MetaVarName<"<macro>=<value>">,
              HelpText<"Define <macro> to <value> (or blank if <value> "
                       "omitted)">;
 def no_logo : MLFlag<"nologo">, HelpText<"">;
+def quiet : MLFlag<"quiet">, HelpText<"">;
 def output_file : MLJoinedOrSeparate<"Fo">, HelpText<"Names the output file">;
 def include_path : MLJoinedOrSeparate<"I">,
                    HelpText<"Sets path for include files">;


        


More information about the llvm-commits mailing list