Skip to content

Commit 8040e3a

Browse files
committed
libclc: Fix building against an llvm build directory
Reviewed By: thieta Differential Revision: https://reviews.llvm.org/D142718
1 parent 4266756 commit 8040e3a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libclc/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ endif()
105105

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

110113
# Setup prepare_builtins tools
111114
set(LLVM_LINK_COMPONENTS

0 commit comments

Comments
 (0)