[all-commits] [llvm/llvm-project] 61664b: [clang] fix clang_cmake_builddir (#155844)

Romaric Jodin via All-commits all-commits at lists.llvm.org
Fri Sep 12 06:08:35 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 61664b61032edf8763f48099636bc7cd35ef622e
      https://github.com/llvm/llvm-project/commit/61664b61032edf8763f48099636bc7cd35ef622e
  Author: Romaric Jodin <rjodin at google.com>
  Date:   2025-09-12 (Fri, 12 Sep 2025)

  Changed paths:
    M clang/cmake/modules/CMakeLists.txt

  Log Message:
  -----------
  [clang] fix clang_cmake_builddir (#155844)

When building llvm from a subdirectory (like clspv does)
`CMAKE_BINARY_DIR` is at the top of the build directory.

When building runtimes (libclc for example), the build fails looking for
clang (through `find_package` looking at `LLVM_BINARY_DIR` with
`NO_DEFAULT_PATH` & `NO_CMAKE_FIND_ROOT_PATH`) because clang is not in
`LLVM_BINARY_DIR`.

Fix that issue by setting `clang_cmake_builddir` the same way we set
`llvm_cmake_builddir` from `LLVM_BINARY_DIR`.

For default llvm build (using llvm as the main cmake project), it should
not change anything.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list