This is fixed upstream with the following llvm revisions: 252532 260343 I understand that these won't apply to our code because of the gentoo-specific llvm-config patch we have. I recommend dropping that patch, applying these in 3.7.1-r1 and testing to see if that takes care of all of our issues that prompted the gentoo-specific llvm-config patch. Thanks, William
upstreams llvm-config is broken in the 3.7.x series when LLVM is compiled with cmake and -DBUILD_SHARED_LIBS=ON is set. This is how Gentoo currently builds ~sys-devel/llvm-3.7.0 and sys-devel/llvm-3.7.1. For more information about the upstream issues see: http://reviews.llvm.org/D11835 http://reviews.llvm.org/D13198 The result that was merged upstream was: r252532 r260343 which need to be backported to 3.7.x. The fix is present in LLVM 3.8.0.
Created attachment 429090 [details] build.log This is a build log showing rust-1.7 failing when built with llvm-3.7.1.
Created attachment 429092 [details] llvmdeps.rs I am attaching this file per Cardoe's request.
Prior to 3.7.0, these libraries were always only available for static linking. llvm-config was taught in the two revisions I requested be applied to 3.7.x to return info if it was built as a shared library. $ llvm-config --shared-mode shared Which then causes consumers to link to LLVM as a shared library. Without that option downstream packages will assume that they should link to LLVM as a static library because the other distros that ship LLVM 3.7 still provide it with static libraries or they've backported --shared-mode. http://packages.ubuntu.com/xenial/amd64/llvm-3.7-dev/filelist https://www.archlinux.org/packages/extra/x86_64/llvm/ http://pkgs.fedoraproject.org/cgit/rpms/llvm.git/tree/llvm.spec?h=f23
Created attachment 429124 [details] build.log.bz2 I just tested 3.7.1-r1 from the llvm-config-hacking branch. It fails compilation as shown in this build log. I noticed this comment in the ebuild: # Fix llvm-config for shared linking, sane flags and return values # combination of backported upstream r252532 with our patch # https://bugs.gentoo.org/show_bug.cgi?id=565358 This probably fails because we still need R260343 backported from upstream (see comment #1). Once both upstream revisions are backported, we should re-evaluate our Gentoo specific patch and re-evaluate why we have gentoo-specific patches at all in llvm.
Fixed in 3.7.1-r1. Rust seems to build for me.