unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Hilton Chain via Guix-patches via <guix-patches@gnu.org>
To: 66701@debbugs.gnu.org
Cc: Hilton Chain <hako@ultrarare.space>, Hilton Chain <hako@ultrarare.space>
Subject: [bug#66701] [PATCH 11/14] gnu: Add clang-17.
Date: Mon, 23 Oct 2023 20:43:55 +0800	[thread overview]
Message-ID: <c5b6bde7c17686bbb1ea427fe3291e0970e5c797.1698063805.git.hako@ultrarare.space> (raw)
In-Reply-To: <cover.1698063805.git.hako@ultrarare.space>

* gnu/packages/llvm.scm (clang-from-llvm)[arguments]: Include test runner in
CMakeLists.txt when version >= 17.
(clang-17): New variable.

Change-Id: Ia3cd8013d497b72522e95f6face5975bf79f93b3
---
 gnu/packages/llvm.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 06ecbf7e1b..8dc87ad01b 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -358,6 +358,15 @@ (define* (clang-from-llvm llvm clang-runtime
                                 (("@GLIBC_LIBDIR@")
                                  (string-append libc "/lib"))))))
                         #t)))
+                  ,@(if (version>=? version "17")
+                        '((add-after 'unpack 'include-test-runner
+                            (lambda _
+                              (substitute* "CMakeLists.txt"
+                                ((".*llvm_gtest" line)
+                                 (string-append
+                                  "add_subdirectory(${LLVM_THIRD_PARTY_DIR}/uni\
+ttest third-party/unittest)\n" line))))))
+                        '())
                   ;; Awkwardly, multiple phases added after the same phase,
                   ;; e.g. unpack, get applied in the reverse order.  In other
                   ;; words, adding 'change-directory last means it occurs
@@ -1497,6 +1506,18 @@ (define-public llvm-17
 (define-public clang-runtime-17
   (clang-runtime-from-llvm llvm-17))
 
+(define-public clang-17
+  (clang-from-llvm
+   llvm-17 clang-runtime-17
+   #:tools-extra
+   (origin
+     (method url-fetch)
+     (uri (llvm-uri "clang-tools-extra"
+                    (package-version llvm-17)))
+     (sha256
+      (base32
+       "0an16xdc8rgrdf0dcq3sdg82ajyb00h4bff9n0gm7gqf48ds0da8")))))
+
 ;; Default LLVM and Clang version.
 (define-public libomp libomp-13)
 (define-public llvm llvm-13)
-- 
2.41.0





  parent reply	other threads:[~2023-10-23 12:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 12:28 [bug#66701] [PATCH 00/14] Add LLVM 16 and 17 Hilton Chain via Guix-patches via
2023-10-23 12:36 ` [bug#66701] [PATCH 01/14] gnu: clang-runtime-from-llvm: Adjust inputs for version 15 or later Hilton Chain via Guix-patches via
2023-10-23 12:36 ` [bug#66701] [PATCH 02/14] gnu: clang-runtime-from-llvm: Add phase for LLVM monorepo Hilton Chain via Guix-patches via
2023-10-23 12:36 ` [bug#66701] [PATCH 03/14] gnu: Add llvm-16 Hilton Chain via Guix-patches via
2023-10-23 12:36 ` [bug#66701] [PATCH 04/14] gnu: Add clang-runtime-16 Hilton Chain via Guix-patches via
2023-10-23 12:43 ` [bug#66701] [PATCH 05/14] gnu: Add clang-16 Hilton Chain via Guix-patches via
2023-10-23 12:43 ` [bug#66701] [PATCH 06/14] gnu: Add libomp-16 Hilton Chain via Guix-patches via
2023-10-23 12:43 ` [bug#66701] [PATCH 07/14] gnu: Add clang-toolchain-16 Hilton Chain via Guix-patches via
2023-10-23 12:43 ` [bug#66701] [PATCH 08/14] gnu: Add lld-16 Hilton Chain via Guix-patches via
2023-10-23 12:43 ` [bug#66701] [PATCH 09/14] gnu: Add llvm-17 Hilton Chain via Guix-patches via
2023-10-23 12:43 ` [bug#66701] [PATCH 10/14] gnu: Add clang-runtime-17 Hilton Chain via Guix-patches via
2023-10-23 12:43 ` Hilton Chain via Guix-patches via [this message]
2023-10-23 12:43 ` [bug#66701] [PATCH 12/14] gnu: Add libomp-17 Hilton Chain via Guix-patches via
2023-10-23 12:43 ` [bug#66701] [PATCH 13/14] gnu: Add clang-toolchain-17 Hilton Chain via Guix-patches via
2023-10-23 12:43 ` [bug#66701] [PATCH 14/14] gnu: Add lld-17 Hilton Chain via Guix-patches via
2023-11-06 14:47 ` [bug#66701] Add LLVM 16 and 17 Michael Ford
2023-11-12 14:14 ` bug#66701: [PATCH 00/14] " Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c5b6bde7c17686bbb1ea427fe3291e0970e5c797.1698063805.git.hako@ultrarare.space \
    --to=guix-patches@gnu.org \
    --cc=66701@debbugs.gnu.org \
    --cc=hako@ultrarare.space \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).