setting LLVM_TARGETS_TO_BUILD breaks when building clang shared library

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

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?

Can you file a bug for this and cc me.

-Tom