MaskRay added a comment. In D101194#2721682 <https://reviews.llvm.org/D101194#2721682>, @phosek wrote:
> In D101194#2721643 <https://reviews.llvm.org/D101194#2721643>, @MaskRay wrote: > >> multiarch is not consistent within GCC, either (also note that not all GCC >> installations are configured with multiarch. `--print-multiarch` prints an >> empty line). >> I have tried various GCC installations and made a summary >> https://maskray.me/blog/2021-03-28-compiler-driver-and-cross-compilation : >> even if the multiarch triple for x86_64 Linux is `x86_64-linux-gnu`, there >> are a few `x86_64-pc-linux-gnu` paths. (You can configure and get >> `x86_64-pc-linux-gnu-gcc` or `x86_64-unknown-linux-gnu-gcc`) >> For musl systems (`*-linux-musl`), multiarch doesn't make sense. If we use >> multiarch, we'll need to invent `*-linux-musl` for them. >> >> For some GCC related paths, we have no choice but to detect their paths. For >> entirely clang internal stuff (runtime library paths), I actually appreciate >> that we have a useful, un-normalized 'vendor' part. >> It gives users a choice if they want to have `x86_64-pc[12345]-linux-gnu`. >> This argument is weak, but the other arguments are probably stronger. My >> viewpoint is: if we can avoid multiarch, just avoid it. > > SGTM, I'll partially revert this change and switch back to using normalized > triples if that's fine with you. LG, thanks! >> I haven't figured out how to do a proper runtime build... >> >> `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on -DLLVM_RUNTIME_TARGETS=default >> -DLLVM_ENABLE_RUNTIMES='compiler-rt;libcxx;libunwind' ` gives me >> >> CMake Error at /usr/share/cmake-3.18/Modules/ExternalProject.cmake:3152 >> (add_custom_target): >> >> >> add_custom_target cannot create target "builtins" because another target >> >> >> >> with the same name already exists. The existing target is a custom >> target >> >> >> created in source directory >> >> >> >> "/home/maskray/llvm/compiler-rt/lib/builtins". See >> >> >> >> documentation for policy CMP0002 for more details. >> >> >> >> Call Stack (most recent call first): >> >> >> >> cmake/modules/LLVMExternalProjectUtils.cmake:283 (ExternalProject_Add) >> >> >> >> runtimes/CMakeLists.txt:81 (llvm_ExternalProject_Add) >> >> >> >> runtimes/CMakeLists.txt:134 (builtin_default_target) > > You also need `-DLLVM_BUILTIN_TARGETS=default`. Yes, `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on -DLLVM_RUNTIME_TARGETS=default -DLLVM_ENABLE_RUNTIMES='compiler-rt;libcxx;libunwind' -DLLVM_BUILTIN_TARGETS=default -DLLVM_ENABLE_PROJECTS='clang;lld'` works. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101194/new/ https://reviews.llvm.org/D101194 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits