guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: gnu: llvm: Build shared libraries.


From: Eric Bavier
Subject: 02/03: gnu: llvm: Build shared libraries.
Date: Fri, 9 Sep 2016 12:39:35 +0000 (UTC)

bavier pushed a commit to branch master
in repository guix.

commit ab78618f07bdbba20f91b2e142389bc1215c7171
Author: Eric Bavier <address@hidden>
Date:   Mon Aug 29 17:20:16 2016 -0500

    gnu: llvm: Build shared libraries.
    
    * gnu/packages/llvm.scm (llvm)[arguments]: Add -DBUILD_SHARED_LIBS to
---
 gnu/packages/llvm.scm |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index aa3d65b..a9eba79 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -58,10 +58,21 @@
     (arguments
      `(#:configure-flags '("-DCMAKE_SKIP_BUILD_RPATH=FALSE"
                            "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
+                           "-DBUILD_SHARED_LIBS:BOOL=TRUE"
                            "-DLLVM_ENABLE_FFI:BOOL=TRUE")
 
        ;; Don't use '-g' during the build, to save space.
-       #:build-type "Release"))
+       #:build-type "Release"
+       #:phases (modify-phases %standard-phases
+                  (add-before 'build 'shared-lib-workaround
+                    ;; Even with CMAKE_SKIP_BUILD_RPATH=FALSE, llvm-tblgen
+                    ;; doesn't seem to get the correct rpath to be able to run
+                    ;; from the build directory.  Set LD_LIBRARY_PATH as a
+                    ;; workaround.
+                    (lambda _
+                      (setenv "LD_LIBRARY_PATH"
+                              (string-append (getcwd) "/lib"))
+                      #t)))))
     (home-page "http://www.llvm.org";)
     (synopsis "Optimizing compiler infrastructure")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]