From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KPULIoZ+u2F1AgAAgWs5BA (envelope-from ) for ; Thu, 16 Dec 2021 18:59:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iIu1HYZ+u2HuMgAAB5/wlQ (envelope-from ) for ; Thu, 16 Dec 2021 17:59:34 +0000 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 AF7BEF033 for ; Thu, 16 Dec 2021 18:59:31 +0100 (CET) Received: from localhost ([::1]:42640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxv2Q-0008Kh-HM for larch@yhetil.org; Thu, 16 Dec 2021 12:59:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxv1z-0007ea-DQ for guix-patches@gnu.org; Thu, 16 Dec 2021 12:59:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53380) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxv1z-0007yx-4x for guix-patches@gnu.org; Thu, 16 Dec 2021 12:59:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxv1z-0006kT-4P for guix-patches@gnu.org; Thu, 16 Dec 2021 12:59:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52283] [PATCH v2 03/12] gnu: clang: Add 'compiler-cpu-architectures' property. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Dec 2021 17:59:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52283 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52283@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 52283-submit@debbugs.gnu.org id=B52283.163967753525876 (code B ref 52283); Thu, 16 Dec 2021 17:59:03 +0000 Received: (at 52283) by debbugs.gnu.org; 16 Dec 2021 17:58:55 +0000 Received: from localhost ([127.0.0.1]:36680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxv1r-0006jC-7v for submit@debbugs.gnu.org; Thu, 16 Dec 2021 12:58:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxv1l-0006hm-CN for 52283@debbugs.gnu.org; Thu, 16 Dec 2021 12:58:49 -0500 Received: from [2001:470:142:3::e] (port=44364 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxv1g-0007tB-2K; Thu, 16 Dec 2021 12:58:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=akp4J/T/ngJSGbARlTwRHi1VKqG5dsx9Z4tiXpIvQ04=; b=RnSyYadA6ypm4+a+Iujf b7Wwmkgq+/PMwgIZ50DCDuhJ8FDFFpZ/9CwrPS1cgxL1KXvqzxRfnHs+7sYmYx8HQ2nUVrj5aueAM JJSBvQWvpNhQYh173qvDLuVp8B/sm3oCDSg8+KW+Ux/2Cyjo4Duyxq0sqT0mGpRsAqInB8N856kb0 BF0CbFD2LUKHB5KtI19y+PGE3OuFC84mdZBgtxJ+xFl6hro9uzSYwt15XVN9UofKZuxbyfdX8tsPr uY2WEx7rIhMqcHRqmLQWe9NJkcuF8SEoGhsn1meNajTccg+4J9ih1TseK62y2PaD5awpOy2HpIHpm YeqEbcG085HO3A==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42202 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxv1g-0000YX-1i; Thu, 16 Dec 2021 12:58:44 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Thu, 16 Dec 2021 18:58:18 +0100 Message-Id: <20211216175827.2077-4-ludo@gnu.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211216175827.2077-1-ludo@gnu.org> References: <87lf0wkcam.fsf@gnu.org> <20211216175827.2077-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" 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=1639677571; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=akp4J/T/ngJSGbARlTwRHi1VKqG5dsx9Z4tiXpIvQ04=; b=PJ3XRK6cQuIp7FuRXCVHvHLtha+oVHGRrsAlyDyW6zwzt13QA/oeAV3K51UeF8LXHKIO5E W+1juEdv0gHFgqLoUEsJmcAhWkbOBcgOYPqv3XdVhGqJWjeUG0Zohrjmv8aHUKJRh6ml/Z Mf0aglLhsZkpr8dq+ihqRC05RCKOLjYyoGXctESiXXnIzlB9KGr5bwH508JD11TvuPfthZ ab8eUdNPDd+vypswOZKznioZ6JSCSa/SDTG9qNl58tG7CBOcluxpKvsAIq/PrCNyw4uXb4 mk/fUSTIRQy4kpsVG8vJacGHHlk7BRIwV8SZAjz43VsrQ1ZA42wFecmojOB0ow== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639677571; a=rsa-sha256; cv=none; b=Ys63hxpj1h186rMp+m7Aewq9LbnfFb+np/xfe/hgw44OwMdbI16C11g8OVQPSjP6TVtvBP zQmo945UhAKCd8aL5YLbSxUFYeEfsbtnRXD8LacenLDyELh/Fa97wV+JHtl7X5j30AFTGf qJKFnvOJLUSvZik/ErLGJKkdNrbhYh9MTKVkvmwOvP1xUEcXbkfr3ga7AIfPw7zY6PsUi9 JMvOTfrqECrtYP1woPeaXztTmUsZ1gOXlz3oOsLHtcOgB7YmFbvYC0C606r+ocvoMipu/K pgHmH1JTZjJEcSnSbDPgEneoqOKnGXRVtG6ODdoanPeH8X/8XtavXk+PtRjUEQ== 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=RnSyYadA; 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-Migadu-Spam-Score: -2.69 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=RnSyYadA; 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-Migadu-Queue-Id: AF7BEF033 X-Spam-Score: -2.69 X-Migadu-Scanner: scn0.migadu.com X-TUID: Z7dFFNIczdcH * gnu/packages/llvm.scm (clang-from-llvm): Add #:properties and honor it. (clang-properties): New procedures. (make-clang-toolchain): Set 'properties' field. --- gnu/packages/llvm.scm | 71 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 051bbfeab5..d87ab570ff 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -155,7 +155,9 @@ (define* (clang-runtime-from-llvm llvm hash (supported-systems (delete "mips64el-linux" %supported-systems)))) (define* (clang-from-llvm llvm clang-runtime hash - #:key (patches '()) tools-extra) + #:key (patches '()) tools-extra + (properties + (clang-properties (package-version llvm)))) "Produce Clang with dependencies on LLVM and CLANG-RUNTIME, and applying the given PATCHES. When TOOLS-EXTRA is given, it must point to the 'clang-tools-extra' tarball, which contains code for 'clang-tidy', 'pp-trace', @@ -426,10 +428,76 @@ (define (move program) Objective-C++ programming languages. It uses LLVM as its back end. The Clang project includes the Clang front end, the Clang static analyzer, and several code analysis tools.") + (properties properties) (license (if (version>=? version "9.0") license:asl2.0 ;with LLVM exceptions license:ncsa)))) +(define (clang-properties version) + "Return package properties for Clang VERSION." + `((compiler-cpu-architectures + ("x86_64" + ;; This list was obtained by running: + ;; + ;; guix shell clang -- llc -march=x86-64 -mattr=help + ;; + ;; filtered from uninteresting entries such as "i686" and "pentium". + ,@(if (version>=? version "10.0") ;TODO: refine + '("atom" + "barcelona" + "bdver1" + "bdver2" + "bdver3" + "bdver4" + "bonnell" + "broadwell" + "btver1" + "btver2" + "c3" + "c3-2" + "cannonlake" + "cascadelake" + "cooperlake" + "core-avx-i" + "core-avx2" + "core2" + "corei7" + "corei7-avx" + "generic" + "geode" + "goldmont" + "goldmont-plus" + "haswell" + "icelake-client" + "icelake-server" + "ivybridge" + "k8" + "k8-sse3" + "knl" + "knm" + "lakemont" + "nehalem" + "nocona" + "opteron" + "opteron-sse3" + "sandybridge" + "silvermont" + "skx" + "skylake" + "skylake-avx512" + "slm" + "tigerlake" + "tremont" + "westmere" + "x86-64" + "x86-64-v2" + "x86-64-v3" + "x86-64-v4" + "znver1" + "znver2" + "znver3") + '()))))) + (define (make-clang-toolchain clang) (package (name (string-append (package-name clang) "-toolchain")) @@ -471,6 +539,7 @@ (define (make-clang-toolchain clang) (search-paths (package-search-paths clang)) (license (package-license clang)) + (properties (package-properties clang)) ;for 'compiler-cpu-architectures' (home-page "https://clang.llvm.org") (synopsis "Complete Clang toolchain for C/C++ development") (description "This package provides a complete Clang toolchain for C/C++ -- 2.33.0