head	1.5;
access;
symbols
	pkgsrc-2024Q2:1.4.0.2
	pkgsrc-2024Q2-base:1.4
	pkgsrc-2024Q1:1.3.0.4
	pkgsrc-2024Q1-base:1.3
	pkgsrc-2023Q4:1.3.0.2
	pkgsrc-2023Q4-base:1.3
	pkgsrc-2022Q2:1.1.0.6
	pkgsrc-2022Q2-base:1.1
	pkgsrc-2022Q1:1.1.0.4
	pkgsrc-2022Q1-base:1.1
	pkgsrc-2021Q4:1.1.0.2
	pkgsrc-2021Q4-base:1.1;
locks; strict;
comment	@# @;


1.5
date	2024.07.09.06.21.17;	author wiz;	state dead;
branches;
next	1.4;
commitid	OUoKJMNImBP828hF;

1.4
date	2024.04.22.07.55.27;	author adam;	state Exp;
branches;
next	1.3;
commitid	NAkG2uZsX0DR377F;

1.3
date	2023.12.14.13.16.06;	author adam;	state Exp;
branches;
next	1.2;
commitid	GhNtIzIWCIGQ0rQE;

1.2
date	2022.08.15.20.45.21;	author tnn;	state dead;
branches;
next	1.1;
commitid	u33D1u7RMQax71QD;

1.1
date	2021.11.23.20.55.44;	author wiz;	state Exp;
branches;
next	;
commitid	1fDG4kXskvkoGXhD;


desc
@@


1.5
log
@opencl-clang: update to 18.1.0.

Update for llvm 18.
@
text
@$NetBSD: patch-CMakeLists.txt,v 1.4 2024/04/22 07:55:27 adam Exp $

Change LLVM version to 17 and use major version only
https://github.com/intel/opencl-clang/pull/487

--- CMakeLists.txt.orig	2024-04-21 19:40:03.178354550 +0000
+++ CMakeLists.txt
@@@@ -1,7 +1,7 @@@@
 cmake_minimum_required(VERSION 3.13.4)
 
 if(NOT DEFINED BASE_LLVM_VERSION)
-  set(BASE_LLVM_VERSION 16.0.0)
+  set(BASE_LLVM_VERSION 17.0.0)
 endif(NOT DEFINED BASE_LLVM_VERSION)
 set(OPENCL_CLANG_VERSION ${BASE_LLVM_VERSION}.0)
 
@@@@ -46,7 +46,7 @@@@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRE
     add_definitions(-DUSE_PREBUILT_LLVM)
 
     if(NOT PREFERRED_LLVM_VERSION)
-        set(PREFERRED_LLVM_VERSION "16.0.0")
+        set(PREFERRED_LLVM_VERSION "17")
     endif(NOT PREFERRED_LLVM_VERSION)
     message(STATUS "[OPENCL-CLANG] Looking for LLVM version ${PREFERRED_LLVM_VERSION}")
     find_package(LLVM ${PREFERRED_LLVM_VERSION} REQUIRED)
@


1.4
log
@opencl-clang: updated to 17.0.0

17.0.0
This release is linked against LLVM 17.0.1 and SPIR-V LLVM translator v17.0.0.
@
text
@d1 1
a1 1
$NetBSD: patch-CMakeLists.txt,v 1.3 2023/12/14 13:16:06 adam Exp $
@


1.3
log
@opencl-clang: updated to 16.0.0

v16.0.0
opencl-clang linked against LLVM 16 libraries
@
text
@d1 1
a1 1
$NetBSD$
d3 2
a4 2
Revert to use add_llvm_library and revert linking LLVM libraries
https://github.com/intel/opencl-clang/pull/438
d6 1
a6 1
--- CMakeLists.txt.orig	2023-04-13 01:08:59.000000000 +0000
d8 2
a9 3
@@@@ -292,21 +292,23 @@@@ else()
   )
 endif()
d11 5
a15 18
-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})
d17 2
a18 11
-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}
+  )
d20 6
a25 54
 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})
