[libclc] Create LIBCLC_OUTPUT_LIBRARY_DIR directory before build (#158171)
This fixes `No such file or directory` error when "Unix Makefiles"
generator is used, see https://github.com/intel/llvm/issues/20058.
Ninja generator implicitly creates output directory when generating
libclc libraries, but "Unix Makefiles" generator does not.
diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index c75f450..7960f34 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -104,6 +104,7 @@
# Note we do not adhere to LLVM_ENABLE_PER_TARGET_RUNTIME_DIR.
set( LIBCLC_OUTPUT_LIBRARY_DIR ${LIBCLC_OUTPUT_DIR}/lib/libclc )
+ file( MAKE_DIRECTORY ${LIBCLC_OUTPUT_LIBRARY_DIR} )
endif()
if( EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} )