opencl-clang: updated to 16.0.0 v16.0.0 opencl-clang linked against LLVM 16 librariesdiff -r1.13 -r1.14 pkgsrc/parallel/opencl-clang/Makefile
(adam)
@@ -1,26 +1,26 @@ | @@ -1,26 +1,26 @@ | |||
1 | # $NetBSD: Makefile,v 1.13 2023/11/08 13:20:39 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.14 2023/12/14 13:16:05 adam Exp $ | |
2 | 2 | |||
3 | DISTNAME= opencl-clang-15.0.0 | 3 | DISTNAME= opencl-clang-16.0.0 | |
4 | PKGREVISION= 3 | |||
5 | CATEGORIES= parallel | 4 | CATEGORIES= parallel | |
6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=intel/} | 5 | MASTER_SITES= ${MASTER_SITE_GITHUB:=intel/} | |
7 | GITHUB_PROJECT= opencl-clang # do not remove this, it breaks cwrappers | 6 | GITHUB_PROJECT= opencl-clang # do not remove this, it breaks cwrappers | |
8 | GITHUB_TAG= v${PKGVERSION_NOREV} | 7 | GITHUB_TAG= v${PKGVERSION_NOREV} | |
9 | 8 | |||
10 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
11 | HOMEPAGE= https://github.com/intel/opencl-clang | 10 | HOMEPAGE= https://github.com/intel/opencl-clang | |
12 | COMMENT= OpenCL-oriented wrapper library around clang | 11 | COMMENT= OpenCL-oriented wrapper library around clang | |
13 | LICENSE= modified-bsd | 12 | LICENSE= modified-bsd | |
14 | 13 | |||
15 | USE_CMAKE= yes | 14 | USE_CXX_FEATURES= c++17 | |
16 | USE_LANGUAGES= c c++ | 15 | FORCE_CXX_STD= c++17 | |
17 | 16 | USE_LANGUAGES= c c++ | ||
18 | # C++14 | 17 | ||
19 | GCC_REQD+= 7 # sync with llvm/clang | 18 | BUILDLINK_TRANSFORM.Darwin+= rm:-Wl,--no-undefined | |
20 | 19 | BUILDLINK_TRANSFORM.Darwin+= rm:-Wl,-Bsymbolic | ||
21 | BUILDLINK_TRANSFORM.Darwin+= rm:-Wl,--version-script=${WRKSRC}/common_clang.map | 20 | BUILDLINK_TRANSFORM.Darwin+= rm:-Wl,--version-script=${WRKSRC}/opencl_clang.map | |
22 | BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,--version-script=${WRKSRC}/common_clang.map | 21 | BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,--version-script=${WRKSRC}/opencl_clang.map | |
23 | 22 | |||
23 | .include "../../devel/cmake/build.mk" | |||
24 | .include "../../parallel/spirv-llvm-translator/buildlink3.mk" | 24 | .include "../../parallel/spirv-llvm-translator/buildlink3.mk" | |
25 | .include "../../lang/clang/buildlink3.mk" | 25 | .include "../../lang/clang/buildlink3.mk" | |
26 | .include "../../mk/bsd.pkg.mk" | 26 | .include "../../mk/bsd.pkg.mk" |
@@ -1,4 +1,7 @@ | @@ -1,4 +1,7 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.5 2022/11/19 12:35:57 adam Exp $ | 1 | @comment $NetBSD: PLIST,v 1.6 2023/12/14 13:16:05 adam Exp $ | |
2 | include/cclang/common_clang.h | 2 | include/cclang/module.modulemap | |
3 | include/cclang/opencl-c-base.h | |||
4 | include/cclang/opencl-c.h | |||
5 | include/cclang/opencl_clang.h | |||
3 | lib/libopencl-clang.so | 6 | lib/libopencl-clang.so | |
4 | lib/libopencl-clang.so.15 | 7 | lib/libopencl-clang.so.16 |
@@ -1,5 +1,7 @@ | @@ -1,5 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.8 2022/11/14 19:02:04 adam Exp $ | 1 | $NetBSD: distinfo,v 1.9 2023/12/14 13:16:05 adam Exp $ | |
2 | 2 | |||
3 | BLAKE2s (opencl-clang-15.0.0.tar.gz) = 24dd74013a9a4f889626d002582cc87dd00bfb0015b6d6c35f252f6358789321 | 3 | BLAKE2s (opencl-clang-16.0.0.tar.gz) = cd3f135e8cb3f788680e30704d5880732da241ae6652f48670d38cff585e1c8e | |
4 | SHA512 (opencl-clang-15.0.0.tar.gz) = a2ffce43493793524e9512be2e7bd46c0183b86b35a6f79018d355d07a83303a944e6dacebfb768e88ce75a7020a44939be872a2d4e754544198a9829f4febd4 | 4 | SHA512 (opencl-clang-16.0.0.tar.gz) = bf723edab7dc7a028eb79d01fd2306690a2169472760bf2783d593ffec4eb788f28f184c66b204cc074cb95a4149fcc63a1dcbee5563c620a9dc2c76bb5a2d5a | |
5 | Size (opencl-clang-15.0.0.tar.gz) = 26212 bytes | 5 | Size (opencl-clang-16.0.0.tar.gz) = 28413 bytes | |
6 | SHA1 (patch-CMakeLists.txt) = 844cac5dedb87b2de098955cebae1bf83341d9e5 | |||
7 | SHA1 (patch-cl__headers_CMakeLists.txt) = fc3d935aff7314d1a194b5802c63cdb125f8ec34 |
$NetBSD: patch-CMakeLists.txt,v 1.3 2023/12/14 13:16:06 adam Exp $
Revert to use add_llvm_library and revert linking LLVM libraries
https://github.com/intel/opencl-clang/pull/438
--- CMakeLists.txt.orig 2023-04-13 01:08:59.000000000 +0000
+++ CMakeLists.txt
@@ -292,21 +292,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_dependencies(${TARGET_NAME} CClangCompileOptions)
+add_llvm_library(${TARGET_NAME} SHARED
+ ${TARGET_INCLUDE_FILES}
+ ${TARGET_SOURCE_FILES}
+ $<TARGET_OBJECTS:cl_headers>
+
+ DEPENDS CClangCompileOptions
+
+ LINK_LIBS
+ ${OPENCL_CLANG_LINK_LIBS}
+ )
if (WIN32)
# Enable compiler generation of Control Flow Guard security checks.
@@ -322,51 +324,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
- LLVMX86Info
- LLVMX86Disassembler
- LLVMAnalysis
- LLVMCodeGen
- LLVMCore
- LLVMipo
- LLVMInstCombine
- LLVMInstrumentation
- LLVMMC
- LLVMMCParser
- LLVMObjCARCOpts
- LLVMOption
- LLVMScalarOpts
- LLVMSupport
- LLVMTransformUtils
- LLVMVectorize
- LLVMAsmPrinter
- LLVMSelectionDAG
- LLVMMCDisassembler
- LLVMProfileData
- LLVMObject
- LLVMBitWriter
- LLVMIRReader
- LLVMAsmParser
- LLVMTarget
- LLVMBitReader
- ${OTHER_LIBRARIES}
- )
-
install(FILES opencl_clang.h
DESTINATION include/cclang
COMPONENT ${TARGET_NAME})