This is an archive of the discontinued LLVM Phabricator instance.

Update `ld.lld --version` string for monorepo.
ClosedPublic

Authored by ruiu on Feb 19 2019, 3:09 PM.

Details

Summary

This patch basically does the same thing as
https://reviews.llvm.org/rL352729 did to clang.

With this patch, lld now prints out a correct version string including
a git commit id like this:

$ bin/ld.lld --version
LLD 9.0.0 (https://github.com/llvm/llvm-project.git c027658504fa9e68173f53dedaf223695a65e910) (compatible with GNU linkers)

Fixes https://bugs.llvm.org/show_bug.cgi?id=40780

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

ruiu created this revision.Feb 19 2019, 3:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2019, 3:09 PM
ruiu updated this revision to Diff 187454.Feb 19 2019, 3:11 PM
  • fix typo
ruiu updated this revision to Diff 187455.Feb 19 2019, 3:18 PM
  • Simplify
phosek added inline comments.Feb 19 2019, 6:11 PM
lld/Common/CMakeLists.txt
5 ↗(On Diff #187455)

I don't think this is used?

mgorny added inline comments.Feb 19 2019, 11:26 PM
lld/Common/Version.cpp
19 ↗(On Diff #187455)

Are you actually using it?

ruiu updated this revision to Diff 187620.Feb 20 2019, 10:47 AM
ruiu marked 2 inline comments as done.
  • address review comments
lld/Common/CMakeLists.txt
5 ↗(On Diff #187455)

Removed.

lld/Common/Version.cpp
19 ↗(On Diff #187455)

Removed.

mgorny accepted this revision.Feb 20 2019, 10:56 AM

LGTM

This revision is now accepted and ready to land.Feb 20 2019, 10:56 AM
This revision was automatically updated to reflect the committed changes.
xbolva00 added inline comments.
Common/CMakeLists.txt
39

Maybe this should be ${version_inc}?