[llvm-bugs] [Bug 40780] New: ld.lld --version doesn't show revision info when built in monorepo
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Feb 19 11:25:59 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40780
Bug ID: 40780
Summary: ld.lld --version doesn't show revision info when built
in monorepo
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: natechancellor at gmail.com
CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org
ld.lld --version does not show any revision info when using the monorepo.
Cloning the llvm and lld repos standalone side by side and using
LLVM_ENABLE_PROJECTS works.
The root cause is LLD_REVISION and LLD_REPOSITORY don't get properly set
because the helper scripts assume that there will be a .git folder in the lld
folder, which isn't true with the monorepo (it's in ..).
https://github.com/llvm/llvm-project/blob/c94d393ad52b669/lld/CMakeLists.txt#L137-L141
https://github.com/llvm/llvm-project/blob/a6822ed91f0e033/llvm/utils/GetRepositoryPath#L21
https://github.com/llvm/llvm-project/blob/bf0bf743d7ed6c2/llvm/utils/GetSourceVersion#L21
A quick fix would be to check for a .git folder in the parent directory:
elif [ -d .git ] || [ -d ../.git ]; then
I have no idea if that is proper or not. I assume the correct fix would be to
get rid of those scripts (since lld is the only consumer of them) and use the
VCS scripts from https://github.com/llvm/llvm-project/commit/23fdd5a37ff4e05
but I am not familiar enough with cmake to attempt that myself.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190219/4472f696/attachment.html>
More information about the llvm-bugs
mailing list