This is an archive of the discontinued LLVM Phabricator instance.

[llvm-rc] Improve help printouts
ClosedPublic

Authored by mstorsjo on Jul 5 2023, 2:40 PM.

Details

Summary

This gives more clear strings for Meson to check for in the output
of "$CMD /?" when detecting the kind of resource compiler tool, to
allow Meson to recognize llvm-rc.

Diff Detail

Event Timeline

mstorsjo created this revision.Jul 5 2023, 2:40 PM
Herald added a project: Restricted Project. · View Herald Transcript
mstorsjo requested review of this revision.Jul 5 2023, 2:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 5 2023, 2:40 PM
Herald added a subscriber: wangpc. · View Herald Transcript

This reminds me of D31199 (https://www.sigbus.info/software-compatibility-and-our-own-user-agent-problem).

Also, since we cannot update the existing configure scripts that are already generated and distributed as part of other programs, even if we improve autoconf, it would take many years until the problem would be resolved.

I think the Meson situation is better since projects don't bundle Meson in their released tarballs... I hope that we file a bug on https://github.com/mesonbuild/meson/issues and fix https://github.com/mesonbuild/meson/blob/1.1.1/mesonbuild/modules/windows.py#L97-L109 instead.

This reminds me of D31199 (https://www.sigbus.info/software-compatibility-and-our-own-user-agent-problem).

Also, since we cannot update the existing configure scripts that are already generated and distributed as part of other programs, even if we improve autoconf, it would take many years until the problem would be resolved.

I think the Meson situation is better since projects don't bundle Meson in their released tarballs... I hope that we file a bug on https://github.com/mesonbuild/meson/issues and fix https://github.com/mesonbuild/meson/blob/1.1.1/mesonbuild/modules/windows.py#L97-L109 instead.

That’s probably reasonable - but we probably should land the other bits of this patch anyway. If you look at our current printouts, e.g. the original state of helpmsg.test, there’s literally nothing there that says llvm-rc or even LLVM in any form. So to get a reasonable regex for Meson to match against, we’d first need to improve the printout so that Meson has something reasonable to match against.

mstorsjo updated this revision to Diff 537626.Jul 6 2023, 1:51 AM

Remove the "compatible with ..." part.

mstorsjo retitled this revision from [llvm-rc] Allow detection by Meson to [llvm-rc] Improve help printouts.Jul 6 2023, 1:52 AM
mstorsjo edited the summary of this revision. (Show Details)
hans accepted this revision.Jul 6 2023, 5:22 AM

lgtm

This revision is now accepted and ready to land.Jul 6 2023, 5:22 AM
MaskRay accepted this revision.Jul 6 2023, 9:41 AM
This revision was automatically updated to reflect the committed changes.

This reminds me of D31199 (https://www.sigbus.info/software-compatibility-and-our-own-user-agent-problem).

Also, since we cannot update the existing configure scripts that are already generated and distributed as part of other programs, even if we improve autoconf, it would take many years until the problem would be resolved.

I think the Meson situation is better since projects don't bundle Meson in their released tarballs... I hope that we file a bug on https://github.com/mesonbuild/meson/issues and fix https://github.com/mesonbuild/meson/blob/1.1.1/mesonbuild/modules/windows.py#L97-L109 instead.

Yes, thank you for this review comment. Unlike autotools, meson actually says "could not determine which type of $THING you are" and then errors out, which in theory means that proper handling gets directly included, so I'm quite happy to be able to detect llvm-rc as LLVM instead of Microsoft. If we ever need to treat them differently, we now can. And it's very easy to push updates to all users.