summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-07-29 10:25:24 +0200
committerMichał Górny <mgorny@gentoo.org>2017-07-29 10:28:36 +0200
commitee3556fed02985b10a1550b548f0ed82f9ccf0b4 (patch)
treedae484f63403468de2f8cc447e0c39367f797dde /dev-ml
parentdev-ruby/faraday_middleware: add 0.12.0 (diff)
downloadgentoo-ee3556fed02985b10a1550b548f0ed82f9ccf0b4.tar.gz
gentoo-ee3556fed02985b10a1550b548f0ed82f9ccf0b4.tar.bz2
gentoo-ee3556fed02985b10a1550b548f0ed82f9ccf0b4.zip
dev-ml/llvm-ocaml: Fix passing NDEBUG to build for LLVMDumpType()
Add USE=debug that controls -DNDEBUG since upstream started defining dump functions conditionally to debug being enabled. We therefore need to disable dumps in OCaml bindings if LLVM was built without them.
Diffstat (limited to 'dev-ml')
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-5.0.9999.ebuild9
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-9999.ebuild9
2 files changed, 12 insertions, 6 deletions
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-5.0.9999.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-5.0.9999.ebuild
index 052fa649710d..f094afad03be 100644
--- a/dev-ml/llvm-ocaml/llvm-ocaml-5.0.9999.ebuild
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-5.0.9999.ebuild
@@ -26,12 +26,12 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
LICENSE="UoI-NCSA"
SLOT="0/${PV}"
KEYWORDS=""
-IUSE="test ${ALL_LLVM_TARGETS[*]}"
+IUSE="debug test ${ALL_LLVM_TARGETS[*]}"
RDEPEND="
>=dev-lang/ocaml-4.00.0:0=
dev-ml/ocaml-ctypes:=
- ~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,}]
+ ~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?]
!sys-devel/llvm[ocaml(-)]"
# configparser-3.2 breaks the build (3.3 or none at all are fine)
DEPEND="${RDEPEND}
@@ -81,7 +81,7 @@ src_configure() {
-DLLVM_ENABLE_TERMINFO=OFF
-DHAVE_HISTEDIT_H=NO
-DWITH_POLLY=OFF
- -DLLVM_ENABLE_ASSERTIONS=OFF
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
@@ -97,6 +97,9 @@ src_configure() {
-DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
)
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ # also: custom rules for OCaml do not work for CPPFLAGS
+ use debug || local -x CFLAGS="${CFLAGS} -DNDEBUG"
cmake-utils_src_configure
local llvm_libdir=$(llvm-config --libdir)
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-9999.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-9999.ebuild
index b6885c5b6232..d5f507e9e101 100644
--- a/dev-ml/llvm-ocaml/llvm-ocaml-9999.ebuild
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-9999.ebuild
@@ -25,12 +25,12 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
LICENSE="UoI-NCSA"
SLOT="0/${PV}"
KEYWORDS=""
-IUSE="test ${ALL_LLVM_TARGETS[*]}"
+IUSE="debug test ${ALL_LLVM_TARGETS[*]}"
RDEPEND="
>=dev-lang/ocaml-4.00.0:0=
dev-ml/ocaml-ctypes:=
- ~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,}]
+ ~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?]
!sys-devel/llvm[ocaml(-)]"
# configparser-3.2 breaks the build (3.3 or none at all are fine)
DEPEND="${RDEPEND}
@@ -80,7 +80,7 @@ src_configure() {
-DLLVM_ENABLE_TERMINFO=OFF
-DHAVE_HISTEDIT_H=NO
-DWITH_POLLY=OFF
- -DLLVM_ENABLE_ASSERTIONS=OFF
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
@@ -96,6 +96,9 @@ src_configure() {
-DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
)
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ # also: custom rules for OCaml do not work for CPPFLAGS
+ use debug || local -x CFLAGS="${CFLAGS} -DNDEBUG"
cmake-utils_src_configure
local llvm_libdir=$(llvm-config --libdir)