[PATCH] D65430: Add `--write-dependencies` option, which is equivalent to compiler option -MD.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 00:57:55 PDT 2019


grimar added inline comments.


================
Comment at: lld/test/ELF/write-dependencies.s:4
+// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t/foo.o
+// RUN: echo '' | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o "%t/bar baz.o"
+// RUN: ld.lld -o %t/foo.exe %t/foo.o %t/"bar baz.o" --write-dependencies=%t/foo.d
----------------
This probably a bit simpler:
```
llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o "%t/bar baz.o"
```


================
Comment at: lld/test/ELF/write-dependencies.s:6
+// RUN: ld.lld -o %t/foo.exe %t/foo.o %t/"bar baz.o" --write-dependencies=%t/foo.d
+// RUN: FileCheck %s < %t/foo.d
+
----------------
Since you're testing the output in a particular format, what about adding `--strict-whitespace --match-full-lines` to `FileCheck` invocation?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65430/new/

https://reviews.llvm.org/D65430





More information about the llvm-commits mailing list