This is an archive of the discontinued LLVM Phabricator instance.

[docs] Add "GNU binutils Replacements" section to command guide
ClosedPublic

Authored by rupprecht on Jun 7 2019, 10:59 AM.

Details

Summary

This splits out a section in the command guide for llvm tools that can be used as replacements for GNU tools. For pages that didn't exist, I added stub pages that can be individually filled in by followup patches.

Tested by running ninja docs-llvm-html and inspecting locally.

Event Timeline

rupprecht created this revision.Jun 7 2019, 10:59 AM
MaskRay accepted this revision.Jun 7 2019, 5:16 PM

Change the title from GNU replacements to GNU binutils replacements?

This revision is now accepted and ready to land.Jun 7 2019, 5:16 PM
grimar added inline comments.Jun 10 2019, 1:29 AM
llvm/docs/CommandGuide/index.rst
17

GNU 'as' is also a part of binutils:
https://en.wikipedia.org/wiki/GNU_Binutils

Should it also be moved?

Great! This looks good. I think we can iterate on improving the documents in due course, but this at least gives us a place to start.

llvm/docs/CommandGuide/index.rst
17

Is llvm-as intended to be a drop-in replacement yet? I have a feeling that it's not ready based on something @rupprecht said a while back.

llvm/docs/CommandGuide/llvm-readelf.md
10

It's not just different defaults though. Some of the switches are not the same either. Perhaps it would be better to say "with a command-line interface and output style more closely resembling GNU readelf"?

smeenai added inline comments.
llvm/docs/CommandGuide/index.rst
17

llvm-as converts textual IR to bitcode, so it's very different from GNU as. llvm-mc would be closer to the functionality of GNU as, but I believe e.g. it doesn't support macros, so it's definitely not a drop-in replacement.

rupprecht retitled this revision from [docs] Add "GNU Replacements" section to command guide to [docs] Add "GNU binutils Replacements" section to command guide.Jun 10 2019, 11:43 AM
rupprecht updated this revision to Diff 203883.Jun 10 2019, 1:04 PM
rupprecht marked 5 inline comments as done.
  • Clarify llvm-readelf compatibility
rupprecht added inline comments.Jun 10 2019, 1:05 PM
llvm/docs/CommandGuide/index.rst
17

Yes, we don't yet have a replacement for as, despite the same-sounding name of llvm-as.

grimar accepted this revision.Jun 11 2019, 12:52 AM

LGTM

llvm/docs/CommandGuide/index.rst
17

Oh, right. I missed I am usually using llvm-mc + GNU as and not llvm-as + GNU as.

And llvm-mc is not mentioned at all in this file for some reason, not sure why.

jhenderson accepted this revision.Jun 11 2019, 2:38 AM

LGTM, with one nit.

llvm/docs/CommandGuide/index.rst
17

And llvm-mc is not mentioned at all in this file for some reason, not sure why.

Probably because nobody's written documentation for it!

llvm/docs/CommandGuide/llvm-readelf.md
10–11

Nit "with command-line" -> "with a command-line"

This revision was automatically updated to reflect the committed changes.
rupprecht marked an inline comment as done.