gnu: libcxx: Hide GCC's C++ headers during the build process.
* gnu/packages/llvm.scm (libcxx)[arguments]: New field.
This commit is contained in:
		
							parent
							
								
									f42bfc7a99
								
							
						
					
					
						commit
						40a461fd97
					
				
					 1 changed files with 17 additions and 0 deletions
				
			
		| 
						 | 
					@ -671,6 +671,23 @@ output), and Binutils.")
 | 
				
			||||||
        (base32
 | 
					        (base32
 | 
				
			||||||
         "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089"))))
 | 
					         "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089"))))
 | 
				
			||||||
    (build-system cmake-build-system)
 | 
					    (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
 | 
					    (native-inputs
 | 
				
			||||||
     `(("clang" ,clang)
 | 
					     `(("clang" ,clang)
 | 
				
			||||||
       ("llvm" ,llvm)))
 | 
					       ("llvm" ,llvm)))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue