[cfe-dev] setting LLVM_TARGETS_TO_BUILD breaks when building clang shared library
Jerry Scharf via cfe-dev
cfe-dev at lists.llvm.org
Wed Aug 14 10:37:26 PDT 2019
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.
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190814/b33e49ed/attachment.html>
More information about the cfe-dev
mailing list