This makes it easier to see version info without having to use a
specific shim. Example:
lld is a generic driver. (LLD 15.0.0) Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld (WebAssembly) instead
Differential D122924
[lld] Add version info to generic driver output keith on Apr 1 2022, 10:56 AM. Authored by
Details
This makes it easier to see version info without having to use a lld is a generic driver. (LLD 15.0.0) Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld (WebAssembly) instead
Diff Detail
Event TimelineComment Actions The purpose is unclear to me about why we need to overload here with more information. Comment Actions This is purely a convenience addition so users don't have to know about -flavor gnu, or specify one of the other shims Comment Actions Such use cases can't be common, can they? Comment Actions I doubt they're super common, but I figured the complexity of adding this was so low that it made sense to. In my case I was trying to compare versions of the installed lld on linux systems at /usr/bin/lld, so I found myself trying to do /usr/bin/ld --version and then /usr/bin/lld --version, where the latter didn't print the version. I don't think we have to worry about more folks calling this since the utility of calling it is still very small, and the output is clear that the other shims should be called. Comment Actions I agree that it's uncommon, so I try to evaluate it from some aspects like code complexity, consistency, and feature orthogonality. Comment Actions @MaskRay sorry for butting in, but what am I missing here? The hardline and opaque rejection don't reconcile with such a minor change. To me, there is no complexity whatsoever to this change. You mention consistency, but don't say with what (which doesn't allow people to make their own judgement). I also don't see how feature orthogonality relates. Rejections happen, but I think it's rejections ought to be clear to readers, and in this instance I found it confusing. Comment Actions consistency: this is a fatal error. for other fatal errors we don't report the version. orthogonality: this is implied as well. lld -flavor gnu --version reports the version. complexity: both #include "lld/Common/Version.h" and the function call is extra complexity. Comment Actions I don't agree that an #include and a function call "add complexity". By that reasoning, writing any code is adding complexity, and then the question is not whether code is complex (because it all would be), and only whether reviewers choose to evoke a "code complexity" argument. The llvm project has lots of complexity, and I don't believe this is an example of it. I appreciate you replying, and I won't take up any more time. |