Skip to content

Commit

Permalink
libclc: Fix building against an llvm build directory
Browse files Browse the repository at this point in the history
Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D142718

(cherry picked from commit 8040e3a)
  • Loading branch information
tstellar committed Jan 28, 2023
1 parent f797fef commit 4208362
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libclc/CMakeLists.txt
Expand Up @@ -105,7 +105,10 @@ endif()

enable_language( CLC LLAsm )
# This needs to be set before any target that needs it
include_directories( ${LLVM_INCLUDE_DIR} )
# We need to use LLVM_INCLUDE_DIRS here, because if we are linking to an
# llvm build directory, this includes $src/llvm/include which is where all the
# headers are not $build/include/ which is what LLVM_INCLUDE_DIR is set to.
include_directories( ${LLVM_INCLUDE_DIRS} )

# Setup prepare_builtins tools
set(LLVM_LINK_COMPONENTS
Expand Down

0 comments on commit 4208362

Please sign in to comment.