[PATCH] D56116: [gn build] Make `ninja check-clang` also run Clang's unit tests

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 30 14:37:09 PST 2018


phosek added inline comments.


================
Comment at: llvm/utils/gn/secondary/llvm/utils/unittest/unittest.gni:34
+    # out/gn/obj/clang/unittests/Format/FormatTests, which seems fine.
+    output_dir = target_out_dir
+    deps += [
----------------
What if someone explicitly sets `output_dir` in the invoker? We should either preserve that value or assert with an error message that overriding `output_dir` in `unittest`s is unsupported.


================
Comment at: llvm/utils/gn/secondary/llvm/utils/unittest/unittest.gni:35
+    output_dir = target_out_dir
+    deps += [
+      "//llvm/utils/unittest/UnitTestMain",
----------------
You should check if `deps` is defined and set `deps = []` if not, otherwise the attempt to add to non-existent list is going to fail.


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

https://reviews.llvm.org/D56116





More information about the cfe-commits mailing list