@@ -882,21 +882,40 @@ of programming tools as well as libraries with
equivalent functionality.")
(define-public clang clang-9)
(define-public clang-toolchain clang-toolchain-9)
-(define-public lld
+
+(define libunwind-12-source
+ (origin (method url-fetch)
+ (uri (llvm-uri "libunwind" "12.0.0"))
+ (sha256 (base32
"1x8wpmsrsgnwj2v5ih52ylni7r6n8gzkcj6hx65zbxski2rablly"))))
+
+(define-public lld-12
(package
(name "lld")
- (version "11.0.0")
+ (version "12.0.0")
(source (origin
(method url-fetch)
(uri (llvm-uri "lld" version))
(sha256
(base32
-
"077xyh7sij6mhp4dc4kdcmp9whrpz332fa12rwxnzp3wgd5bxrzg"))))
+
"1zakyxk5bwnh7jarckcd4rbmzi58jgn2dbah5j5cwcyfyfbx9drc"))))
(build-system cmake-build-system)
(inputs
- `(("llvm" ,llvm-11)))
+ `(("llvm" ,llvm-12)
+ ("libunwind-source" ,libunwind-12-source)))
(arguments
- `(#:build-type "Release"
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'extract-libunwind-and-patch-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (invoke "tar" "-xf" (assoc-ref inputs "libunwind-source"))
+ (substitute "MachO/CMakeLists.txt"
+ ;; The build script assumes that the libunwind
code
+ ;; is the source's sibling directory. Patch it
so
+ ;; that it finds it directly where we put it
+ (list (cons