Skip to content
Snippets Groups Projects
Commit 9bf92bc7 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

new upstream release

parent 6d0839d8
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,8 @@
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=('lib32-llvm' 'lib32-llvm-libs')
pkgver=12.0.0
pkgrel=2
pkgver=12.0.1
pkgrel=1
arch=('x86_64')
url="https://llvm.org/"
license=('custom:Apache 2.0 with LLVM Exception')
......@@ -13,13 +13,11 @@ makedepends=('cmake' 'ninja' 'lib32-libffi' 'lib32-zlib' 'python' 'gcc-multilib'
options=('staticlibs')
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/llvm-$pkgver.src.tar.xz{,.sig}
force-visibility-of-llvm-Any-to-external.patch
llvm-link-with-Bsymbolic-functions.patch
add-fno-semantic-interposition.patch
no-strict-aliasing-DwarfCompileUnit.patch)
sha256sums=('49dc47c8697a1a0abd4ee51629a696d7bfe803662f2a7252a3b16fc75f3a8b50'
sha256sums=('7d9a8405f557cefc5a21bf5672af73903b64749d9bc3a50322239f56f34ffddf'
'SKIP'
'98721af5a36af2a8e88c14a81b16d3929b12515d7d2d1ba385eb243dca3c32cb'
'560ce1e206c19f4b86f4c583b743db0ad47a610418999350710aafd60ae50fcd'
'fc8c64267a5d179e9fc24fb2bc6150edef2598c83f5b2d138d14e05ce9f4e345'
'd1eff24508e35aae6c26a943dbaa3ef5acb60a145b008fd1ef9ac6f6c4faa662')
......@@ -30,9 +28,6 @@ prepare() {
cd "$srcdir/llvm-$pkgver.src"
mkdir build
# https://bugs.llvm.org/show_bug.cgi?id=48992
patch -Np2 -i ../force-visibility-of-llvm-Any-to-external.patch
# https://bugs.archlinux.org/task/70697
patch -Np2 -i ../llvm-link-with-Bsymbolic-functions.patch
# https://reviews.llvm.org/D102453
......
From 3d3abc22b3ef189813a3b9061c2a90ba86a32f44 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton@redhat.com>
Date: Tue, 11 May 2021 20:46:58 +0200
Subject: [PATCH] Force visibility of llvm::Any to external
llvm::Any::TypeId::Id relies on the uniqueness of the address of a static
variable defined in a template function. hidden visibility implies vague linkage
for that variable, which does not guarantee the uniqueness of the address across
a binary and a shared library. This totally breaks the implementation of
llvm::Any.
Ideally, setting visibility to llvm::Any::TypeId::Id should be enough,
unfortunately this doesn't work as expected and we lack time (before 12.0.1
release) to understand why setting the visibility to llvm::Any does work.
See https://gcc.gnu.org/wiki/Visibility and
https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html
for more information on that topic.
Differential Revision: https://reviews.llvm.org/D101972
---
llvm/include/llvm/ADT/Any.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/llvm/include/llvm/ADT/Any.h b/llvm/include/llvm/ADT/Any.h
index 15b114f7932d..e513586845a1 100644
--- a/llvm/include/llvm/ADT/Any.h
+++ b/llvm/include/llvm/ADT/Any.h
@@ -23,7 +23,12 @@
namespace llvm {
-class Any {
+class LLVM_EXTERNAL_VISIBILITY Any {
+
+ // The `Typeid<T>::Id` static data member below is a globally unique
+ // identifier for the type `T`. It is explicitly marked with default
+ // visibility so that when `-fvisibility=hidden` is used, the loader still
+ // merges duplicate definitions across DSO boundaries.
template <typename T> struct TypeId { static const char Id; };
struct StorageBase {
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment