aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
authorAlex Brachet <abrachet@google.com>2022-03-11 03:46:46 +0000
committerAlex Brachet <abrachet@google.com>2022-03-11 03:46:46 +0000
commite970d2823cf2a666cb597bf06ff8e0d0b880d361 (patch)
tree2c4a0b8fb2f0e51f134159f0e7c333207a0d2637 /llvm/unittests/Support/CommandLineTest.cpp
parenta11d1cc41c725ec6dee58f75e4a852a658dd7543 (diff)
downloadllvm-e970d2823cf2a666cb597bf06ff8e0d0b880d361.zip
llvm-e970d2823cf2a666cb597bf06ff8e0d0b880d361.tar.gz
llvm-e970d2823cf2a666cb597bf06ff8e0d0b880d361.tar.bz2
[llvm-mt] Add support /notify_update
`/notify_update` is an undocumented feature used by CMake. From their usage, it looks like this feature just changes `mt`'s exit code if the output file was changed. See https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/cmcmd.cxx#L2300 this is also consistent with some testing I have done of the mt.exeshipped with Visual Studio. See also the comment at https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/cmcmd.cxx#L2440. There might be a more performant way to implement this by first checking calling `llvm::sys::fs::file_size()` and if it is the same as the new output's size use `llvm::WritableMemoryBuffer` and fallback to `llvm::FileOutputBuffer` otherwise, but these don't inherit from a common ancestor so any implementation doing this would be really ugly. Fixes https://github.com/llvm/llvm-project/issues/54329 Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D121438
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
0 files changed, 0 insertions, 0 deletions