[PATCH] D56195: [gn build] Add check-llvm target and make it work

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 1 18:58:18 PST 2019


thakis created this revision.
thakis added a reviewer: phosek.
Herald added a reviewer: alexshap.
Herald added a subscriber: jfb.
thakis added parent revisions: D56194: [gn build] Add fuzzers in llvm/tools that are needed for check-llvm, D56192: [gn build] Add some llvm/tools: bugpoint, dsymutil, llvm-opt-report, D56191: [gn build] Add some llvm/tools: llvm-c-test, llvm-cfi-verify, llvm-cov, llvm-cvtres, D56193: [gn build] Add some llvm/tools: lli, lli-child-target, D56190: [gn build] Add some llvm/tools: llvm-cxxdump, llvm-cxxfilt, llvm-cxxmap, D56189: [gn build] Add some llvm/tools: llvm-diff, llvm-dwp, D56166: [gn build] Add some llvm/tools: llvm-mca, llvm-mt, D56163: [gn build] Add some llvm/tools: llvm-xray, sancov, sanstats, verify-uselistorder, yaml-bench, D56164: [gn build] Add some llvm/tools: llvm-size, llvm-split, llvm-strings.

With this, check-llvm runs and passes all of clang's lit tests. It doesn't run any of its unit tests yet.

This is the only change in the GN build patch series that needs a change to a file outside of llvm/utils/gn: llvm/test/tools/llvm-config/booleans.test checks the result of `llvm-config --build-system` for some reason, so I'm updating the test to accept "gn" as valid output in addition to "cmake". (The alternative would be to let the gn build self-identify as cmake, which seems worse.)

Like with check-clang and check-lld, running just ninja -C out/gn will build all prerequisites needed to run tests, but it won't run the tests (so that the build becomes clean after one build). Running ninja -C out/gn check-llvm will build prerequisites if needed and run the tests. The check-llvm target never becomes clean and runs tests every time.

---

This isn't 100% done yet:

- There are a few FIXMEs in llvm/test/BUILD.gn I still want to address
- I have two test failures locally, apparently due to missing build files for libLLVMTextAPI.a

I'm still sending it out to show that the end is in sight.


https://reviews.llvm.org/D56195

Files:
  llvm/test/tools/llvm-config/booleans.test
  llvm/utils/gn/secondary/BUILD.gn
  llvm/utils/gn/secondary/llvm/test/BUILD.gn
  llvm/utils/gn/secondary/llvm/test/llvm_lit_site_cfg_files.gni
  llvm/utils/gn/secondary/llvm/utils/llvm-lit/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56195.179813.patch
Type: text/x-patch
Size: 10672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190102/f79c41f2/attachment.bin>


More information about the llvm-commits mailing list