This is an archive of the discontinued LLVM Phabricator instance.

[gn build] Add check-clang target and make it work
ClosedPublic

Authored by thakis on Dec 26 2018, 5:06 PM.

Details

Summary

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

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

Diff Detail

Repository
rL LLVM

Event Timeline

thakis created this revision.Dec 26 2018, 5:06 PM
thakis marked an inline comment as done.
thakis added inline comments.
llvm/utils/gn/secondary/clang/test/BUILD.gn
23 ↗(On Diff #179533)

As you can see, this doesn't have all that much in common with llvm/utils/gn/secondary/lld/test/BUILD.gn – it has _some_ stuff in common, but there's also quite a few things different.

phosek added inline comments.Dec 26 2018, 6:51 PM
llvm/utils/gn/secondary/llvm/triples.gni
10 ↗(On Diff #179533)

I don't think host_cpu would ever be missing since it's detected by GN (unless it's a new architecture that GN doesn't recognize), should this rather be unsupported host_cpu or something along those lines?

thakis marked an inline comment as done.Dec 27 2018, 9:11 AM
thakis added inline comments.
llvm/utils/gn/secondary/llvm/triples.gni
10 ↗(On Diff #179533)

"missing" as in "this is missing code here". "unsupported" doesn't seem quite right since the whole GN build is unsupported :-) And if someone needs a new host_cpu, they can just send a patch. "not-yet-implemented host_cpu " + host_cpu? I don't think the exact error string is super important though.

thakis updated this revision to Diff 179563.Dec 27 2018, 9:33 AM

s/missing/unimplemented/

phosek accepted this revision.Dec 27 2018, 12:27 PM

LGTM

This revision is now accepted and ready to land.Dec 27 2018, 12:27 PM
This revision was automatically updated to reflect the committed changes.