S. Jacobi via llvm-dev
2017-Dec-26 11:00 UTC
[llvm-dev] Bootstrapping LLVM+LLD with GCC toolchain failure
Hello, I have a working GCC toolchain and wanted to use LLVM tooling instead. Following the instructions on the website I set up my build directory and have lld as an internal project under tools/. I'd like to make use of lld in stage 2 of the build and thought -DLLVM_ENABLE_LLD was the correct option to pass. However, adding this options makes the configure step fail, complaining that the compiler (GCC) does not support -fuse-ld=lld. Is it possible, and if yes - how, to set up a 2-stages build to compile LLVM, Clang and LLD so that in stage 2, only LLVM tools are part of the build process? Kind regards
Dimitry Andric via llvm-dev
2017-Dec-26 15:14 UTC
[llvm-dev] Bootstrapping LLVM+LLD with GCC toolchain failure
On 26 Dec 2017, at 12:00, S. Jacobi via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > Hello, > I have a working GCC toolchain and wanted to use LLVM tooling instead. > Following the instructions on the website I set up my build directory > and have lld as an internal project under tools/. I'd like to make use > of lld in stage 2 of the build and thought -DLLVM_ENABLE_LLD was the > correct option to pass. However, adding this options makes the > configure step fail, complaining that the compiler (GCC) does not > support -fuse-ld=lld. > Is it possible, and if yes - how, to set up a 2-stages build to compile > LLVM, Clang and LLD so that in stage 2, only LLVM tools are part of the > build process?For your second stage, use -D CMAKE_C_COMPILER=/path/to/your/first/stage/clang -D CMAKE_CXX_COMPILER=/path/to/your/first/stage/clang++, and add -D LINK_FLAGS=-fuse-ld=lld. -Dimitry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 223 bytes Desc: Message signed with OpenPGP URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171226/e5adf43c/attachment.sig>
S. Jacobi via llvm-dev
2017-Dec-26 22:23 UTC
[llvm-dev] Bootstrapping LLVM+LLD with GCC toolchain failure
On Tue, 26 Dec 2017 16:14:02 +0100 Dimitry Andric <dimitry at andric.com> wrote:> On 26 Dec 2017, at 12:00, S. Jacobi via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > > > Hello, > > I have a working GCC toolchain and wanted to use LLVM tooling > > instead. Following the instructions on the website I set up my > > build directory and have lld as an internal project under tools/. > > I'd like to make use of lld in stage 2 of the build and thought > > -DLLVM_ENABLE_LLD was the correct option to pass. However, adding > > this options makes the configure step fail, complaining that the > > compiler (GCC) does not support -fuse-ld=lld. > > Is it possible, and if yes - how, to set up a 2-stages build to > > compile LLVM, Clang and LLD so that in stage 2, only LLVM tools are > > part of the build process? > > For your second stage, use -D > CMAKE_C_COMPILER=/path/to/your/first/stage/clang -D > CMAKE_CXX_COMPILER=/path/to/your/first/stage/clang++, and add -D > LINK_FLAGS=-fuse-ld=lld. > > -Dimitry >So to achieve what I want I have to use 2 cmake invocations? Because, and I should have been clear about that in the first mail, what I was hoping for is a simple setup where I pass the -DCLANG_ENABLE_BOOTSTRAP option next to all other cmake options I want to set and after that invoke the generator once, hoping that cmake set up targets for stage 1 and 2, with the proper dependencies.