Skip to content

[llvm-ar] --help: fix unquoted angle bracket #101364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 7, 2025
Merged

Conversation

LinuxUserGD
Copy link
Contributor

@LinuxUserGD LinuxUserGD commented Jul 31, 2024

Changes the argument in llvm-ar help message from -M [<mri-script] to -M [< mri-script]

Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be
notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write
permissions for the repository. In which case you can instead tag reviewers by
name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review
by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate
is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot
Copy link
Member

llvmbot commented Jul 31, 2024

@llvm/pr-subscribers-llvm-binary-utilities

Author: Linux User (LinuxUserGD)

Changes

See ziglang/zig#17337


Full diff: https://github.com/llvm/llvm-project/pull/101364.diff

1 Files Affected:

  • (modified) llvm/tools/llvm-ar/llvm-ar.cpp (+1-1)
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp
index 3b842b76d5c87..56e9b112bec7a 100644
--- a/llvm/tools/llvm-ar/llvm-ar.cpp
+++ b/llvm/tools/llvm-ar/llvm-ar.cpp
@@ -130,7 +130,7 @@ static void printArHelp(StringRef ToolName) {
          << "USAGE: " + ToolName +
                 " [options] [-]<operation>[modifiers] [relpos] "
                 "[count] <archive> [files]\n"
-         << "       " + ToolName + " -M [<mri-script]\n\n";
+         << "       " + ToolName + " -M [<mri-script>]\n\n";
 
   outs() << ArOptions;
 }

Copy link
Member

@MaskRay MaskRay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider editing the title ([llvm-ar] --help: fix unquoted angle bracket)

Just change the PR title/descritpion. The git commit message is ignored.

@LinuxUserGD LinuxUserGD changed the title [llvm-ar] Add missing right angle bracket [llvm-ar] --help: fix unquoted angle bracket Jul 31, 2024
Copy link
Collaborator

@jh7370 jh7370 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I don't think the < is actually spurious! llvm-ar only supports reading MRI scripts from stdin, not from a file specified directly on the command-line. In this case, < is intended to represent the "read stdin from file" indicator. I think this would be clearer if there was a space between the < and mri-script.

@LinuxUserGD
Copy link
Contributor Author

In this case, < is intended to represent the "read stdin from file" indicator.

I've readded it now with a space, so I guess the syntax would be [-M < mri-script]

@jh7370
Copy link
Collaborator

jh7370 commented Aug 6, 2024

In this case, < is intended to represent the "read stdin from file" indicator.

I've readded it now with a space, so I guess the syntax would be [-M < mri-script]

No, it should be -M [< mri-script]. The tool prints two possible invocations, the first, not touched by this patch, is the "regular" style where you e.g. add files to an archive using something like llvm-ar rc archive.a obj.o. The second line is for using MRI style. The MRI style is only activated when -M is specified, so the -M in that case in compulsory.

Copy link
Collaborator

@jh7370 jh7370 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM.

@LinuxUserGD
Copy link
Contributor Author

Ping

@LinuxUserGD
Copy link
Contributor Author

Thanks for reviewing the PR.
Any news if/when it could be merged?

@jh7370
Copy link
Collaborator

jh7370 commented Apr 7, 2025

Hi @LinuxUserGD,

The assumption in LLVM is that people have the ability to merge things themselves unless they've said otherwise. From https://llvm.org/docs/Contributing.html#how-to-submit-a-patch:

After your PR is approved, you can merge it. If you do not have the ability to merge the PR, ask your reviewers to merge it on your behalf. You must do this explicitly, as reviewers’ default assumption is that you are able to merge your own PR.

I'm happy to merge this for you, but I noticed that you have GitHub set to private email address mode. LLVM policy requires that people have a public email address. Please see https://llvm.org/docs/DeveloperPolicy.html#email-addresses. Once you've changed that, please let me know as I can then merge the change for you.

@LinuxUserGD
Copy link
Contributor Author

@jh7370 Sorry and thank you for the explanation. I don't have merge permissions for LLVM, so please merge if it's ready.
I've changed the email address in the GitHub profile settings to public.

@jh7370 jh7370 merged commit 0a35dd7 into llvm:main Apr 7, 2025
7 checks passed
Copy link

github-actions bot commented Apr 7, 2025

@LinuxUserGD Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail here.

If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

@jh7370
Copy link
Collaborator

jh7370 commented Apr 7, 2025

Done. Please keep an eye open for build bot failure notifications (I wouldn't expect this PR to trigger any that are actually related, but still it's worth being cautious).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants