[PATCH] D137024: [compiler-rt] Switch from llvm-config to find_package(LLVM)

Brittany Blue Gaston via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 16 10:19:36 PST 2022


thetruestblue added a comment.



> While I sympathize with you, I don't think this is valid reason to maintain full compatibility with `llvm-config`.

A standalone build with LLVM_TOOLS_BINARY_DIR set directly could be a valid code path. We already have code to mock LLVMConfig.cmake. I believe that the mock and setting llvm_tools_dir directly allows compiler-rt is enough to build compiler-rt and run tests without llvm. 
Or perhaps a flag to indicate we're mocking llvmconfig?

The goal is to generate compiler-rt lit test suites for an arbitrary LLVM toolchain and then run the tests against it.

> Furthermore, skipping cmake files from LLVM seems wrong.

Not sure what you mean. Isn't this the default behavior for toolchain builds and standalone builds? If only compiler-rt is built, llvmconfig.cmake isn't built/added to build tree. Same for toolchains, which contain only binary files. I may be misunderstanding what you mean, though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137024



More information about the cfe-commits mailing list