gnu: Add libcxx+libcxxabi-6.

* gnu/packages/llvm.scm (libcxx+libcxxabi-6): New variable.
This commit is contained in:
Ricardo Wurmus 2021-04-21 11:04:39 +02:00
parent 2e90882951
commit 0eefc6ea20
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -1015,6 +1015,38 @@ (define-public libcxxabi-6
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")