[gn build] Add check-lld target and make it work
authorNico Weber <nicolasweber@gmx.de>
Wed, 19 Dec 2018 23:52:16 +0000 (23:52 +0000)
committerNico Weber <nicolasweber@gmx.de>
Wed, 19 Dec 2018 23:52:16 +0000 (23:52 +0000)
commit9bd5a4661cdfd11ae37dadc8758d27e4d9fd903c
tree2dc6ab1a33c8e150cbbe65405f776d6507c0fc97
parent173f55693ee7e391f22b398f45130a9403b2aba2
[gn build] Add check-lld target and make it work

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).

Differential Revision: https://reviews.llvm.org/D55836

llvm-svn: 349702
llvm/utils/gn/build/write_cmake_config.py
llvm/utils/gn/secondary/BUILD.gn
llvm/utils/gn/secondary/lld/test/BUILD.gn [new file with mode: 0644]
llvm/utils/gn/secondary/lld/test/lld_lit_site_cfg_files.gni [new file with mode: 0644]
llvm/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn [new file with mode: 0644]
llvm/utils/gn/secondary/llvm/utils/llvm-lit/BUILD.gn [new file with mode: 0644]