Created attachment 177038 [details] Enable shared libraries Enable shared libraries support in llvm39 for use in the Mesa ports. Lightly tested with Xorg and GNOME 3 desktop, with the dri llvm based software render driver. This might be applied to llvm38 but I'm planning on skipping that version in the Mesa ports and go straight to llvm39. So I don't really care about llvm38. The patch is needed otherwise libLLVM-3.9.so is only 4k big and has no symbols. While here patch in DragonFly support too. % glxinfo | grep OpenGL OpenGL vendor string: VMware, Inc. OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.9, 256 bits) OpenGL core profile version string: 3.3 (Core Profile) Mesa 12.0.4 OpenGL core profile shading language version string: 3.30 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 3.0 Mesa 12.0.4 OpenGL shading language version string: 1.30 OpenGL context flags: (none) OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.0 Mesa 12.0.4 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00 OpenGL ES profile extensions:
Forgot to mention where I got my info from. The Cmake macro's are listed here: http://llvm.org/docs/CMake.html#llvm-specific-variables . Use of BUILD_SHARED_LIBS is not recommended.
A commit references this bug: Author: brooks Date: Tue Nov 15 23:28:23 UTC 2016 New revision: 426189 URL: https://svnweb.freebsd.org/changeset/ports/426189 Log: Build shared libraries. PR: 214549 Submitted by: kwm Changes: head/devel/llvm39/Makefile head/devel/llvm39/files/patch-tools_llvm-shlib_CMakeLists.txt head/devel/llvm39/pkg-plist
Created attachment 177040 [details] cleanup devel/llvm39 Makefile As I was also working on this issue at the same time, I accumulated some fixes to quiet most of portlint's complaints. This patch is just the cleanups: correct placement of PKGNAMESUFFIX convert spaces to tabs remove blank lines qwk -> ${AWK} sed -> ${SED}
A commit references this bug: Author: brooks Date: Wed Nov 16 00:28:43 UTC 2016 New revision: 426194 URL: https://svnweb.freebsd.org/changeset/ports/426194 Log: portlint fixes: correct placement of PKGNAMESUFFIX convert spaces to tabs remove blank lines qwk -> ${AWK} sed -> ${SED} PR: 214549 Submitted by: matthew@reztek.cz Changes: head/devel/llvm39/Makefile
Committed both diffs. Thanks!
Now that libLLVM.so works, another option to consider adding is -DLLVM_LINK_LLVM_DYLIB=ON . This will make all the binaries link against libLLVM.so instead of the static versions, and shrinks the install size by over 50%.
A commit references this bug: Author: brooks Date: Wed Dec 21 16:24:00 UTC 2016 New revision: 429104 URL: https://svnweb.freebsd.org/changeset/ports/429104 Log: Upgrade to 3.9.1. Link programs dynamicaly. This reduces package size by over 400MB on amd64. PR: 214549 Changes: head/devel/llvm39/Makefile head/devel/llvm39/distinfo head/devel/llvm39/pkg-plist