@


1.2
log
@opencl-clang: update to 14.0.0 to fix the build

Changes unknown + untested.
@
text
@d1 1
a1 1
$NetBSD: patch-CMakeLists.txt,v 1.1 2021/11/23 20:55:44 wiz Exp $
d3 2
a4 2
Default to llvm 13.
https://github.com/intel/opencl-clang/issues/293
d6 1
a6 1
--- CMakeLists.txt.orig	2021-08-30 13:13:55.000000000 +0000
d8 3
a10 2
@@@@ -20,7 +20,7 @@@@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRE
     add_definitions(-DUSE_PREBUILT_LLVM)
d12 85
a96 6
     if(NOT PREFERRED_LLVM_VERSION)
-        set(PREFERRED_LLVM_VERSION "12.0.0")
+        set(PREFERRED_LLVM_VERSION "13.0.0")
     endif(NOT PREFERRED_LLVM_VERSION)
     message(STATUS "[OPENCL-CLANG] Looking for LLVM version ${PREFERRED_LLVM_VERSION}")
     find_package(LLVM ${PREFERRED_LLVM_VERSION} REQUIRED)
@


1.1
log
@llvm: update llvm and friends to 13.0.0

Tested on NetBSD-current and 9.1/amd64.

Also update packages tightly coupled to llvm, if new versions are
available.

Mark creduce, include-what-you-use, and zig broken (waiting for a
new release).

Changes:

Non-comprehensive list of changes in this release

    Windows Control-flow Enforcement Technology: the -ehcontguard
    option now emits valid unwind entrypoints which are validated
    when the context is being set during exception handling.

    Flang is now included in the binary packages released by LLVM.

    The debuginfo-test project has been renamed cross-project-tests
    and is now intended for testing components from multiple
    projects, not just debug information. The new “cross-project-tests”
    name replaces “debuginfo-test” in LLVM_ENABLE_PROJECTS, and a
    new check-cross-project-tests target has been added for running
    all tests in the project. The pre-existing check-debuginfo-
    test target remains for running just the debug information
    tests. (D95339 and D96513)

Changes to the LLVM IR

    The inalloca attribute now has a mandatory type field, similar
    to byval and sret.

    The opaque pointer type ptr has been introduced. It is still
    in the process of being worked on and should not be used yet.

    Using the legacy pass manager for the optimization pipeline is
    deprecated and will be removed after LLVM 14. In the meantime,
    only minimal effort will be made to maintain the legacy pass
    manager for the optimization pipeline.

Changes to building LLVM

    The build system now supports building multiple distributions,
    so that you can e.g. have one distribution containing just
    tools and another for libraries (to enable development). See
    Multi-distribution configurations for details.

Changes to the AArch64 Backend

    Introduced assembly support for Armv9-A’s Realm Management
    Extension (RME) and Scalable Matrix Extension (SME).

    Produce proper cross-section relative relocations on COFF

    Fixed the calling convention on Windows for variadic functions
    involving floats in the fixed arguments

Changes to the ARM Backend

    Produce proper cross-section relative relocations on COFF

Changes to the Hexagon Target

    The Hexagon target now supports V68/HVX ISA.

