[llvm-branch-commits] [libclc] release/20.x: [libclc] Stop installing CLC headers (#126908) (PR #130017)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Mar 6 01:01:11 PST 2025


https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/130017

Backport a2b05761724e5243056988d9d6bf1a5a94715b74

Requested by: @frasercrmck

>From 11b893892cd56d43420bde2d4de33339038479cf Mon Sep 17 00:00:00 2001
From: Fraser Cormack <fraser at codeplay.com>
Date: Thu, 6 Mar 2025 08:52:23 +0000
Subject: [PATCH] [libclc] Stop installing CLC headers (#126908)

The libclc headers are an implementation detail and are not intended to
be used by others as OpenCL headers. The only artifacts of libclc we
want to publish are the LLVM bytecode libraries.

As the headers have been incidentally broken by recent changes, this
commit takes the step to stop installing the headers at all. Downstreams
can use clang's own OpenCL headers, and/or its -fdeclare-opencl-builtins
flag.

Fixes #119967.

(cherry picked from commit a2b05761724e5243056988d9d6bf1a5a94715b74)
---
 libclc/CMakeLists.txt | 1 -
 libclc/libclc.pc.in   | 2 --
 2 files changed, 3 deletions(-)

diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index 43e213b385f5d..ad102e5100bde 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -226,7 +226,6 @@ set( tahiti_aliases pitcairn verde oland hainan bonaire kabini kaveri hawaii
 # pkg-config file
 configure_file( libclc.pc.in libclc.pc @ONLY )
 install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libclc.pc DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig" )
-install( DIRECTORY generic/include/clc DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" )
 
 if( ENABLE_RUNTIME_SUBNORMAL )
   foreach( file IN ITEMS subnormal_use_default subnormal_disable )
diff --git a/libclc/libclc.pc.in b/libclc/libclc.pc.in
index b6e06c9673501..3a9e58b3ef0cc 100644
--- a/libclc/libclc.pc.in
+++ b/libclc/libclc.pc.in
@@ -1,8 +1,6 @@
-includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@
 libexecdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATADIR@/clc
 
 Name: libclc
 Description: Library requirements of the OpenCL C programming language
 Version: @PROJECT_VERSION@
-Cflags: -I${includedir}
 Libs: -L${libexecdir}



More information about the llvm-branch-commits mailing list