[libclc] de8859d - [libclc] Create LIBCLC_OUTPUT_LIBRARY_DIR directory before build (#158171)

via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 12 04:02:33 PDT 2025


Author: Wenju He
Date: 2025-09-12T19:02:30+08:00
New Revision: de8859da5485ab06b7331c37f98aa778cb469e6b

URL: https://github.com/llvm/llvm-project/commit/de8859da5485ab06b7331c37f98aa778cb469e6b
DIFF: https://github.com/llvm/llvm-project/commit/de8859da5485ab06b7331c37f98aa778cb469e6b.diff

LOG: [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.

Added: 
    

Modified: 
    libclc/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index c75f450d8d3ad..7960f3494770e 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -104,6 +104,7 @@ else()
 
   # 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} )


        


More information about the cfe-commits mailing list