@@ -178,6 +178,7 @@ function(add_libclc_alias alias target)
178
178
179
179
add_custom_command (
180
180
OUTPUT ${LIBCLC_LIBRARY_OUTPUT_INTDIR} /${alias_suffix}
181
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBCLC_LIBRARY_OUTPUT_INTDIR}
181
182
COMMAND ${CMAKE_COMMAND} -E
182
183
${LIBCLC_LINK_OR_COPY} ${target} .bc
183
184
${alias_suffix}
@@ -288,6 +289,7 @@ macro(add_libclc_builtin_set arch_suffix)
288
289
# Add prepare target
289
290
set ( obj_suffix ${arch_suffix} .bc )
290
291
add_custom_command ( OUTPUT ${LIBCLC_LIBRARY_OUTPUT_INTDIR} /${obj_suffix}
292
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBCLC_LIBRARY_OUTPUT_INTDIR}
291
293
COMMAND prepare_builtins -o ${LIBCLC_LIBRARY_OUTPUT_INTDIR} /${obj_suffix}
292
294
${builtins_opt_lib}
293
295
DEPENDS ${builtins_opt_lib} prepare_builtins )
@@ -307,9 +309,11 @@ macro(add_libclc_builtin_set arch_suffix)
307
309
308
310
# Generate remangled variants if requested
309
311
if ( LIBCLC_GENERATE_REMANGLED_VARIANTS )
310
- set (dummy_in " ${CMAKE_BINARY_DIR} /lib/clc/ libclc_dummy_in.cc" )
312
+ set ( dummy_in ${LIBCLC_LIBRARY_OUTPUT_INTDIR} / libclc_dummy_in.cc )
311
313
add_custom_command ( OUTPUT ${dummy_in}
312
- COMMAND ${CMAKE_COMMAND} -E touch ${dummy_in} )
314
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBCLC_LIBRARY_OUTPUT_INTDIR}
315
+ COMMAND ${CMAKE_COMMAND} -E touch ${dummy_in}
316
+ )
313
317
set (long_widths l32 l64)
314
318
set (char_signedness signed unsigned)
315
319
if ( ${obj_suffix} STREQUAL "libspirv-nvptx64--nvidiacl.bc" )
@@ -326,6 +330,7 @@ macro(add_libclc_builtin_set arch_suffix)
326
330
set ( builtins_remangle_path
327
331
"${LIBCLC_LIBRARY_OUTPUT_INTDIR} /remangled-${long_width} -${signedness} _char.${obj_suffix_mangled} " )
328
332
add_custom_command ( OUTPUT "${builtins_remangle_path} "
333
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBCLC_LIBRARY_OUTPUT_INTDIR}
329
334
COMMAND libclc::libclc-remangler
330
335
-o "${builtins_remangle_path} "
331
336
--long-width=${long_width}
0 commit comments