[PATCH] D55836: [gn build] Add check-lld target and make it work

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 09:51:51 PST 2018


thakis created this revision.
thakis added a reviewer: phosek.
Herald added subscribers: jfb, mgorny.
Herald added a reviewer: alexshap.

Also add a build file for llvm-lit, which in turn needs llvm/tools/llvm-config.

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

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-lld` will build prerequisites if needed and run the tests. The check-lld target never becomes clean and runs tests every time.

llvm-config's build file is a bit gnarly: Everything not needed to run tests is basically stubbed out. Also, to generate LibraryDependencies.inc we shell out to `llvm-build` at build-time. It would be much nicer to get the library dependencies by using the dependency data the GN build contains (http://llvm-cs.pcc.me.uk/gen/tools/llvm-config/LibraryDependencies.inc#1).


https://reviews.llvm.org/D55836

Files:
  llvm/utils/gn/build/write_cmake_config.py
  llvm/utils/gn/secondary/BUILD.gn
  llvm/utils/gn/secondary/lld/test/BUILD.gn
  llvm/utils/gn/secondary/lld/test/lld_lit_site_cfg_files.gni
  llvm/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn
  llvm/utils/gn/secondary/llvm/utils/llvm-lit/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55836.178715.patch
Type: text/x-patch
Size: 11928 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181218/60839927/attachment.bin>


More information about the llvm-commits mailing list