blob: 5cf8fcd1be3d4920e63c0be0b9e08943c1b5e43d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2024 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages llvm-meta)
#:use-module (guix utils)
#:export (clang-compiler-cpu-architectures))
(define (clang-compiler-cpu-architectures version)
"Return package properties for Clang VERSION."
`((compiler-cpu-architectures
;; These lists were obtained by running:
;;
;; guix shell clang -- llc -march=x86-64 -mattr=help
;;
;; and then filtering against clang/test/Misc/target-invalid-cpu-note.c
("powerpc64le"
,@(cond
((version>=? version "19.0")
'("power8" "power9" "power10" "power11" "powerpc64le"))
((version>=? version "11.0")
'("power8" "power9" "power10" "powerpc64le"))
(else '())))
("x86_64"
,@(cond
((version>=? version "19.0")
'("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm"
"goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere"
"sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell"
"core-avx2" "broadwell" "skylake" "skylake-avx512" "skx"
"cascadelake" "cooperlake" "cannonlake" "icelake-client"
"rocketlake" "icelake-server" "tigerlake" "sapphirerapids"
"alderlake" "raptorlake" "arrowlake" "arrowlake-s" "lunarlake"
"gracemont" "pantherlake" "meteorlake" "sierraforest" "grandridge"
"graniterapids" "graniterapids-d" "emeraldrapids"
"clearwaterforest" "knl" "knm" "k8" "athlon64" "athlon-fx"
"opteron" "k8-sse3" "athlon64-sse3" "opteron-sse3" "amdfam10"
"barcelona" "btver1" "btver2" "bdver1" "bdver2" "bdver3" "bdver4"
"znver1" "znver2" "znver3" "znver4" "znver5" "x86-64" "x86-64-v2"
"x86-64-v3" "x86-64-v4"))
((version>=? version "18.0")
'("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm"
"goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere"
"sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell"
"core-avx2" "broadwell" "skylake" "skylake-avx512" "skx"
"cascadelake" "cooperlake" "cannonlake" "icelake-client"
"rocketlake" "icelake-server" "tigerlake" "sapphirerapids"
"alderlake" "raptorlake" "arrowlake" "arrowlake-s" "lunarlake"
"gracemont" "pantherlake" "meteorlake" "sierraforest" "grandridge"
"graniterapids" "graniterapids-d" "emeraldrapids"
"clearwaterforest" "knl" "knm" "k8" "athlon64" "athlon-fx"
"opteron" "k8-sse3" "athlon64-sse3" "opteron-sse3" "amdfam10"
"barcelona" "btver1" "btver2" "bdver1" "bdver2" "bdver3" "bdver4"
"znver1" "znver2" "znver3" "znver4" "x86-64" "x86-64-v2"
"x86-64-v3" "x86-64-v4"))
((version>=? version "17.0")
'("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm"
"goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere"
"sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell"
"core-avx2" "broadwell" "skylake" "skylake-avx512" "skx"
"cascadelake" "cooperlake" "cannonlake" "icelake-client"
"rocketlake" "icelake-server" "tigerlake" "sapphirerapids"
"alderlake" "raptorlake" "meteorlake" "sierraforest" "grandridge"
"graniterapids" "graniterapids-d" "emeraldrapids" "knl" "knm" "k8"
"athlon64" "athlon-fx" "opteron" "k8-sse3" "athlon64-sse3"
"opteron-sse3" "amdfam10" "barcelona" "btver1" "btver2" "bdver1"
"bdver2" "bdver3" "bdver4" "znver1" "znver2" "znver3" "znver4"
"x86-64" "x86-64-v2" "x86-64-v3" "x86-64-v4"))
((version>=? version "16.0")
'("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm"
"goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere"
"sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell"
"core-avx2" "broadwell" "skylake" "skylake-avx512" "skx"
"cascadelake" "cooperlake" "cannonlake" "icelake-client"
"rocketlake" "icelake-server" "tigerlake" "sapphirerapids"
"alderlake" "raptorlake" "meteorlake" "sierraforest" "grandridge"
"graniterapids" "emeraldrapids" "knl" "knm" "k8" "athlon64"
"athlon-fx" "opteron" "k8-sse3" "athlon64-sse3" "opteron-sse3"
"amdfam10" "barcelona" "btver1" "btver2" "bdver1" "bdver2"
"bdver3" "bdver4" "znver1" "znver2" "znver3" "znver4" "x86-64"
"x86-64-v2" "x86-64-v3" "x86-64-v4"))
((version>=? version "13.0")
'("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm"
"goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere"
"sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell"
"core-avx2" "broadwell" "skylake" "skylake-avx512" "skx"
"cascadelake" "cooperlake" "cannonlake" "icelake-client"
"rocketlake" "icelake-server" "tigerlake" "sapphirerapids"
"alderlake" "knl" "knm" "k8" "athlon64" "athlon-fx" "opteron"
"k8-sse3" "athlon64-sse3" "opteron-sse3" "amdfam10" "barcelona"
"btver1" "btver2" "bdver1" "bdver2" "bdver3" "bdver4" "znver1"
"znver2" "znver3" "x86-64" "x86-64-v2" "x86-64-v3" "x86-64-v4"))
((version>=? version "9.0")
'("atom" "silvermont" "slm" "goldmont" "goldmont-plus" "tremont"
"nehalem" "corei7" "westmere" "sandybridge" "corei7-avx"
"ivybridge" "core-avx-i" "haswell" "core-avx2" "broadwell"
"skylake" "skylake-avx512" "skx" "cascadelake" "cooperlake"
"cannonlake" "icelake-client" "icelake-server" "knl" "knm" "k8"
"athlon64" "athlon-fx" "opteron" "k8-sse3" "athlon64-sse3"
"opteron-sse3" "amdfam10" "barcelona" "btver1" "btver2" "bdver1"
"bdver2" "bdver3" "bdver4" "znver1" "znver2" "x86-64"))
(else '()))))))
|