forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libclc] Fix cross in-tree builds (llvm#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.
- Loading branch information
1 parent
516a564
commit 1da4cd1
Showing
2 changed files
with
38 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters