Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build 13.0.0 #131

Merged
merged 7 commits into from
Oct 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .ci_support/linux_ppc64le_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_arm64_.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
10 changes: 5 additions & 5 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 0 additions & 4 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
17 changes: 7 additions & 10 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{% set version = "12.0.1" %}
{% set sha256 = "7d9a8405f557cefc5a21bf5672af73903b64749d9bc3a50322239f56f34ffddf" %}

{% set version = "13.0.0" %}
{% set major_ver = version.split(".")[0] %}

package:
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to this patch?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't apply anymore. There's no NonGlobalValueMaxNameSize left in https://github.com/llvm/llvm-project/blob/release/13.x/llvm/lib/IR/Value.cpp

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is in function.cpp. See llvm/llvm-project@8d25762

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thanks for the info. To be honest, I'm not sure I fully understand what's necessary for this (and think it should be done when the other numba-patches are adapted, cf. #123). Is the following the patch as you would envision it?

diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 4034b1505bd0..26600bd2d9b9 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -77,10 +77,6 @@ using ProfileCount = Function::ProfileCount;
 // are not in the public header file...
 template class llvm::SymbolTableListTraits<BasicBlock>;

-static cl::opt<unsigned> NonGlobalValueMaxNameSize(
-    "non-global-value-max-name-size", cl::Hidden, cl::init(1024),
-    cl::desc("Maximum size for the name of non-global values."));
-
 //===----------------------------------------------------------------------===//
 // Argument Implementation
 //===----------------------------------------------------------------------===//
@@ -390,7 +386,7 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace,

   // We only need a symbol table for a function if the context keeps value names
   if (!getContext().shouldDiscardValueNames())
-    SymTab = std::make_unique<ValueSymbolTable>(NonGlobalValueMaxNameSize);
+    SymTab = std::make_unique<ValueSymbolTable>();

   // If the function has arguments, mark them as lazily built.
   if (Ty->getNumParams())

#- 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:
Expand Down
25 changes: 25 additions & 0 deletions recipe/patches/0001-pass-through-QEMU_LD_PREFIX-SDKROOT.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 9233e2111c3c76d22ae5cf842e1f7e29e783d97e Mon Sep 17 00:00:00 2001
From: Isuru Fernando <isuruf@gmail.com>
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

24 changes: 24 additions & 0 deletions recipe/patches/0002-Don-t-link-libLLVM.dylib-to-llvm-config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From d7e9544b005c502ff443a8b5d5171225276a8391 Mon Sep 17 00:00:00 2001
From: Isuru Fernando <isuruf@gmail.com>
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

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From 9d601760290e89dc7c27e17ca8170983c82595f8 Mon Sep 17 00:00:00 2001
From: Andy Kaylor <andrew.kaylor@intel.com>
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

11 changes: 0 additions & 11 deletions recipe/patches/llvm-config-no-libLLVM.diff

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions recipe/patches/pass-through-qemu-ld-prefix.diff

This file was deleted.