clang-3.5: fix build
Make Obj public in llvm's IntrusiveRefCntPtr
This fixes NixOs/nixpkgs#15974
It's not a nice fix, as it's really clang's problem. The proper fix
should modify clang's usage of IntrusiveRefCntPtr.
commitc7281d14f7f247e3638b60c02f2a853d1005852f
authorJoe Hermaszewski <git@monoid.al>
dateSat 4 Jun 2016, 13:24 (10 years ago)
parent70bf931
pkgs/development/compilers/llvm/3.5/clang.nix−1
@@ -50,6 +50,5 @@ in stdenv.mkDerivation {
5050 homepage = http://llvm.org/;
5151 license = stdenv.lib.licenses.bsd3;
5252 platforms = stdenv.lib.platforms.all;
53− broken = true;
5453 };
5554}
pkgs/development/compilers/llvm/3.5/fix-15974.patchnew file+15
@@ -0,0 +1,15 @@
1+diff --git a/include/llvm/ADT/IntrusiveRefCntPtr.h b/include/llvm/ADT/IntrusiveRefCntPtr.h
2+index f9df378..9d860ec 100644
3+--- a/include/llvm/ADT/IntrusiveRefCntPtr.h
4++++ b/include/llvm/ADT/IntrusiveRefCntPtr.h
5+@@ -134,9 +134,9 @@ public:
6+ //===----------------------------------------------------------------------===//
7+ template <typename T>
8+ class IntrusiveRefCntPtr {
9++ public:
10+ T* Obj;
11+
12+- public:
13+ typedef T element_type;
14+
15+ explicit IntrusiveRefCntPtr() : Obj(nullptr) {}
pkgs/development/compilers/llvm/3.5/llvm.nix+3
@@ -53,6 +53,8 @@ in stdenv.mkDerivation rec {
5353 "-DCAN_TARGET_i386=false"
5454 ];
5555
56+ patches = [ ./fix-15974.patch ];
57+
5658 postBuild = ''
5759 rm -fR $out
5860
@@ -75,3 +77,4 @@ in stdenv.mkDerivation rec {
7577 platforms = stdenv.lib.platforms.all;
7678 };
7779}
80+