guix-commits
[Top][All Lists]
Advanced

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

03/03: gnu: libcxx: Hide GCC's C++ headers during the build process.


From: guix-commits
Subject: 03/03: gnu: libcxx: Hide GCC's C++ headers during the build process.
Date: Sun, 15 Mar 2020 11:09:07 -0400 (EDT)

mbakke pushed a commit to branch core-updates
in repository guix.

commit 40a461fd97fb865987e4f6cc41fee6ee6408851d
Author: Marius Bakke <address@hidden>
AuthorDate: Sun Mar 15 16:08:06 2020 +0100

    gnu: libcxx: Hide GCC's C++ headers during the build process.
    
    * gnu/packages/llvm.scm (libcxx)[arguments]: New field.
---
 gnu/packages/llvm.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 3909039..ef273e3 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -671,6 +671,23 @@ output), and Binutils.")
         (base32
          "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089"))))
     (build-system cmake-build-system)
+    (arguments
+     `(#: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 #t
+                       "environment variable `CPLUS_INCLUDE_PATH' changed to 
~a~%"
+                       (getenv "CPLUS_INCLUDE_PATH"))
+               #t))))))
     (native-inputs
      `(("clang" ,clang)
        ("llvm" ,llvm)))



reply via email to

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