1 |
commit: ee3556fed02985b10a1550b548f0ed82f9ccf0b4 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 29 08:25:24 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 29 08:28:36 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee3556fe |
7 |
|
8 |
dev-ml/llvm-ocaml: Fix passing NDEBUG to build for LLVMDumpType() |
9 |
|
10 |
Add USE=debug that controls -DNDEBUG since upstream started defining |
11 |
dump functions conditionally to debug being enabled. We therefore need |
12 |
to disable dumps in OCaml bindings if LLVM was built without them. |
13 |
|
14 |
dev-ml/llvm-ocaml/llvm-ocaml-5.0.9999.ebuild | 9 ++++++--- |
15 |
dev-ml/llvm-ocaml/llvm-ocaml-9999.ebuild | 9 ++++++--- |
16 |
2 files changed, 12 insertions(+), 6 deletions(-) |
17 |
|
18 |
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-5.0.9999.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-5.0.9999.ebuild |
19 |
index 052fa649710..f094afad03b 100644 |
20 |
--- a/dev-ml/llvm-ocaml/llvm-ocaml-5.0.9999.ebuild |
21 |
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-5.0.9999.ebuild |
22 |
@@ -26,12 +26,12 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} |
23 |
LICENSE="UoI-NCSA" |
24 |
SLOT="0/${PV}" |
25 |
KEYWORDS="" |
26 |
-IUSE="test ${ALL_LLVM_TARGETS[*]}" |
27 |
+IUSE="debug test ${ALL_LLVM_TARGETS[*]}" |
28 |
|
29 |
RDEPEND=" |
30 |
>=dev-lang/ocaml-4.00.0:0= |
31 |
dev-ml/ocaml-ctypes:= |
32 |
- ~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,}] |
33 |
+ ~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?] |
34 |
!sys-devel/llvm[ocaml(-)]" |
35 |
# configparser-3.2 breaks the build (3.3 or none at all are fine) |
36 |
DEPEND="${RDEPEND} |
37 |
@@ -81,7 +81,7 @@ src_configure() { |
38 |
-DLLVM_ENABLE_TERMINFO=OFF |
39 |
-DHAVE_HISTEDIT_H=NO |
40 |
-DWITH_POLLY=OFF |
41 |
- -DLLVM_ENABLE_ASSERTIONS=OFF |
42 |
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug) |
43 |
-DLLVM_ENABLE_EH=ON |
44 |
-DLLVM_ENABLE_RTTI=ON |
45 |
|
46 |
@@ -97,6 +97,9 @@ src_configure() { |
47 |
-DLIT_COMMAND="${EPREFIX}/usr/bin/lit" |
48 |
) |
49 |
|
50 |
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
51 |
+ # also: custom rules for OCaml do not work for CPPFLAGS |
52 |
+ use debug || local -x CFLAGS="${CFLAGS} -DNDEBUG" |
53 |
cmake-utils_src_configure |
54 |
|
55 |
local llvm_libdir=$(llvm-config --libdir) |
56 |
|
57 |
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-9999.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-9999.ebuild |
58 |
index b6885c5b623..d5f507e9e10 100644 |
59 |
--- a/dev-ml/llvm-ocaml/llvm-ocaml-9999.ebuild |
60 |
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-9999.ebuild |
61 |
@@ -25,12 +25,12 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} |
62 |
LICENSE="UoI-NCSA" |
63 |
SLOT="0/${PV}" |
64 |
KEYWORDS="" |
65 |
-IUSE="test ${ALL_LLVM_TARGETS[*]}" |
66 |
+IUSE="debug test ${ALL_LLVM_TARGETS[*]}" |
67 |
|
68 |
RDEPEND=" |
69 |
>=dev-lang/ocaml-4.00.0:0= |
70 |
dev-ml/ocaml-ctypes:= |
71 |
- ~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,}] |
72 |
+ ~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?] |
73 |
!sys-devel/llvm[ocaml(-)]" |
74 |
# configparser-3.2 breaks the build (3.3 or none at all are fine) |
75 |
DEPEND="${RDEPEND} |
76 |
@@ -80,7 +80,7 @@ src_configure() { |
77 |
-DLLVM_ENABLE_TERMINFO=OFF |
78 |
-DHAVE_HISTEDIT_H=NO |
79 |
-DWITH_POLLY=OFF |
80 |
- -DLLVM_ENABLE_ASSERTIONS=OFF |
81 |
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug) |
82 |
-DLLVM_ENABLE_EH=ON |
83 |
-DLLVM_ENABLE_RTTI=ON |
84 |
|
85 |
@@ -96,6 +96,9 @@ src_configure() { |
86 |
-DLIT_COMMAND="${EPREFIX}/usr/bin/lit" |
87 |
) |
88 |
|
89 |
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
90 |
+ # also: custom rules for OCaml do not work for CPPFLAGS |
91 |
+ use debug || local -x CFLAGS="${CFLAGS} -DNDEBUG" |
92 |
cmake-utils_src_configure |
93 |
|
94 |
local llvm_libdir=$(llvm-config --libdir) |