diff options
author | Fraser Cormack <fraser@codeplay.com> | 2024-04-22 09:50:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-22 09:50:39 +0100 |
commit | e614e037f371e92499e19ada730f61e77d640780 (patch) | |
tree | 4b046e80475d373906f7cf7f76815258ed889f17 /libclc | |
parent | 6b6c7e46cc1e97b678e969bad78825dd02c11ff9 (diff) | |
download | llvm-e614e037f371e92499e19ada730f61e77d640780.zip llvm-e614e037f371e92499e19ada730f61e77d640780.tar.gz llvm-e614e037f371e92499e19ada730f61e77d640780.tar.bz2 |
[libclc] Fix build with Unix Makefiles (#89147)
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.
Diffstat (limited to 'libclc')
-rw-r--r-- | libclc/cmake/modules/AddLibclc.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake index 5e09cde..bbedc24 100644 --- a/libclc/cmake/modules/AddLibclc.cmake +++ b/libclc/cmake/modules/AddLibclc.cmake @@ -39,6 +39,10 @@ function(compile_to_bc) set( TARGET_ARG "-target" ${ARG_TRIPLE} ) endif() + # Ensure the directory we are told to output to exists + get_filename_component( ARG_OUTPUT_DIR ${ARG_OUTPUT} DIRECTORY ) + file( MAKE_DIRECTORY ${ARG_OUTPUT_DIR} ) + add_custom_command( OUTPUT ${ARG_OUTPUT}${TMP_SUFFIX} COMMAND libclc::clang |