[PATCH] D60038: gn build: Add build files for most clang-tools-extra unit tests

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 31 09:48:09 PDT 2019


thakis marked an inline comment as done.
thakis added a comment.

Thanks!



================
Comment at: llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-apply-replacements/BUILD.gn:3
+
+unittest("ClangApplyReplacementsTests") {
+  configs += [ "//llvm/utils/gn/build:clang_code" ]
----------------
mbonadei wrote:
> Why don't we use `output_name` here as well? It seems to be available for executables (https://gn.googlesource.com/gn/+/master/docs/reference.md#target-declarations-executable_declare-an-executable-target-variables). The current style seems to be lisp-case for target names and have `output_name` matching the cmake build.
That's a good question. phosek asked about this too here: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20181231/614211.html

I don't think there's a really good reason for this. I don't remember why I did it this way.

Trying to come up with a justification after the fact: A weak reason is that for static libraries it doesn't really matter what they're called on disk (other than to llvm-config's lit tests, which is why the GN build matches the cmake build -- else I wouldn't set the output name there), but for executables you need to know the name of the executable to run it, and it's maybe nice if the target has the same name as the executable for that reason.


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

https://reviews.llvm.org/D60038





More information about the cfe-commits mailing list