[PATCH] D126699: [CMake] Skip linker check if the LLVM_LINKER_WORKS is set

Pavel Samolysov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 07:05:50 PDT 2022


psamolysov added a comment.

@thieta A problem occurs when I try to build LLVM with runtime components for RISCV, for example and in fact, CMake cross-compiles the components in this case. So, If I set `-DLLVM_ENABLE_LLD=ON`, the following errors are issued due to LLVM's attempt to check the linker:

  ld.lld: error: cannot open crtbeginS.o: No such file or directory
  ld.lld: error: cannot open crtendS.o: No such file or directory

This is because the `crt` components have not been built yet and what the build system is actually doing is building the runtime components.

What about the more prescriptive name, thank you for the advice. I'm going to change the variable name to `LLVM_LINKER_SKIP_TEST`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126699/new/

https://reviews.llvm.org/D126699



More information about the llvm-commits mailing list