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.)
Details
- Reviewers
hans epastor - Commits
- rG912551dc6896: Add the /nologo flag to llvm-ml
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/test/tools/llvm-ml/basic.test | ||
---|---|---|
3 | This test would still pass if llvm-ml printed something like "error: invalid option: '/nologo'". It's probably safest to check that "nologo" isn't mentioned in the output at all. | |
llvm/tools/llvm-ml/Opts.td | ||
70 | For clang-cl we don't include ignored options in the /help output at all. See the cl_ignored_group in clang/include/clang/Driver/Options.td and how "nologo" is handled there. Maybe llvm-ml should handle ignored options similarly? |
llvm/tools/llvm-ml/Opts.td | ||
---|---|---|
70 | I don't think there's a consistent approach here - both llvm-cvtres and llvm-mt have help text for this flag (and in fact, I copied this help text from llvm-mt). |
I added a nitpick, but it's also fine if you want to land this now and worry about that later (or not).
llvm/tools/llvm-ml/Opts.td | ||
---|---|---|
70 | It's a nitpick obviously, but I don't think the current help message is good:
A better help text would be something like "Don't print startup banner (default)" or something like that. But just having no help text would be just as good. I didn't realize llvm-cvtres and llvm-mt have the same issue, but I didn't review that code :-) |
llvm/tools/llvm-ml/Opts.td | ||
---|---|---|
70 | Ended up removing the HelpText. |
This test would still pass if llvm-ml printed something like "error: invalid option: '/nologo'". It's probably safest to check that "nologo" isn't mentioned in the output at all.