From 912551dc689648d9bb6edc3a33394be460d24879 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Wed, 6 Apr 2022 19:43:02 +0200 Subject: [PATCH] Add the /nologo flag to llvm-ml 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 | 3 ++- llvm/tools/llvm-ml/Opts.td | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/test/tools/llvm-ml/basic.test b/llvm/test/tools/llvm-ml/basic.test index b5e68d3..736124c 100644 --- a/llvm/test/tools/llvm-ml/basic.test +++ b/llvm/test/tools/llvm-ml/basic.test @@ -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]] diff --git a/llvm/tools/llvm-ml/Opts.td b/llvm/tools/llvm-ml/Opts.td index 631c856..a6759ad 100644 --- a/llvm/tools/llvm-ml/Opts.td +++ b/llvm/tools/llvm-ml/Opts.td @@ -65,6 +65,7 @@ def assemble_only : MLFlag<"c">, HelpText<"Assemble only; do not link">; def define : MLJoinedOrSeparate<"D">, MetaVarName<"=">, HelpText<"Define to (or blank if " "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<"">; -- 2.7.4