summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-01-19 20:50:48 +0100
committerMichał Górny <mgorny@gentoo.org>2018-01-19 23:21:43 +0100
commit5bcc52f047db4438cd7427a094dcbb06bb2d4513 (patch)
tree6c4dd5968fe2540ac1f7a1b34b9ac69d43d5c2c9 /sys-devel/llvm
parentapp-arch/brotli-1.0.2: add ~arm keyword (diff)
downloadgentoo-5bcc52f047db4438cd7427a094dcbb06bb2d4513.tar.gz
gentoo-5bcc52f047db4438cd7427a094dcbb06bb2d4513.tar.bz2
gentoo-5bcc52f047db4438cd7427a094dcbb06bb2d4513.zip
sys-devel/llvm: Fix implicit dependency on app-arch/libxar
Support conditionally using app-arch/libxar in LLVM 6+, and explicitly force it off in LLVM 5. This library is used only to dump LLVM bitcode in Mach-O files and it's very rare, so we can safely presume that nobody really used it and it's not worth rebuild due to revbumping LLVM 5. Closes: https://bugs.gentoo.org/645038
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r--sys-devel/llvm/llvm-5.0.1.ebuild1
-rw-r--r--sys-devel/llvm/llvm-6.0.9999.ebuild5
-rw-r--r--sys-devel/llvm/llvm-9999.ebuild5
-rw-r--r--sys-devel/llvm/metadata.xml2
4 files changed, 11 insertions, 2 deletions
diff --git a/sys-devel/llvm/llvm-5.0.1.ebuild b/sys-devel/llvm/llvm-5.0.1.ebuild
index 949988d12d13..f1eff0e8a3d4 100644
--- a/sys-devel/llvm/llvm-5.0.1.ebuild
+++ b/sys-devel/llvm/llvm-5.0.1.ebuild
@@ -122,6 +122,7 @@ multilib_src_configure() {
-DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
-DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+ -DHAVE_LIBXAR=0
# disable OCaml bindings (now in dev-ml/llvm-ocaml)
-DOCAMLFIND=NO
diff --git a/sys-devel/llvm/llvm-6.0.9999.ebuild b/sys-devel/llvm/llvm-6.0.9999.ebuild
index 03eed722f8d0..f89769dc2830 100644
--- a/sys-devel/llvm/llvm-6.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-6.0.9999.ebuild
@@ -35,7 +35,7 @@ LICENSE="UoI-NCSA rc BSD public-domain
llvm_targets_ARM? ( LLVM-Grant )"
SLOT="$(ver_cut 1)"
KEYWORDS=""
-IUSE="debug doc gold libedit +libffi ncurses test xml
+IUSE="debug doc gold libedit +libffi ncurses test xar xml
kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
RESTRICT="!test? ( test )"
@@ -45,6 +45,7 @@ RDEPEND="
libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
+ xar? ( app-arch/xar )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )"
# configparser-3.2 breaks the build (3.3 or none at all are fine)
DEPEND="${RDEPEND}
@@ -119,6 +120,8 @@ multilib_src_configure() {
-DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
-DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+ # used only for llvm-objdump tool
+ -DHAVE_LIBXAR=$(multilib_native_usex xar 1 0)
# disable OCaml bindings (now in dev-ml/llvm-ocaml)
-DOCAMLFIND=NO
diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
index 275fb80a6bdf..d1550613720d 100644
--- a/sys-devel/llvm/llvm-9999.ebuild
+++ b/sys-devel/llvm/llvm-9999.ebuild
@@ -37,7 +37,7 @@ LICENSE="UoI-NCSA rc BSD public-domain
llvm_targets_ARM? ( LLVM-Grant )"
SLOT="7"
KEYWORDS=""
-IUSE="debug doc gold libedit +libffi ncurses test xml
+IUSE="debug doc gold libedit +libffi ncurses test xar xml
kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
RESTRICT="!test? ( test )"
@@ -47,6 +47,7 @@ RDEPEND="
libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
+ xar? ( app-arch/xar )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )"
# configparser-3.2 breaks the build (3.3 or none at all are fine)
DEPEND="${RDEPEND}
@@ -124,6 +125,8 @@ multilib_src_configure() {
-DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
-DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+ # used only for llvm-objdump tool
+ -DHAVE_LIBXAR=$(multilib_native_usex xar 1 0)
# disable OCaml bindings (now in dev-ml/llvm-ocaml)
-DOCAMLFIND=NO
diff --git a/sys-devel/llvm/metadata.xml b/sys-devel/llvm/metadata.xml
index f532f3a746df..66c9caef1660 100644
--- a/sys-devel/llvm/metadata.xml
+++ b/sys-devel/llvm/metadata.xml
@@ -20,5 +20,7 @@
<flag name="ncurses">Support querying terminal properties using ncurses' terminfo</flag>
<flag name="sanitize">Build compiler-rt's sanitizers</flag>
<flag name="static-analyzer">Install the Clang static analyzer (requires USE=clang)</flag>
+ <flag name="xar">Support dumping LLVM bitcode sections in Mach-O files
+ (uses <pkg>app-arch/libxar</pkg>)</flag>
</use>
</pkgmetadata>