Hi. I'm trying to use Clang/LLVM as a cross-compiling toolchain. In previous version of LLVM with the old configure/Makefile building system, I'm able to build Clang/LLVM for target architecture with the host GCC firstly and then use the generated cross compiler to compile the compiler-rt project, and, consequently, I can get a cross compiler as well as the compiler-rt library. However, when I move to version 3.9 which abandoned configure/Makefile and uses CMake now, it always compile the compiler-rt simultaneously with the host GCC. The same problem is also existing in 3.5 CMake building system. It seems that in the CMake building system compiler-rt is not dependent on the generated toolchain. I also tried to compile the compiler-rt after Clang/LLVM has been built, and there is another problem that the generated Clang/LLVM cannot pass the CMake checking without compiler-rt, which is obvious... So is there any way that I can solve this problem. Thank you. Lei Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160503/a2bf0d1e/attachment.html>
Hi WangLei, Do you mean that the version 3.9 is LLVM project 3.9 and 3.5 is CMake 3.5? In the guide[GetStarted.rst], the tutorial says before running CMake command, you must checkout all the source code. CMake does not pickup newly added source directories in incremental builds. Have you cross-compiled the LLVM/Clang for ARM, or other successfully? Cheers, Liyang 2016-05-03 14:42 GMT+08:00 王磊 via llvm-dev <llvm-dev at lists.llvm.org>:> > Hi. > I'm trying to use Clang/LLVM as a cross-compiling toolchain. In previous > version of LLVM with the old configure/Makefile building system, I'm able > to build Clang/LLVM for target architecture with the host GCC firstly and > then use the generated cross compiler to compile the compiler-rt project, > and, consequently, I can get a cross compiler as well as the compiler-rt > library. However, when I move to version 3.9 which abandoned > configure/Makefile and uses CMake now, it always compile the compiler-rt > simultaneously with the host GCC. The same problem is also existing in 3.5 > CMake building system. It seems that in the CMake building system > compiler-rt is not dependent on the generated toolchain. I also tried to > compile the compiler-rt after Clang/LLVM has been built, and there is > another problem that the generated Clang/LLVM cannot pass the CMake > checking without compiler-rt, which is obvious... So is there any way that > I can solve this problem. Thank you. > > Lei Wang > > > <#m_-2483977491504695984_> > > > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160503/a806b4a4/attachment.html>
Chris Bieneman via llvm-dev
2016-May-03 16:28 UTC
[llvm-dev] Problem on cross-compiling compiler-rt
This is currently a rough area in our build system, but there are two CMake options you probably need to set. (1) -DLLVM_BUILD_EXTERNAL_COMPILER_RT=On —> This option causes the build to use the just-built clang when building compiler-rt (2) -DCOMPILER_RT_DEFAULT_TARGET_ARCH=??? —> This is where you specify which architecture you want to build the compiler-rt archives and libraries for Hopefully in the near future we’ll have a better story for building this functionality. Hope this helps, -Chris> On May 3, 2016, at 12:09 AM, 李阳 via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi WangLei, > > Do you mean that the version 3.9 is LLVM project 3.9 and 3.5 is CMake 3.5? > > In the guide[GetStarted.rst], the tutorial says before running CMake command, you must checkout all the source code. CMake does not pickup newly added source directories in incremental builds. > > Have you cross-compiled the LLVM/Clang for ARM, or other successfully? > > Cheers, > Liyang > > 2016-05-03 14:42 GMT+08:00 王磊 via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>>: > > Hi. > I'm trying to use Clang/LLVM as a cross-compiling toolchain. In previous version of LLVM with the old configure/Makefile building system, I'm able to build Clang/LLVM for target architecture with the host GCC firstly and then use the generated cross compiler to compile the compiler-rt project, and, consequently, I can get a cross compiler as well as the compiler-rt library. However, when I move to version 3.9 which abandoned configure/Makefile and uses CMake now, it always compile the compiler-rt simultaneously with the host GCC. The same problem is also existing in 3.5 CMake building system. It seems that in the CMake building system compiler-rt is not dependent on the generated toolchain. I also tried to compile the compiler-rt after Clang/LLVM has been built, and there is another problem that the generated Clang/LLVM cannot pass the CMake checking without compiler-rt, which is obvious... So is there any way that I can solve this problem. Thank you. > > Lei Wang > > > <> <> <> <x-msg://106/#m_-2483977491504695984_> <> > > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160503/6aa142cb/attachment.html>
Possibly Parallel Threads
- Problem on cross-compiling compiler-rt
- Problem on cross-compiling compiler-rt
- bug: cross-compile Clang/LLVM for ARM using Clang/LLVM
- Problem about compiling the LLVM source code on QEMU running the aarch64?
- Problem about compiling the LLVM source code on QEMU running the aarch64?