setting LLVM_TARGETS_TO_BUILD breaks when building clang shared library

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

setting LLVM_TARGETS_TO_BUILD breaks when building clang shared library

Kristóf Umann via cfe-dev

Hi,

I am building clang 8.0.1 from source and tried using -DLLVM_TARGETS_TO_BUILD="X86" as part of the cmake input along with shared libraries. LLVM builds fine, the clang executable builds fine but the clang .so fails, saying all the other arch entry points are missing. As soon as I change X86 to all for both llvm and clang, it works fine. I am bootstrapping with gcc9/ld first, then I will try it with clang/lld.
Is this something I am doing wrong or is there a build bug?

cmake command for llvm:

LD_LIBRARY_PATH="/usr/local/compilers/gcc9/lib64" cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Relea
se -DCMAKE_C_COMPILER=/usr/local/compilers/gcc9/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/compilers/gc
c9/bin/g++ -DCMAKE_INSTALL_PREFIX=/usr/local/compilers/clang8 -DLLVM_TARGETS_TO_BUILD="all" -DLLVM_B
UILD_LLVM_DYLIB=true -DLLVM_LINK_LLVM_DYLIB=true ../../llvm-8.0.1.src

clang:

LD_LIBRARY_PATH="/usr/local/compilers/gcc9/lib64" cmake -G "Unix Makefiles" -D
CMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/local/compilers/gcc9/bin/gcc
-DCMAKE_CXX_COMPILER=/usr/local/compilers/gcc9/bin/g++ -DCMAKE_INSTALL_PREFIX=
/usr/local/compilers/clang8 -DLLVM_TARGETS_TO_BUILD="all" -DLLVM_BUILD_LLVM_DY
LIB=true -DLLVM_LINK_LLVM_DYLIB=true -DCMAKE_C_FLAGS="-L/usr/local/compilers/c
lang8/lib" -DCMAKE_CXX_FLAGS="-L/usr/local/compilers/clang8/lib" ../../cfe-8.0
.1.src

thanks,

jerry



_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev