https://github.com/frasercrmck created 
https://github.com/llvm/llvm-project/pull/109926

The ARCHIVE artifact kind is not valid for install(FILES ...).

Additionally, install wasn't resolving the target's TARGET_FILE properly and 
was trying to find it in the top-level build directory, rather than in the 
libclc binary directory. All other install() invocations in libclc explicitly 
use CMAKE_CURRENT_BINARY_DIR, so use this for consistency. There might be 
another more modern way of doing this.

>From 55b7c432c8abafcf721cf1bab8f099253dedf1a0 Mon Sep 17 00:00:00 2001
From: Fraser Cormack <fra...@codeplay.com>
Date: Wed, 25 Sep 2024 09:18:10 +0100
Subject: [PATCH] [libclc] Fix installation w/ ENABLE_RUNTIME_SUBNORMAL

The ARCHIVE artifact kind is not valid for install(FILES ...).

Additionally, install wasn't resolving the target's TARGET_FILE properly
and was trying to find it in the top-level build directory, rather than
in the libclc binary directory. All other install() invocations in
libclc explicitly use CMAKE_CURRENT_BINARY_DIR, so use this for
consistency. There might be another more modern way of doing this.
---
 libclc/CMakeLists.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index 1bf7eb2ca7ed7e..df29e702733e94 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -221,8 +221,10 @@ if( ENABLE_RUNTIME_SUBNORMAL )
        TARGET ${file}
        INPUTS ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/${file}.ll
     )
-    install( FILES $<TARGET_PROPERTY:${file},TARGET_FILE> ARCHIVE
-      DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
+    install(
+      FILES ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_PROPERTY:${file},TARGET_FILE>
+      DESTINATION "${CMAKE_INSTALL_DATADIR}/clc"
+    )
   endforeach()
 endif()
 

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to