public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Conrad Kostecki" <conikost@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/opencl-clang/files/, dev-libs/opencl-clang/
Date: Wed, 26 Jul 2023 21:23:32 +0000 (UTC)	[thread overview]
Message-ID: <1690406598.09b1fff61dab3c13a6f38ba3645ff606a4c317a2.conikost@gentoo> (raw)

commit:     09b1fff61dab3c13a6f38ba3645ff606a4c317a2
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 26 21:20:15 2023 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Wed Jul 26 21:23:18 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09b1fff6

dev-libs/opencl-clang: fix so install

Closes: https://bugs.gentoo.org/909399
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../files/opencl-clang-16.0.0-llvm.patch           | 79 ++++++++++++++++++++--
 ...16.0.0.ebuild => opencl-clang-16.0.0-r1.ebuild} |  0
 2 files changed, 72 insertions(+), 7 deletions(-)

diff --git a/dev-libs/opencl-clang/files/opencl-clang-16.0.0-llvm.patch b/dev-libs/opencl-clang/files/opencl-clang-16.0.0-llvm.patch
index 67759595b353..659a2b90bf6c 100644
--- a/dev-libs/opencl-clang/files/opencl-clang-16.0.0-llvm.patch
+++ b/dev-libs/opencl-clang/files/opencl-clang-16.0.0-llvm.patch
@@ -1,9 +1,73 @@
+commit e047ae6bb9cef488781e0b06c5ae9018bacb24c4
+Author: Wenju He <wenju.he@intel.com>
+Date:   Thu May 18 16:01:52 2023 +0800
+
+    Revert to use add_llvm_library and revert linking LLVM libraries (#438)
+    
+    Add cmake option EXCLUDE_LIBS_FROM_ALL to remove a specific llvm library
+    from llvm 'all'.
+    
+    This PR partially reverts 743bd15.
+    This PR addresses #401, #417, #418, #422, and brings back SONAME.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a7d1927..be4fefd 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -335,36 +335,7 @@
- target_link_libraries( ${TARGET_NAME}
-                        LINK_PRIVATE
-                        ${OPENCL_CLANG_LINK_LIBS}
+@@ -298,21 +298,23 @@ else()
+   )
+ endif()
+ 
+-add_library(${TARGET_NAME} SHARED
+-    ${TARGET_INCLUDE_FILES}
+-    ${TARGET_SOURCE_FILES}
+-    $<TARGET_OBJECTS:cl_headers>
+-)
+-
+-# Same CRT compile option are reqiured to avoid link errors on Windows.
+-# MD and MDd are choosed by default for release and debug build in LLVM.
+-# If users set MT or MTd flags, they also need to add the flags for
+-# opencl-clang sources using a custom macro set_msvc_crt_flags.
+-if(COMMAND set_msvc_crt_flags)
+-    set_msvc_crt_flags(${TARGET_NAME})
++set(EXCLUDE_LIBS_FROM_ALL "" CACHE STRING "Space-separated list of LLVM libraries to exclude from all")
++llvm_map_components_to_libnames(ALL_LLVM_LIBS all)
++if (NOT "${EXCLUDE_LIBS_FROM_ALL}" STREQUAL "")
++  list(REMOVE_ITEM ALL_LLVM_LIBS ${EXCLUDE_LIBS_FROM_ALL})
+ endif()
++list(APPEND OPENCL_CLANG_LINK_LIBS ${ALL_LLVM_LIBS})
++
++add_llvm_library(${TARGET_NAME} SHARED
++  ${TARGET_INCLUDE_FILES}
++  ${TARGET_SOURCE_FILES}
++  $<TARGET_OBJECTS:cl_headers>
+ 
+-add_dependencies(${TARGET_NAME} CClangCompileOptions)
++  DEPENDS CClangCompileOptions
++
++  LINK_LIBS
++    ${OPENCL_CLANG_LINK_LIBS}
++  )
+ 
+ if (WIN32)
+     # Enable compiler generation of Control Flow Guard security checks.
+@@ -328,51 +330,6 @@ elseif(UNIX)
+         LINK_FLAGS " -Wl,--no-undefined")
+ endif(WIN32)
+ 
+-# Enable new IN_LIST operator.
+-cmake_policy(SET CMP0057 NEW)
+-set(OTHER_LIBRARIES)
+-if ("NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD)
+-    list(APPEND OTHER_LIBRARIES LLVMNVPTXCodeGen LLVMNVPTXDesc LLVMNVPTXInfo)
+-endif()
+-if ("AMDGPU" IN_LIST LLVM_TARGETS_TO_BUILD)
+-    list(APPEND OTHER_LIBRARIES LLVMAMDGPUCodeGen LLVMAMDGPUAsmParser LLVMAMDGPUDesc LLVMAMDGPUInfo)
+-endif()
+-
+-target_link_libraries( ${TARGET_NAME}
+-                       LINK_PRIVATE
+-                       ${OPENCL_CLANG_LINK_LIBS}
 -                       LLVMX86CodeGen
 -                       LLVMX86AsmParser
 -                       LLVMX86Desc
@@ -34,7 +98,8 @@
 -                       LLVMTarget
 -                       LLVMBitReader
 -                       ${OTHER_LIBRARIES}
-+                       LLVM
-                       )
- 
+-                      )
+-
  install(FILES opencl_clang.h
+         DESTINATION include/cclang
+         COMPONENT ${TARGET_NAME})

diff --git a/dev-libs/opencl-clang/opencl-clang-16.0.0.ebuild b/dev-libs/opencl-clang/opencl-clang-16.0.0-r1.ebuild
similarity index 100%
rename from dev-libs/opencl-clang/opencl-clang-16.0.0.ebuild
rename to dev-libs/opencl-clang/opencl-clang-16.0.0-r1.ebuild


             reply	other threads:[~2023-07-26 21:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 21:23 Conrad Kostecki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-23 23:36 [gentoo-commits] repo/gentoo:master commit in: dev-libs/opencl-clang/files/, dev-libs/opencl-clang/ Conrad Kostecki
2021-02-27 14:39 Conrad Kostecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1690406598.09b1fff61dab3c13a6f38ba3645ff606a4c317a2.conikost@gentoo \
    --to=conikost@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox