me
/
guix
Archived
1
0
Fork 0

gnu: clang-runtime-from-llvm: Adjust inputs for version 15 or later.

* gnu/packages/llvm.scm (clang-runtime-from-llvm)[native-inputs]: Add gcc-12
when version >= 15.
[inputs]: Add libffi when version >= 15.
(clang-runtime-15)[native-inputs,inputs]: Remove fields.

Change-Id: I4b385b937edbb7a2840b998b6dd3e31a17cb556f
Hilton Chain 2023-10-23 20:36:09 +08:00 committed by Efraim Flashner
parent af6105afc6
commit f7411e283a
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 14 additions and 9 deletions

View File

@ -26,6 +26,7 @@
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
;;;
;;; This file is part of GNU Guix.
;;;
@ -139,9 +140,19 @@ as \"x86_64-linux\"."
(patches (map search-patch patches)))
(llvm-monorepo (package-version llvm))))
(build-system cmake-build-system)
(native-inputs (package-native-inputs llvm))
(native-inputs
(if (version>=? version "15")
;; TODO: Remove this when GCC 12 is the default.
;; libfuzzer fails to build with GCC 11
(modify-inputs (package-native-inputs llvm)
(prepend gcc-12))
(package-native-inputs llvm)))
(inputs
(list llvm))
(append
(list llvm)
(if (version>=? version "15")
(list libffi)
'())))
(arguments
`(;; Don't use '-g' during the build to save space.
#:build-type "Release"
@ -712,13 +723,7 @@ of programming tools as well as libraries with equivalent functionality.")
#~(modify-phases #$phases
(add-after 'unpack 'change-directory
(lambda _
(chdir "compiler-rt")))))))
(native-inputs
(modify-inputs (package-native-inputs template)
(prepend gcc-12))) ;libfuzzer fails to build with GCC 11
(inputs
(modify-inputs (package-inputs template)
(append libffi))))))
(chdir "compiler-rt"))))))))))
(define-public clang-runtime-14
(let ((template (clang-runtime-from-llvm llvm-14)))