gnu: clang-runtime-from-llvm: Add phase for LLVM monorepo.

* gnu/packages/llvm.scm (clang-runtime-from-llvm)[arguments]<#:phases>: Change
directory to "compiler-rt" for LLVM monorepo.
(clang-runtime-15,clang-runtime-14): Adjust accordingly.

Change-Id: I6a77c9d106439e4794b8531e2160e2c9ce63d86e
This commit is contained in:
Hilton Chain 2023-10-23 20:36:10 +08:00 committed by Efraim Flashner
parent f7411e283a
commit 15d90e7bfb
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -161,6 +161,11 @@ (define* (clang-runtime-from-llvm llvm
(ice-9 match)
,@%cmake-build-system-modules)
#:phases (modify-phases (@ (guix build cmake-build-system) %standard-phases)
,@(if hash
'()
'((add-after 'unpack 'change-directory
(lambda _
(chdir "compiler-rt")))))
(add-after 'set-paths 'hide-glibc
;; Work around https://issues.guix.info/issue/36882. We need to
;; remove glibc from CPLUS_INCLUDE_PATH so that the one hardcoded
@ -714,28 +719,10 @@ (define-public llvm-14
("perl" ,perl)))))
(define-public clang-runtime-15
(let ((template (clang-runtime-from-llvm llvm-15)))
(package
(inherit template)
(arguments
(substitute-keyword-arguments (package-arguments template)
((#:phases phases '(@ (guix build cmake-build-system) %standard-phases))
#~(modify-phases #$phases
(add-after 'unpack 'change-directory
(lambda _
(chdir "compiler-rt"))))))))))
(clang-runtime-from-llvm llvm-15))
(define-public clang-runtime-14
(let ((template (clang-runtime-from-llvm llvm-14)))
(package
(inherit template)
(arguments
(substitute-keyword-arguments (package-arguments template)
((#:phases phases '(@ (guix build cmake-build-system) %standard-phases))
#~(modify-phases #$phases
(add-after 'unpack 'change-directory
(lambda _
(chdir "compiler-rt"))))))))))
(clang-runtime-from-llvm llvm-14))
(define-public clang-15
(clang-from-llvm