[ms] Add new option to llvm-lib: /llvmlibempty
authorEric Astor <epastor@google.com>
Thu, 30 Apr 2020 19:29:52 +0000 (15:29 -0400)
committerEric Astor <epastor@google.com>
Thu, 30 Apr 2020 19:30:56 +0000 (15:30 -0400)
commite9827f0b82751687f35d21d29f86adfab63a8dd5
treedf42926005fa9fc37c0faaa3d0a98c6458b74647
parent9ecddde321c2231e4440396dfd9f1a4718d38ba8
[ms] Add new option to llvm-lib: /llvmlibempty

Summary:
Add a new option (/llvmlibempty). If passed and llvm-lib does not give an error, it will create a valid output archive even if empty.

By default, llvm-lib mimicks lib.exe: if given no input files, it doesn't create its output file at all. This is incompatible with some build systems, so we add a command-line option to toggle this compatibility behavior.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D78894
llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
llvm/lib/ToolDrivers/llvm-lib/Options.td
llvm/test/tools/llvm-lib/no-inputs.test