[llvm-dev] Building lld

120 views
Skip to first unread message

Josh Sharp via llvm-dev

unread,
Mar 13, 2019, 2:46:09 PM3/13/19
to via llvm-dev
I tried to build lld by following these steps: https://lld.llvm.org/getting_started.html

But after 'make install' I can't find lld anywhere and 'make check-lld' results in this message:

make: *** No rule to make target 'check-lld'.  Stop.

Any idea?

Rui Ueyama via llvm-dev

unread,
Mar 13, 2019, 3:50:28 PM3/13/19
to Josh Sharp, via llvm-dev
lld is installed as ld.lld, so please look for ld.lld.

_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Josh Sharp via llvm-dev

unread,
Mar 19, 2019, 6:14:45 PM3/19/19
to Rui Ueyama, via llvm-dev
I tried deleting my build directory and restarting from scratch

$ cd llvm-project
$ mkdir build && cd build
$ cmake -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS=lld ../llvm
$ make
I got this error:

make[2]: *** No rule to make target 'llvm/cmake/modules/GenerateVersionFromVCS.cmake', needed by 'tools/lld/Common/VCSVersion.inc'.  Stop.
CMakeFiles/Makefile2:57166: recipe for target 'tools/lld/Common/CMakeFiles/lldCommon.dir/all' failed
make[1]: *** [tools/lld/Common/CMakeFiles/lldCommon.dir/all] Error 2
Makefile:151: recipe for target 'all' failed



Any idea?

From: Rui Ueyama <ru...@google.com>
Sent: Wednesday, March 13, 2019 12:49 PM
To: Josh Sharp
Cc: via llvm-dev
Subject: Re: [llvm-dev] Building lld
 

Shoaib Meenai via llvm-dev

unread,
Mar 19, 2019, 6:48:56 PM3/19/19
to Josh Sharp, Rui Ueyama, via llvm-dev

Hmm … does the file llvm-project/llvm/cmake/modules/GenerateVersionFromVCS.cmake exist? Can you `git pull`, and does `git status` show any changes?

Zachary Turner via llvm-dev

unread,
Mar 20, 2019, 1:39:52 PM3/20/19
to Shoaib Meenai, via llvm-dev
Judging by this path:

needed by 'tools/lld/Common/VCSVersion.inc'  

It looks to me like this is **not** a monorepo layout (if it were, lld would not appear in the tools directory).  Therefore the LLVM_ENABLE_PROJECTS=lld is not even doing anything.

I don't know how to build without a monorepo these days, and I also don't know what the most recent guidance setting up a monorepo is, but maybe someone else can chime in.

Josh Sharp via llvm-dev

unread,
Mar 20, 2019, 1:52:59 PM3/20/19
to Zachary Turner, Shoaib Meenai, via llvm-dev
The way I'm having it set up, inside my llvm-project directory, there are 3 sub-directories at the same level: llvm, build and lld

From: Zachary Turner <ztu...@google.com>
Sent: Wednesday, March 20, 2019 10:38 AM
To: Shoaib Meenai
Cc: Josh Sharp; Rui Ueyama; via llvm-dev

Zachary Turner via llvm-dev

unread,
Mar 20, 2019, 1:59:16 PM3/20/19
to Josh Sharp, via llvm-dev
What URL did you clone from?

Rui Ueyama via llvm-dev

unread,
Mar 20, 2019, 2:00:58 PM3/20/19
to Josh Sharp, via llvm-dev
Did you follow the instruction on https://lld.llvm.org/getting_started.html? I mean is this what you typed in?
$ cd llvm-project
$ mkdir build && cd build
$ cmake -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS=lld ../llvm
$ make
On Wed, Mar 20, 2019 at 10:52 AM Josh Sharp <mm9...@hotmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages