Add the /nologo flag to llvm-ml
authorAlan Zhao <ayzhao@google.com>
Wed, 6 Apr 2022 17:43:02 +0000 (19:43 +0200)
committerHans Wennborg <hans@chromium.org>
Wed, 6 Apr 2022 17:47:47 +0000 (19:47 +0200)
This flag is present in MSVC's ml.exe to suppress copyright info output.
LLVM doesn't output copyright info, so this flag does nothing in
llvm-ml. We still add this flag though so that when llvm-ml is used as a
drop-in replacement for MSVC ml.exe, we don't get any extra warnings.
Furthermore, this behavior is also consistent with other llvm binaries
for Windows (e.g. clang-cl, llvm-mt, lld-link, etc.)

Differential revision: https://reviews.llvm.org/D123068

llvm/test/tools/llvm-ml/basic.test
llvm/tools/llvm-ml/Opts.td

index b5e68d3..736124c 100644 (file)
@@ -1,3 +1,4 @@
-# RUN: not llvm-ml %t.blah.asm /Fo /dev/null 2>&1 | FileCheck -DMSG=%errc_ENOENT --check-prefix=ENOENT %s
+# RUN: not llvm-ml %t.blah.asm /nologo /Fo /dev/null 2>&1 | FileCheck -DMSG=%errc_ENOENT --check-prefix=ENOENT %s
 
+# ENOENT-NOT: nologo
 # ENOENT: {{.*}}.blah.asm: [[MSG]]
index 631c856..a6759ad 100644 (file)
@@ -65,6 +65,7 @@ def assemble_only : MLFlag<"c">, HelpText<"Assemble only; do not link">;
 def define : MLJoinedOrSeparate<"D">, MetaVarName<"<macro>=<value>">,
              HelpText<"Define <macro> to <value> (or blank if <value> "
                       "omitted)">;
+def no_logo : MLFlag<"nologo">, HelpText<"">;
 def output_file : MLJoinedOrSeparate<"Fo">, HelpText<"Names the output file">;
 def include_path : MLJoinedOrSeparate<"I">,
                    HelpText<"Sets path for include files">;
@@ -101,7 +102,6 @@ def pascal_conventions : UnsupportedFlag<"Gc">, HelpText<"">;
 def c_conventions : UnsupportedFlag<"Gd">, HelpText<"">;
 def stdcall_conventions : UnsupportedFlag<"GZ">, HelpText<"">;
 def extern_name_limit : UnsupportedSeparate<"H">, HelpText<"">;
-def nologo : UnsupportedFlag<"nologo">, HelpText<"">;
 def omf_object_file : UnsupportedFlag<"omf">, HelpText<"">;
 def full_listing : UnsupportedFlag<"Sa">, HelpText<"">;
 def first_pass_listing : UnsupportedFlag<"Sf">, HelpText<"">;