Page MenuHomePhabricator

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

Authored by thakis on Tue, Jan 1, 6:57 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

thakis created this revision.Tue, Jan 1, 6:57 PM
thakis updated this revision to Diff 179816.Tue, Jan 1, 7:31 PM
thakis edited the summary of this revision. (Show Details)

now passes all tests

thakis edited the summary of this revision. (Show Details)Tue, Jan 1, 7:37 PM
thakis updated this revision to Diff 179847.Wed, Jan 2, 7:54 AM
thakis edited the summary of this revision. (Show Details)

fix most FIXMEs, make ld64 plugin tests run and pass

thakis updated this revision to Diff 179850.Wed, Jan 2, 8:08 AM
thakis edited the summary of this revision. (Show Details)

ready to go

thakis updated this revision to Diff 179852.Wed, Jan 2, 8:25 AM

fix minor derp

thakis updated this revision to Diff 179853.Wed, Jan 2, 8:26 AM

git ls-files '*.gn' '*.gni' | xargs -n 1 gn format again

Ok, all dependencies of this have landed. D56200 is a "soft" dependency in that it's only needed to make a comment in this change here be true, it's not a functional dependency.

add back llvm-exegesis dep that got dropped in the move

phosek: ping :-) Almost done!

serge-sans-paille accepted this revision.Fri, Jan 4, 1:17 AM

LGTM, but *only* with respect to the Python 2/3 compatibility of the modification, which is just a drop in the ocean of this patch.

This revision is now accepted and ready to land.Fri, Jan 4, 1:17 AM
thakis updated this revision to Diff 180239.Fri, Jan 4, 5:48 AM
thakis edited the summary of this revision. (Show Details)

pulled some stuff out into dependent patches to make this smaller

LGTM, but *only* with respect to the Python 2/3 compatibility of the modification, which is just a drop in the ocean of this patch.

Thanks! I landed that part in r350394, and moved other dependencies into their own issues D56316, D56317. Hopefully that makes this patch here a bit easier to handle.

thakis requested review of this revision.Fri, Jan 4, 8:07 AM
phosek accepted this revision.Fri, Jan 4, 9:00 AM

LGTM

This revision is now accepted and ready to land.Fri, Jan 4, 9:00 AM
This revision was automatically updated to reflect the committed changes.