This is an archive of the discontinued LLVM Phabricator instance.

[docs] [tools] Document and alphabetize all llvm-config command-line options
AcceptedPublic

Authored by fw-immunant on Dec 10 2021, 9:04 AM.

Details

Summary

Also implements explicit handling for the already-documented --help flag.

Diff Detail

Unit TestsFailed

Event Timeline

fw-immunant requested review of this revision.Dec 10 2021, 9:04 AM
fw-immunant created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 10 2021, 9:04 AM

Could you please reupload this patch, with full diff context, i.e. using something like -U999999 when creating the diff. This will help verify the full document.

I'd probably recommend reordering the options to be in alphabetical order too. There are some other general tidy-ups I think should be made to this document (using e.g. the option-specific rst syntax), but that's probably outside the scope of this change.

fw-immunant edited the summary of this revision. (Show Details)

Uploaded with full diff context.

I'd probably recommend reordering the options to be in alphabetical order too.

Apologies if this wasn't clear, but I think the alphabetical ordering should be done in this patch.

llvm/docs/CommandGuide/llvm-config.rst
66

I believe "cmake" is actually written "CMake".

156

"CMake" (though I wonder whether this statement is accurate in the presence of gn or bazel).

GMNGeoffrey added inline comments.
llvm/docs/CommandGuide/llvm-config.rst
156

Bazel is unsupported, etc. etc., but yeah I think the "always cmake" bit here isn't super helpful. Even if not upstream I know various people build LLVM with various build systems

fw-immunant retitled this revision from [docs] Document all llvm-config command-line options to [docs] [tools] Document and alphabetize all llvm-config command-line options.
fw-immunant edited the summary of this revision. (Show Details)

Alphabetized options in docs and usage, added explicit handling for --help, corrected spelling of CMake, clarified what might be returned by --build-system.

fw-immunant marked an inline comment as done.Dec 15 2021, 3:42 PM
fw-immunant added inline comments.
llvm/docs/CommandGuide/llvm-config.rst
156

The only other option I saw as possible based on a grep for LLVM_BUILD_SYSTEM is gn, so I've mentioned it here. Unlike the other mention of lower-case "cmake", this one is actually correct--the value printed is lowercase.

jhenderson accepted this revision.Dec 16 2021, 12:17 AM

Looks good from my point of view.

llvm/docs/CommandGuide/llvm-config.rst
46

I'd actually get rid of "gn" to avoid confusion, as I believe gn builds aren't officially supported by core LLVM (it's maintained by the users of gn, rather than the wider community), like bazel, but I don't mind that much.

This revision is now accepted and ready to land.Dec 16 2021, 12:17 AM
fw-immunant added inline comments.Dec 16 2021, 11:10 AM
llvm/docs/CommandGuide/llvm-config.rst
46

There seems to be code in the LLVM tree (in llvm/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn) that will result in gn appearing here, so I think it's reasonable to document the possibility. If you want it removed say so and I'll change it.

fw-immunant marked an inline comment as not done.Dec 16 2021, 11:13 AM
fw-immunant added inline comments.
llvm/docs/CommandGuide/llvm-config.rst
46

Otherwise, go ahead and commit, as I don't have commit access myself.

jhenderson added inline comments.Dec 17 2021, 12:43 AM
llvm/docs/CommandGuide/llvm-config.rst
46

Today's my last day in the office, before the Christmas break, so I don't want to be committing anything, in case I break things, as I won't necessarily have time to do the fix.

@andreadb/@GMNGeoffrey are either of you in a position to do so?

@fw-immunant, we'll need the name and email address you want this committed under, so that it appears in the git author details. Feel free to email directly, if preferred.

If nobody else gets to this, I'm happy to do it when I come back to work, although you could also try asking on llvm-dev for someone to take care of it.

GMNGeoffrey added inline comments.Dec 20 2021, 10:36 AM
llvm/docs/CommandGuide/llvm-config.rst
46

I'll be around until Thursday 2021-12-23 PT, so I can land, but I don't really have much context on this patch other than my filter for patches containing "Bazel" flagged it :-)

@GMNGeoffrey, (or anybody else) did you land this change yet? If not, I can probably arrange for it this week.

@GMNGeoffrey, (or anybody else) did you land this change yet? If not, I can probably arrange for it this week.

I didn't hear from @fw-immunant what name and email to use, so I didn't take any action

@GMNGeoffrey, (or anybody else) did you land this change yet? If not, I can probably arrange for it this week.

I didn't hear from @fw-immunant what name and email to use, so I didn't take any action

Ah, good point. @fw-immunant, please email or post your name and email address so that one of us can appropriately assign the commit author when landing this.

fw-immunant marked an inline comment as not done.Mar 30 2022, 5:58 PM

Sorry, I missed this. Name is Frances Wingerter and e-mail is <fw@immunant.com>.

Is there anything else needed? Thanks.

Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2022, 5:58 PM

Sorry, I missed this. Name is Frances Wingerter and e-mail is <fw@immunant.com>.

Is there anything else needed? Thanks.

I've gone ahead and pushed this. Please keep an eye out for related buildbot failure emails.

Whilst building your patch, I noticed that the llvm-config doc doesn't use the correct markup for command-line options and references to them. Basically, I think throughout it's misusing bold ** formatting. If you fancy a follow-up, I recommend fixing this. Docs like llvm-readobj.rst are a good reference point.