Changes to the C API

    The C API functions LLVMGetAlignment and LLVMSetAlignment now
    allow changing alignment on atomicrmw and cmpxchg instructions

    A new entry LLVMDIArgListMetadataKind was added to the
    LLVMMetadataKind enum, representing DIArgLists (D88175)

    Type attributes have been added to LLVM-C, introducing
    LLVMCreateTypeAttribute, LLVMGetTypeAttributeValue and
    LLVMIsTypeAttribute. (D977763’)

    The LTO_API_VERSION was bumped to 28, introducing a new function
    lto_set_debug_options for parsing LTO debug options (D92611)

    LLVMJITTargetSymbolFlags was renamed to LLVMJITSymbolTargetFlags
    (rG8d718a0bff73af066675a6258c01307937c33cf9)

    The C API received support for creating custom ORCv2
    MaterializationUnits and APIs to retrieve an LLJIT instance’s
    linking layers. An ABI breaking change for LLVMOrcAbsoluteSymbols
    was introduced to make it consistent with
    LLVMOrcCreateCustomMaterializationUnit.
    (rGc8fc5e3ba942057d6c4cdcd1faeae69a28e7b671)

    The C API received support for adding ORCv2 object buffers
    directly to an object layer.
    (rG7b73cd684a8d5fb44d34064200f10e2723085c33)

    A breaking change to LLVMGetInlineAsm was introduced, adding
    a ninth argument LLVMBool CanThrow (D95745)

    The C API received support for calling into the new pass manager.
    (D102136)

    The C API function LLVMIntrinsicCopyOverloadedName has been
    deprecated. Please migrate to LLVMIntrinsicCopyOverloadedName2
    which takes an extra module argument and which also handles
    unnamed types. (D99173)

    The C API received support for dumping objects from ORCv2
    (rGcec8e69f01c3374cb38c6683058381b96fab8f89)

    A breaking change to LLVMOrcObjectTransformLayerTransformFunction
    was introduced, changing the order of the function pointer’s
    arguments. (rG8962c68ad007a525f9daa987c99eda57e0d0069a)

    The C API received support for accessing utilities from the
    LLJIT IRTransformLayer and ThreadSafeModule classes. (D103855)

    The C API received support for creating lazy-export
    MaterializationUnits (D104672)

    The C API function LLVMPassBuilderOptionsSetCoroutines was
    removed because couroutine passes have been enabled by default.
    (D105877)

    comdat noduplicates was renamed to comdat nodeduplicate and as
    a result, LLVMNoDuplicatesComdatSelectionKind was renamed to
    LLVMNoDeduplicateComdatSelectionKind. (D106319)

Changes to the FastISel infrastructure

    FastISel no longer tracks killed registers, and instead leaves
    this to the register allocator. This means that hasTrivialKill()
    is removed, as well as the OpNIsKill parameters to the fastEmit_*()
    family of functions.

Changes to the LLVM tools

    The options --build-id-link-{dir,input,output} have been deleted.
    (D96310)

    Support for in-order processors has been added to llvm-mca.
    (D94928)

    llvm-objdump supports -M {att,intel} now. --x86-asm-syntax is
    a deprecated internal option which will be removed in LLVM
    14.0.0. (D101695)

    The llvm-readobj short aliases -s (previously --sections) and
    -t (previously --syms) have been changed to --syms and
    --section-details respectively, to match llvm-readelf. (D105055)

    The llvm-nm short aliases -M (--print-armap), -U (--defined-only),
    and -W (--no-weak) are now deprecated. Use the long form versions
    instead. The alias --just-symbol-name is now deprecated in
    favor of --format=just-symbols and -j. (D105330)

    In lli the default JIT engine switched from MCJIT (-jit-kind=mcjit)
    to ORC (-jit-kind=orc). (D98931)

    llvm-rc got support for invoking Clang to preprocess its input.
    (D100755)

    llvm-rc got a GNU windres compatible frontend, llvm-windres.
    (D100756)

    llvm-ml has improved compatibility with MS ml.exe, managing to
    assemble more asm files.

Changes to LLDB

    LLDB executable is now included in pre-built LLVM binaries.

    LLDB now includes full featured support for AArch64 SVE register
    access.

    LLDB now supports AArch64 Pointer Authentication, allowing
    stack unwind with signed return address.

    LLDB now supports debugging programs on AArch64 Linux that use
    memory tagging (MTE).

    Added memory tag read and memory tag write commands.

    The memory region command will note when a region has memory
    tagging enabled.

    Synchronous and asynchronous tag faults are recognised.

    Synchronous tag faults have memory tag annotations in addition
    to the usual fault address.
@
text
@d1 1
a1 1
$NetBSD$
@

