Skip to content

Commit 0f102a2

Browse files
committed
[libclc] Fix build with Unix Makefiles
Commit #87622 broke the build. Ninja was happy with creating the output directories as necessary, but Unix Makefiles isn't. Ensure they are always created. Fixes #88626.
1 parent d0af554 commit 0f102a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libclc/cmake/modules/AddLibclc.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ function(compile_to_bc)
3939
set( TARGET_ARG "-target" ${ARG_TRIPLE} )
4040
endif()
4141

42+
# Ensure the directory we are told to output to exists
43+
get_filename_component( ARG_OUTPUT_DIR ${ARG_OUTPUT} DIRECTORY )
44+
file( MAKE_DIRECTORY ${ARG_OUTPUT_DIR} )
45+
4246
add_custom_command(
4347
OUTPUT ${ARG_OUTPUT}${TMP_SUFFIX}
4448
COMMAND libclc::clang

0 commit comments

Comments
 (0)