diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 1fd8ea12..117b3378 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -86,7 +86,7 @@ jobs: - script: | call activate base - conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml + conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables displayName: Build recipe env: PYTHONUNBUFFERED: 1 diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 3f2ac7cd..b26950ab 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -7,7 +7,7 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '8' +- '9' docker_image: - quay.io/condaforge/linux-anvil-comp7 pin_run_as_build: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 9c03a448..3750cd17 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -1,7 +1,7 @@ MACOSX_DEPLOYMENT_TARGET: - '11.0' channel_sources: -- conda-forge/label/rust_dev,conda-forge +- conda-forge channel_targets: - conda-forge main cxx_compiler: diff --git a/README.md b/README.md index 59905dbc..db16cdd4 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | -| [![Conda Recipe](https://img.shields.io/badge/recipe-libllvm12-green.svg)](https://anaconda.org/conda-forge/libllvm12) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libllvm12.svg)](https://anaconda.org/conda-forge/libllvm12) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libllvm12.svg)](https://anaconda.org/conda-forge/libllvm12) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libllvm12.svg)](https://anaconda.org/conda-forge/libllvm12) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-libllvm13-green.svg)](https://anaconda.org/conda-forge/libllvm13) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libllvm13.svg)](https://anaconda.org/conda-forge/libllvm13) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libllvm13.svg)](https://anaconda.org/conda-forge/libllvm13) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libllvm13.svg)](https://anaconda.org/conda-forge/libllvm13) | | [![Conda Recipe](https://img.shields.io/badge/recipe-lit-green.svg)](https://anaconda.org/conda-forge/lit) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/lit.svg)](https://anaconda.org/conda-forge/lit) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/lit.svg)](https://anaconda.org/conda-forge/lit) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/lit.svg)](https://anaconda.org/conda-forge/lit) | | [![Conda Recipe](https://img.shields.io/badge/recipe-llvm-green.svg)](https://anaconda.org/conda-forge/llvm) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/llvm.svg)](https://anaconda.org/conda-forge/llvm) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/llvm.svg)](https://anaconda.org/conda-forge/llvm) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/llvm.svg)](https://anaconda.org/conda-forge/llvm) | | [![Conda Recipe](https://img.shields.io/badge/recipe-llvm--tools-green.svg)](https://anaconda.org/conda-forge/llvm-tools) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/llvm-tools.svg)](https://anaconda.org/conda-forge/llvm-tools) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/llvm-tools.svg)](https://anaconda.org/conda-forge/llvm-tools) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/llvm-tools.svg)](https://anaconda.org/conda-forge/llvm-tools) | @@ -99,16 +99,16 @@ conda config --add channels conda-forge conda config --set channel_priority strict ``` -Once the `conda-forge` channel has been enabled, `libllvm12, lit, llvm, llvm-tools, llvmdev` can be installed with: +Once the `conda-forge` channel has been enabled, `libllvm13, lit, llvm, llvm-tools, llvmdev` can be installed with: ``` -conda install libllvm12 lit llvm llvm-tools llvmdev +conda install libllvm13 lit llvm llvm-tools llvmdev ``` -It is possible to list all of the versions of `libllvm12` available on your platform with: +It is possible to list all of the versions of `libllvm13` available on your platform with: ``` -conda search libllvm12 --channel conda-forge +conda search libllvm13 --channel conda-forge ``` diff --git a/recipe/build.sh b/recipe/build.sh index 286c1d34..0a766187 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -16,6 +16,12 @@ if [[ "$CC_FOR_BUILD" != "" && "$CC_FOR_BUILD" != "$CC" ]]; then CMAKE_ARGS="${CMAKE_ARGS} -DLLVM_HOST_TRIPLE=$(echo $HOST | sed s/conda/unknown/g) -DLLVM_DEFAULT_TARGET_TRIPLE=$(echo $HOST | sed s/conda/unknown/g)" fi +# disable -fno-plt due to https://bugs.llvm.org/show_bug.cgi?id=51863 due to some GCC bug +if [[ "$target_platform" == "linux-ppc64le" ]]; then + CFLAGS="$(echo $CFLAGS | sed 's/-fno-plt //g')" + CXXFLAGS="$(echo $CXXFLAGS | sed 's/-fno-plt //g')" +fi + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_RTTI=ON \ diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 2a691534..2cea240a 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -2,7 +2,3 @@ c_compiler: # [osx] - clang_bootstrap # [osx] cxx_compiler: # [osx] - clang_bootstrap # [osx] - -cxx_compiler_version: # [linux and ppc64le] - # linking error with gcc 9 - - 8 # [linux and ppc64le] diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 681dc606..b1bcd9c0 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,4 @@ -{% set version = "12.0.1" %} -{% set sha256 = "7d9a8405f557cefc5a21bf5672af73903b64749d9bc3a50322239f56f34ffddf" %} - +{% set version = "13.0.0" %} {% set major_ver = version.split(".")[0] %} package: @@ -9,20 +7,19 @@ package: source: url: https://github.com/llvm/llvm-project/releases/download/llvmorg-{{ version.replace(".rc", "-rc") }}/llvm-{{ version.replace(".rc", "rc") }}.src.tar.xz - sha256: {{ sha256 }} + sha256: 408d11708643ea826f519ff79761fcdfc12d641a2510229eec459e72f8163020 patches: # - patches/intel-D47188-svml-VF.patch # Fixes vectorizer and extends SVML support # - patches/expect-fastmath-entrypoints-in-add-TLI-mappings.ll.patch # adjusts test added in 10.0.0 for intel-D47188-svml-VF.patch effects - # Revert an upstream change for Numba - # ref: https://github.com/numba/llvmlite/blob/v0.29.0/conda-recipes/0001-Revert-Limit-size-of-non-GlobalValue-name.patch - - patches/numba-0001-Revert-Limit-size-of-non-GlobalValue-name.patch #- patches/amd-roc-2.7.0.diff - - patches/pass-through-qemu-ld-prefix.diff + - patches/0001-pass-through-QEMU_LD_PREFIX-SDKROOT.patch # Don't link libLLVM.dylib to llvm-config. Makes it easier for cross compiling - - patches/llvm-config-no-libLLVM.diff + - patches/0002-Don-t-link-libLLVM.dylib-to-llvm-config.patch + # backport upstream commit e49c0c5100 for https://bugs.llvm.org/show_bug.cgi?id=51859 + - patches/0003-IntelJITListener-Fix-order-in-JitListener-multiple.l.patch build: - number: 2 + number: 0 merge_build_host: false requirements: diff --git a/recipe/patches/0001-pass-through-QEMU_LD_PREFIX-SDKROOT.patch b/recipe/patches/0001-pass-through-QEMU_LD_PREFIX-SDKROOT.patch new file mode 100644 index 00000000..08164f5a --- /dev/null +++ b/recipe/patches/0001-pass-through-QEMU_LD_PREFIX-SDKROOT.patch @@ -0,0 +1,25 @@ +From 9233e2111c3c76d22ae5cf842e1f7e29e783d97e Mon Sep 17 00:00:00 2001 +From: Isuru Fernando +Date: Tue, 4 Aug 2020 21:06:30 -0500 +Subject: [PATCH 1/3] pass through QEMU_LD_PREFIX & SDKROOT + +--- + utils/lit/lit/TestingConfig.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/lit/lit/TestingConfig.py b/utils/lit/lit/TestingConfig.py +index d534d895e4ba..e3512471c156 100644 +--- a/utils/lit/lit/TestingConfig.py ++++ b/utils/lit/lit/TestingConfig.py +@@ -21,7 +21,7 @@ class TestingConfig(object): + 'LLVM_DISABLE_CRASH_REPORT' : '1', + } + +- pass_vars = ['LIBRARY_PATH', 'LD_LIBRARY_PATH', 'SYSTEMROOT', 'TERM', ++ pass_vars = ['LIBRARY_PATH', 'LD_LIBRARY_PATH', 'SYSTEMROOT', 'TERM', 'QEMU_LD_PREFIX', 'SDKROOT', + 'CLANG', 'LLDB', 'LD_PRELOAD', 'ASAN_OPTIONS', + 'UBSAN_OPTIONS', 'LSAN_OPTIONS', 'ADB', 'ANDROID_SERIAL', + 'SSH_AUTH_SOCK', 'SANITIZER_IGNORE_CVE_2016_2143', +-- +2.32.0.windows.2 + diff --git a/recipe/patches/0002-Don-t-link-libLLVM.dylib-to-llvm-config.patch b/recipe/patches/0002-Don-t-link-libLLVM.dylib-to-llvm-config.patch new file mode 100644 index 00000000..aad9fcce --- /dev/null +++ b/recipe/patches/0002-Don-t-link-libLLVM.dylib-to-llvm-config.patch @@ -0,0 +1,24 @@ +From d7e9544b005c502ff443a8b5d5171225276a8391 Mon Sep 17 00:00:00 2001 +From: Isuru Fernando +Date: Mon, 5 Apr 2021 11:32:11 -0500 +Subject: [PATCH 2/3] Don't link libLLVM.dylib to llvm-config + +--- + tools/llvm-config/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt +index 1b74355a4209..5df32b731b3e 100644 +--- a/tools/llvm-config/CMakeLists.txt ++++ b/tools/llvm-config/CMakeLists.txt +@@ -5,6 +5,7 @@ set(BUILDVARIABLES_OBJPATH ${CMAKE_CURRENT_BINARY_DIR}/BuildVariables.inc) + + # Add the llvm-config tool. + add_llvm_tool(llvm-config ++ DISABLE_LLVM_LINK_LLVM_DYLIB + llvm-config.cpp + ) + +-- +2.32.0.windows.2 + diff --git a/recipe/patches/0003-IntelJITListener-Fix-order-in-JitListener-multiple.l.patch b/recipe/patches/0003-IntelJITListener-Fix-order-in-JitListener-multiple.l.patch new file mode 100644 index 00000000..01cab4a2 --- /dev/null +++ b/recipe/patches/0003-IntelJITListener-Fix-order-in-JitListener-multiple.l.patch @@ -0,0 +1,42 @@ +From 9d601760290e89dc7c27e17ca8170983c82595f8 Mon Sep 17 00:00:00 2001 +From: Andy Kaylor +Date: Wed, 29 Sep 2021 12:25:16 -0700 +Subject: [PATCH 3/3] [IntelJITListener] Fix order in JitListener/multiple.ll + +As reported in Bugzilla 51859, the JitListener/multiple.ll test had +become stale. The function order in the emitted image was changed by an +update to the MC/ElfObjectWriter code and because this test is disabled +by default, it wasn't updated. +--- + test/JitListener/multiple.ll | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/test/JitListener/multiple.ll b/test/JitListener/multiple.ll +index d60bf0b794ff..15b81ea55815 100644 +--- a/test/JitListener/multiple.ll ++++ b/test/JitListener/multiple.ll +@@ -26,16 +26,16 @@ + ; 21: } + ; + +-; CHECK: Method load [1]: bar, Size = {{[0-9]+}} ++; CHECK: Method load [1]: foo, Size = {{[0-9]+}} ++; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[1,2]}} ++; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[1,2]}} ++ ++; CHECK: Method load [2]: bar, Size = {{[0-9]+}} + ; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[5,6,7,9]}} + ; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[5,6,7,9]}} + ; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[5,6,7,9]}} + ; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[5,6,7,9]}} + +-; CHECK: Method load [2]: foo, Size = {{[0-9]+}} +-; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[1,2]}} +-; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[1,2]}} +- + ; CHECK: Method load [3]: fubar, Size = {{[0-9]+}} + ; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[12,13,15,17,19]}} + ; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[12,13,15,17,19]}} +-- +2.32.0.windows.2 + diff --git a/recipe/patches/llvm-config-no-libLLVM.diff b/recipe/patches/llvm-config-no-libLLVM.diff deleted file mode 100644 index 8cb1175f..00000000 --- a/recipe/patches/llvm-config-no-libLLVM.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- tools/llvm-config/CMakeLists.txt 2021-04-05 11:29:44.122179963 -0500 -+++ tools/llvm-config/CMakeLists.txt 2021-04-05 11:29:56.110269042 -0500 -@@ -5,6 +5,7 @@ - - # Add the llvm-config tool. - add_llvm_tool(llvm-config -+ DISABLE_LLVM_LINK_LLVM_DYLIB - llvm-config.cpp - ) - - diff --git a/recipe/patches/numba-0001-Revert-Limit-size-of-non-GlobalValue-name.patch b/recipe/patches/numba-0001-Revert-Limit-size-of-non-GlobalValue-name.patch deleted file mode 100644 index 559daf26..00000000 --- a/recipe/patches/numba-0001-Revert-Limit-size-of-non-GlobalValue-name.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 008dc9e0a47d9ec70b0583b01bc71bd892f3de24 Mon Sep 17 00:00:00 2001 -From: Stuart Archibald -Date: Mon, 8 Apr 2019 16:30:24 +0100 -Subject: [PATCH] Revert "Limit size of non-GlobalValue name" - -https://reviews.llvm.org/D41296 introduced a limit on the length of a -non-GlobalValue name, this patch is a direct revert of that change (as code gen -can sometimes legitimately create very long names). - -This reverts commit 4c23defc23d3ddb191762683b3bdb2399fe53a58. ---- - lib/IR/Value.cpp | 9 --------- - test/Bitcode/value-with-long-name.ll | 18 ------------------ - 2 files changed, 27 deletions(-) - delete mode 100644 test/Bitcode/value-with-long-name.ll - -diff --git a/lib/IR/Value.cpp b/lib/IR/Value.cpp -index cf32a66c901..99a4660a191 100644 ---- a/lib/IR/Value.cpp -+++ b/lib/IR/Value.cpp -@@ -37,10 +37,6 @@ - - using namespace llvm; - --static cl::opt NonGlobalValueMaxNameSize( -- "non-global-value-max-name-size", cl::Hidden, cl::init(1024), -- cl::desc("Maximum size for the name of non-global values.")); -- - //===----------------------------------------------------------------------===// - // Value Class - //===----------------------------------------------------------------------===// -@@ -238,11 +234,6 @@ void Value::setNameImpl(const Twine &NewName) { - if (getName() == NameRef) - return; - -- // Cap the size of non-GlobalValue names. -- if (NameRef.size() > NonGlobalValueMaxNameSize && !isa(this)) -- NameRef = -- NameRef.substr(0, std::max(1u, (unsigned)NonGlobalValueMaxNameSize)); -- - assert(!getType()->isVoidTy() && "Cannot assign a name to void values!"); - - // Get the symbol table to update for this object. -diff --git a/test/Bitcode/value-with-long-name.ll b/test/Bitcode/value-with-long-name.ll -deleted file mode 100644 -index 1ca5d133e09..00000000000 ---- a/test/Bitcode/value-with-long-name.ll -+++ /dev/null -@@ -1,18 +0,0 @@ --; Check the size of generated variable when no option is set --; RUN: opt -S %s -O2 -o - | FileCheck -check-prefix=CHECK-LONG %s --; CHECK-LONG: %{{[a-z]{4}[a-z]+}} -- --; Then check we correctly cap the size of newly generated non-global values name --; Force the size to be small so that the check works on release and debug build --; RUN: opt -S %s -O2 -o - -non-global-value-max-name-size=0 | FileCheck -check-prefix=CHECK-SHORT %s --; RUN: opt -S %s -O2 -o - -non-global-value-max-name-size=1 | FileCheck -check-prefix=CHECK-SHORT %s --; CHECK-SHORT-NOT: %{{[a-z][a-z]+}} -- --define i32 @f(i32 %a, i32 %b) { -- %c = add i32 %a, %b -- %d = add i32 %c, %a -- %e = add i32 %d, %b -- ret i32 %e --} -- -- --- -2.20.1 - diff --git a/recipe/patches/pass-through-qemu-ld-prefix.diff b/recipe/patches/pass-through-qemu-ld-prefix.diff deleted file mode 100644 index 6b80a6ba..00000000 --- a/recipe/patches/pass-through-qemu-ld-prefix.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/utils/lit/lit/TestingConfig.py b/utils/lit/lit/TestingConfig.py -index 38d05066a2b..4ae169275dd 100644 ---- a/utils/lit/lit/TestingConfig.py -+++ b/utils/lit/lit/TestingConfig.py -@@ -21,7 +21,7 @@ class TestingConfig(object): - 'LLVM_DISABLE_CRASH_REPORT' : '1', - } - -- pass_vars = ['LIBRARY_PATH', 'LD_LIBRARY_PATH', 'SYSTEMROOT', 'TERM', -+ pass_vars = ['LIBRARY_PATH', 'LD_LIBRARY_PATH', 'SYSTEMROOT', 'TERM', 'QEMU_LD_PREFIX', 'SDKROOT', - 'CLANG', 'LD_PRELOAD', 'ASAN_OPTIONS', 'UBSAN_OPTIONS', - 'LSAN_OPTIONS', 'ADB', 'ANDROID_SERIAL', 'SSH_AUTH_SOCK', - 'SANITIZER_IGNORE_CVE_2016_2143', 'TMPDIR', 'TMP', 'TEMP',