diff mbox series

[bug#49471] the actual patch

Message ID 144970c00db4527f3e64c1a74466286d@cock.li
State New
Headers show
Series [bug#49471] the actual patch | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Justin Veilleux July 8, 2021, 9:45 p.m. UTC
"include_directories\\(\\$\\{LLVM_MAIN_SRC_DIR\\}\\/\\.\\.\\/libunwind\\/include)"
+                                     (const (string-append 
"include_directories(" (getcwd) "/libunwind-12.0.0.src" "/include)")))))
+             #t)))
+       #:build-type "Release"
         ;; TODO: Tests require the lit tool, which isn't installed by 
the LLVM
         ;; package.
         #:tests? #f))
@@ -904,7 +923,7 @@ of programming tools as well as libraries with 
equivalent functionality.")
      (synopsis "Linker from the LLVM project")
      (description "LLD is a high-performance linker, built as a set of 
reusable
  components which highly leverage existing libraries in the larger LLVM 
Project.")
-    (license license:asl2.0))) ; With LLVM exception
+    (license license:asl2.0))) ; With LLVM exceptions

  (define-public lldb
    (package
diff mbox series

Patch

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 575c63c713..b3c1c943f7 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -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