Summary: We originally wanted `-stdlib=libc++` by default so that it could use offloading support in libc++, however this causes issues with out the Offloading proejct itself is built. Is the user builds the LLVM libs with libstdc++ then uses this cache it will enable this option by default for the ensuing build of the offloading libraries with the newly build clang. This will cause a lot of linker failured because the C++ library doesn't match. Long term I think the proper solution to this is to make better use of clang configuration files, but I don't know a good way to do that by default. For now just make it build right.
10 lines
766 B
CMake
10 lines
766 B
CMake
set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "")
|
|
set(LLVM_ENABLE_RUNTIMES "compiler-rt;libunwind;libcxx;libcxxabi;openmp;offload" CACHE STRING "")
|
|
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "")
|
|
|
|
set(LLVM_RUNTIME_TARGETS default;amdgcn-amd-amdhsa;nvptx64-nvidia-cuda CACHE STRING "")
|
|
set(RUNTIMES_nvptx64-nvidia-cuda_CACHE_FILES "${CMAKE_SOURCE_DIR}/../libcxx/cmake/caches/NVPTX.cmake" CACHE STRING "")
|
|
set(RUNTIMES_amdgcn-amd-amdhsa_CACHE_FILES "${CMAKE_SOURCE_DIR}/../libcxx/cmake/caches/AMDGPU.cmake" CACHE STRING "")
|
|
set(RUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES "compiler-rt;libc;libcxx;libcxxabi" CACHE STRING "")
|
|
set(RUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES "compiler-rt;libc;libcxx;libcxxabi" CACHE STRING "")
|