From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8L4UGSNjzmPVUwAAbAwnHQ (envelope-from ) for ; Mon, 23 Jan 2023 11:36:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qOElGSNjzmPaJQAA9RJhRA (envelope-from ) for ; Mon, 23 Jan 2023 11:36:19 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E38D6E75D for ; Mon, 23 Jan 2023 11:36:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJuBN-0002kk-HH; Mon, 23 Jan 2023 05:36:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJuBH-0002jM-Pf for guix-patches@gnu.org; Mon, 23 Jan 2023 05:36:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJuBH-0002nb-Dm for guix-patches@gnu.org; Mon, 23 Jan 2023 05:36:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJuBG-0007xs-Dm for guix-patches@gnu.org; Mon, 23 Jan 2023 05:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60934] [PATCH v2 1/2] gnu: Add llvm-for-mesa. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 23 Jan 2023 10:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60934 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Efraim Flashner Cc: John Kehayias , 60934@debbugs.gnu.org Received: via spool by 60934-submit@debbugs.gnu.org id=B60934.167447015930606 (code B ref 60934); Mon, 23 Jan 2023 10:36:02 +0000 Received: (at 60934) by debbugs.gnu.org; 23 Jan 2023 10:35:59 +0000 Received: from localhost ([127.0.0.1]:53450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJuBC-0007xa-To for submit@debbugs.gnu.org; Mon, 23 Jan 2023 05:35:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJuB8-0007xJ-NA for 60934@debbugs.gnu.org; Mon, 23 Jan 2023 05:35:57 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJuB1-0002lk-Rl; Mon, 23 Jan 2023 05:35:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=j2M0ZBBTdssyttLQIuCIs9mZ+7opYYuOSvskWIU9DzY=; b=FeqdT85xduDgR7Sfy+7Q ccr/0ubmLT1z6ifDs5JcV81ScXhUatft8C5XARL7qt68PdV4zOf3eXqm6f7llR3JdLr8M5MP8seY6 rhcCIsjzdunwxUpzr6K5kwHNwDazSrut/8mBW06kP/G2nOMaXaebmhcrRFP9bO7SBgk5RJGxixzfl tYoqM0j1DpHO+K9KiTMWC0nvZ7Wi+VbSeAt0T58D/bm5AEtNrYhO8reJwdcVpo3IJnlf/esS2kJha vxpusTB6jWGrkmnfgBUjJW6dsMZHordyGCKwwgl2HB4FMUUA/oPHMGyYfqyJSsEx78AdMoUxBPqbu qDav9q7UrLRrcQ==; Received: from [193.50.110.246] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJuB0-0003yU-U3; Mon, 23 Jan 2023 05:35:47 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <37a43bcd770f26694343af3ae0534208dc052055.1674136307.git.efraim@flashner.co.il> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 4 =?UTF-8?Q?Pluvi=C3=B4se?= an 231 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Perce-neige X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 23 Jan 2023 11:35:44 +0100 In-Reply-To: <37a43bcd770f26694343af3ae0534208dc052055.1674136307.git.efraim@flashner.co.il> (Efraim Flashner's message of "Thu, 19 Jan 2023 15:56:03 +0200") Message-ID: <87zga935dr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674470179; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=j2M0ZBBTdssyttLQIuCIs9mZ+7opYYuOSvskWIU9DzY=; b=ppwpuNIOo1XKb6VlFGnab0o897HYCswUCtRFKkCgpUOg1FRQzrEQ35EMGoK9ron4mufCd9 8Ei1tYYXAhD+DN65Cmj+ezAE7dJU4WSacqWwyJXDbliKNRt+BMUy6lYuSyD3skGrF1qac3 z+TJ6h9036pIJNdHX9EanMR2yhb9ZISXerQ+1ubWP5Jk7s3vo5IGlmZlI9i9PE4AjuTlR5 X54uJqPwRyiHRtLkeww0EdY96iV3nyNZD85gYhN77Y4zQyjS7KU60rr601hxX/8eSKUZhv icxvRRTYDwKwO7pGV3YSPXXP3yfSe3lSiycGf9c5C44PZkDAy06DuS3uxlqw9Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=FeqdT85x; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674470179; a=rsa-sha256; cv=none; b=Il2zQiJroh1MHqymjfzZhFCkkfw/7nhKz3ZUn+K3FATXrF2pn2yqBP3WCv7YKwzjRkQKIu 7XBqHocgRUobOqE+yqDus5xmhi/etiYFr3Dff5IyR2EHul7KMqOkiuS5wuCF0zjqoEgmBM SPgulMWbvuh11OGegaM68MOKuY4TbmNF7A1+s/GLrECkzUl3WDw+90KfbhiQyGbtrobeoG TMxtEHOIImIxa7uey9gXaoxLQHoxPKDlnOq/UZnEUqzww5SyNIV3tpUWYdCHwYhV5fZZJs RkkRCVEjVtLeDY45v0AvgjiRsA6vrTJ2Tseg5Vgt2ftuAIVdaHLtHxz2GJYlPQ== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -3.98 X-Spam-Score: -3.98 X-Migadu-Queue-Id: E38D6E75D Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=FeqdT85x; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-TUID: NsqmmqTEmoNn Hello! Efraim Flashner skribis: > * gnu/packages/llvm.scm (llvm-for-mesa): New variable. Yay for reduced closures!! > +(define-public llvm-for-mesa Maybe add a line saying that this is a slim variant specifically tailored for Mesa, that takes X% of the size of the default LLVM. > + ;; Note: update the 'clang' input of mesa-opencl when bumping this. > + (let ((base-llvm llvm-15)) > + (package > + (inherit base-llvm) Add (name "llvm-for-mesa") ? > + (arguments > + (substitute-keyword-arguments (package-arguments base-llvm) > + ((#:modules modules '((guix build cmake-build-system) > + (guix build utils))) > + `((ice-9 regex) > + (srfi srfi-1) > + (srfi srfi-26) > + ,@modules)) > + ((#:configure-flags cf ''()) > + #~(cons* > + ;; AMDGPU is needed by the vulkan drivers. > + #$(string-append "-DLLVM_TARGETS_TO_BUILD=3D" > + (system->llvm-target) ";AMDGPU") So the result is two build only two backends, for example x86_64 and AMDGPU, right? > + ((#:phases phases '%standard-phases) > + #~(modify-phases #$phases > + (add-after 'install 'delete-static-libraries > + ;; If these are just relocated then llvm-config can't fi= nd them. > + (lambda* (#:key outputs #:allow-other-keys) > + (for-each delete-file > + (find-files (string-append > + (assoc-ref outputs "out") "/li= b") > + "\\.a$")))) Should we pass -DDISABLE_STATIC=3DON or whatever it=E2=80=99s called instea= d? > + (add-after 'install 'build-and-install-llvm-config > + (lambda* (#:key outputs #:allow-other-keys) Why do we need this extra phase compared to =E2=80=98llvm=E2=80=99? Please= add a comment. :-) > + (let ((out (assoc-ref outputs "out"))) > + (substitute* > + "tools/llvm-config/CMakeFiles/llvm-config.dir/link= .txt" > + (((string-append "/tmp/guix-build-llvm-" > + #$(package-version base-llvm) > + ".drv-0/build/lib")) > + (string-append out "/lib"))) The non-literal pattern here, and that it explicitly refers to the build directory, is not great. I believe you can use (string-append (getcwd) "/lib") as the pattern, fixing the second problem. Not sure about the first one. Thank you! Ludo=E2=80=99.