@@ -161,34 +161,14 @@ endif()
161161
162162list ( SORT LIBCLC_TARGETS_TO_BUILD )
163163
164- # Construct LLVM version define
165- set ( LLVM_VERSION_DEFINE "-DHAVE_LLVM=0x${LLVM_VERSION_MAJOR} 0${LLVM_VERSION_MINOR} " )
166-
167164# This needs to be set before any target that needs it
168165# We need to use LLVM_INCLUDE_DIRS here, because if we are linking to an
169166# llvm build directory, this includes $src/llvm/include which is where all the
170167# headers are not $build/include/ which is what LLVM_INCLUDE_DIR is set to.
171168include_directories ( ${LLVM_INCLUDE_DIRS} )
172169
173- # Setup prepare_builtins tools
174- set (LLVM_LINK_COMPONENTS
175- BitReader
176- BitWriter
177- Core
178- IRReader
179- Support
180- )
181- if ( LIBCLC_STANDALONE_BUILD )
182- add_llvm_executable( prepare_builtins utils/prepare-builtins.cpp )
183- set ( prepare_builtins_exe prepare_builtins )
184- set ( prepare_builtins_target prepare_builtins )
185- else ()
186- add_llvm_utility( prepare_builtins utils/prepare-builtins.cpp )
187- setup_host_tool( prepare_builtins PREPARE_BUILTINS prepare_builtins_exe prepare_builtins_target )
188- endif ()
189- target_compile_definitions ( prepare_builtins PRIVATE ${LLVM_VERSION_DEFINE} )
190- # These were not properly reported in early LLVM and we don't need them
191- target_compile_options ( prepare_builtins PRIVATE -fno-rtti -fno-exceptions )
170+ # Configure prepare_builtins
171+ add_subdirectory ( utils )
192172
193173# Setup arch devices
194174set ( r600--_devices cedar cypress barts cayman )
0 commit comments