This is an archive of the discontinued LLVM Phabricator instance.

gn build: Give cmake sync script an opt-in --write flag
ClosedPublic

Authored by thakis on Aug 12 2019, 11:28 AM.

Diff Detail

Event Timeline

thakis created this revision.Aug 12 2019, 11:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2019, 11:28 AM
Herald added a subscriber: mgorny. · View Herald Transcript
pcc accepted this revision.Aug 12 2019, 8:09 PM

LGTM

llvm/utils/gn/build/sync_source_lists_from_cmake.py
34

Should this also refuse to operate if it sees a # NOSORT comment? I think the only instance of that is in clang/lib/Headers, though -- maybe we can remove that comment now that we have a mechanism for automatic updates?

This revision is now accepted and ready to land.Aug 12 2019, 8:09 PM
thakis marked an inline comment as done.Aug 13 2019, 4:21 AM

Thanks!

llvm/utils/gn/build/sync_source_lists_from_cmake.py
34

Good point. Made this balk on NOSORT for now.

This revision was automatically updated to reflect the committed changes.

Oh, also gn format honors -q only as of yesterday, before that it ignored the flag silently. Run llvm/utils/gn/get.py to download a new gn binary that supports it if you find the "Wrote formatted...." output from gn annoying.