summary refs log tree commit diff
path: root/gnu/packages/llvm.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-04-21 11:04:39 +0200
committerRicardo Wurmus <rekado@elephly.net>2021-04-21 11:05:07 +0200
commit0eefc6ea201e252f6a5aae3b77761982af6b601d (patch)
tree2a2fce0ca0a589734f8d09cc916ab6f6696d1f22 /gnu/packages/llvm.scm
parent2e90882951f78c2c9f47d2db2bc6ba4e1ac3e3a7 (diff)
downloadguix-0eefc6ea201e252f6a5aae3b77761982af6b601d.tar.gz
gnu: Add libcxx+libcxxabi-6.
* gnu/packages/llvm.scm (libcxx+libcxxabi-6): New variable.
Diffstat (limited to 'gnu/packages/llvm.scm')
-rw-r--r--gnu/packages/llvm.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 497dd6e6cc..605bd8629a 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -1015,6 +1015,38 @@ use with Clang, targeting C++11, C++14 and above.")
 standard C++ library.")
     (license license:expat)))
 
+(define-public libcxx+libcxxabi-6
+  (package
+    (inherit libcxx-6)
+    (name "libcxx+libcxxabi")
+    (version (package-version libcxx-6))
+    (arguments
+     `(#:configure-flags
+       (list "-DLIBCXX_CXX_ABI=libcxxabi"
+             (string-append "-DLIBCXX_CXX_ABI_INCLUDE_PATHS="
+                            (assoc-ref %build-inputs "libcxxabi")
+                            "/include"))
+       #:phases
+       (modify-phases (@ (guix build cmake-build-system) %standard-phases)
+         (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gcc (assoc-ref inputs  "gcc")))
+               ;; Hide GCC's C++ headers so that they do not interfere with
+               ;; the ones we are attempting to build.
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (delete (string-append gcc "/include/c++")
+                                (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                              #\:))
+                        ":"))
+               (format #true
+                       "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                       (getenv "CPLUS_INCLUDE_PATH"))))))))
+    (native-inputs
+     `(("clang" ,clang-6)
+       ("llvm" ,llvm-6)
+       ("libcxxabi" ,libcxxabi-6)))))
+
 (define-public libclc
   (package
     (name "libclc")