[all-commits] [llvm/llvm-project] 5ee53d: [libclc] Fix cross in-tree builds (#97392)
Harald van Dijk via All-commits
all-commits at lists.llvm.org
Tue Jul 2 08:27:20 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5ee53d417f41e8f452255ded1ff6a522afe17f08
https://github.com/llvm/llvm-project/commit/5ee53d417f41e8f452255ded1ff6a522afe17f08
Author: Harald van Dijk <harald.vandijk at codeplay.com>
Date: 2024-07-02 (Tue, 02 Jul 2024)
Changed paths:
M libclc/CMakeLists.txt
M libclc/cmake/modules/AddLibclc.cmake
Log Message:
-----------
[libclc] Fix cross in-tree builds (#97392)
When performing cross in-tree builds, we need native versions of various
tools, we cannot assume the cross builds that are part of the current
build are executable. LLVM provides the setup_host_tool function to
handle this, either picking up versions of tools from
LLVM_NATIVE_TOOL_DIR, or implicitly building native versions as needed.
Use it for libclc too.
LLVM's setup_host_tool function assumes the project is LLVM, so this
also needs libclc's project() to be conditional on it being built
standalone. Luckily, the only change this needs is using
CMAKE_CURRENT_SOURCE_DIR instead of PROJECT_SOURCE_DIR.
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