-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
meta.yaml
302 lines (287 loc) · 11.1 KB
/
meta.yaml
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
{% set version = "19.1.0" %}
{% set major_ver = version.split(".")[0] %}
{% set maj_min = major_ver ~ "." ~ version.split(".")[1] %}
# as of LLVM 19, we expect an "-rcX" suffix for the release candidates
{% set extra = "-" ~ version.split(".")[-1] if version.split(".")[-1] not in "0123456789" else "" %}
{% set extra = "git" if version.split(".")[-1] == "dev0" else extra %}
package:
name: llvm-package
version: {{ version }}
source:
url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-{{ version.replace(".rc", "-rc") }}.tar.gz
sha256: 0a08341036ca99a106786f50f9c5cb3fbe458b3b74cab6089fd368d0edb2edfe
patches:
# - patches/intel-D47188-svml-VF.patch # Fixes vectorizer and extends SVML support
# - patches/expect-fastmath-entrypoints-in-add-TLI-mappings.ll.patch # adjusts test added in 10.0.0 for intel-D47188-svml-VF.patch effects
# - patches/amd-roc-2.7.0.diff
- patches/0001-pass-through-QEMU_LD_PREFIX-SDKROOT.patch
build:
number: 0
merge_build_host: false
requirements:
build:
- {{ stdlib('c') }}
- {{ compiler('cxx') }}
- cmake
- ninja
- python >=3
- libcxx {{ cxx_compiler_version }} # [osx]
host:
- libcxx {{ cxx_compiler_version }} # [osx]
# needs aarch/ppc/arm (re)build of conda-forge/backtrace-feedstock
- backtrace # [unix and x86]
- libxml2
- zlib
- zstd
outputs:
# Contains everything
- name: llvmdev
script: install_llvm.sh # [unix]
script: install_llvm.bat # [win]
build:
activate_in_script: true
requirements:
build:
- {{ stdlib('c') }}
- {{ compiler('cxx') }}
- cmake
- ninja
- python >=3
- m2-sed # [win]
- libcxx {{ cxx_compiler_version }} # [osx]
host:
- libcxx {{ cxx_compiler_version }} # [osx]
# we're deliberately excluding "libllvm-c<maj>" on windows
- {{ pin_subpackage("libllvm" ~ major_ver, exact=True) }}
- {{ pin_subpackage("llvm-tools", exact=True) }}
- zlib
- zstd
run:
# we're deliberately excluding "libllvm-c<maj>" on windows
- {{ pin_subpackage("libllvm" ~ major_ver, exact=True) }}
- {{ pin_subpackage("llvm-tools", exact=True) }}
# we need to do this manually because clang_bootstrap has no run-export
- libcxx >={{ cxx_compiler_version }} # [osx]
run_constrained:
- llvm {{ version }}
- llvm-tools {{ version }}
- clang {{ version }}
- clang-tools {{ version }}
test:
requires:
- ripgrep # [win]
commands:
- $PREFIX/bin/llvm-config --libs # [not win]
- test -f $PREFIX/include/llvm/Pass.h # [not win]
- test -f $PREFIX/lib/libLLVMCore.a # [not win]
- $PREFIX/libexec/llvm/not false # [not win]
- $PREFIX/bin/llvm-nm --help # [not win]
- if not exist %LIBRARY_INC%\\llvm\\Pass.h exit 1 # [win]
- if not exist "%LIBRARY_PREFIX%"\\libexec\llvm\not.exe exit 1 # [win]
- if not exist "%LIBRARY_BIN%"\\llvm-nm.exe exit 1 # [win]
- llvm-nm.exe --help # [win]
# ensure we've correctly inserted %VSINSTALLDIR% into the CMake metadata for LLVM;
# we're looking for: `INTERFACE_LINK_LIBRARIES "$ENV{VSINSTALLDIR}/DIA SDK/lib/amd64/diaguids.lib;[...]`instead
- rg -e "INTERFACE_LINK_LIBRARIES\s\"\$ENV\{VSINSTALLDIR\}[/\w\s]+/diaguids\.lib" %LIBRARY_LIB%\cmake\llvm\LLVMExports.cmake # [win]
# Contains the shared libraries. To make different LLVM libraries co-installable
# soversion is appended to the package name.
- name: libllvm{{ major_ver }}
script: install_llvm.sh # [not win]
build:
activate_in_script: true
run_exports: # [not win]
- {{ pin_subpackage("libllvm" ~ major_ver, max_pin="x.x") }} # [not win]
requirements:
build:
- {{ stdlib('c') }}
- {{ compiler('cxx') }}
- ninja # [not win]
- cmake # [not win]
- python >=3 # [not win]
- libcxx {{ cxx_compiler_version }} # [osx]
host:
- libcxx {{ cxx_compiler_version }} # [osx]
- libxml2 # [unix]
- zlib
- zstd
run:
# we need to do this manually because clang_bootstrap has no run-export
- libcxx >={{ cxx_compiler_version }} # [osx]
test:
commands:
# old style
- test -f $PREFIX/lib/libLLVM-{{ major_ver }}{{ extra }}.so # [linux]
- test -f $PREFIX/lib/libLLVM-{{ major_ver }}{{ extra }}.dylib # [osx]
# new style
- test -f $PREFIX/lib/libLLVM.so.{{ maj_min }}{{ extra }} # [linux]
- test -f $PREFIX/lib/libLLVM.{{ maj_min }}{{ extra }}.dylib # [osx]
# This is a meta package so that people can use the latest libllvm and also
# for run_exports
- name: llvm
build:
run_exports: # [not win]
- {{ pin_subpackage("libllvm" ~ major_ver, max_pin="x.x") }} # [not win]
requirements:
build:
host:
- {{ pin_subpackage("libllvm" ~ major_ver, exact=True) }} # [not win]
- libxml2
- zlib
- zstd
run: # [not win]
- {{ pin_subpackage("libllvm" ~ major_ver, exact=True) }} # [not win]
run_constrained:
- llvmdev {{ version }}
- llvm-tools {{ version }}
- clang {{ version }}
- clang-tools {{ version }}
test:
commands:
- echo "Hello World!"
# Contains LLVM tools with a version suffix
- name: llvm-tools-{{ major_ver }}
script: install_llvm.sh # [unix]
script: install_llvm.bat # [win]
build:
activate_in_script: true
# On Windows there are no symlinks and copying will create a new package
# that is 300MB+
skip: true # [win]
requirements:
build:
- {{ stdlib('c') }}
- {{ compiler('cxx') }}
- cmake
- ninja
- python >=3
- libcxx {{ cxx_compiler_version }} # [osx]
host:
- libcxx {{ cxx_compiler_version }} # [osx]
- {{ pin_subpackage("libllvm" ~ major_ver, exact=True) }}
- zlib
- zstd
run:
- {{ pin_subpackage("libllvm" ~ major_ver, exact=True) }}
# we need to do this manually because clang_bootstrap has no run-export
- libcxx >={{ cxx_compiler_version }} # [osx]
test:
commands:
- $PREFIX/bin/llc-{{ major_ver }} -version # [not win]
# The test for windows is split into two lines instead of having it in one line
# like its unix variant because of a YAML parsing issue.
- if not exist "%LIBRARY_BIN%"\\llc-{{ major_ver }}.exe exit 1 # [win]
- llc-{{ major_ver }} -version # [win]
- test ! -f $PREFIX/bin/llvm-config-{{ major_ver }} # [not win]
- if exist "%LIBRARY_BIN%"\\llvm-config-{{ major_ver }}.exe exit 1 # [win]
# Contains LLVM tools
- name: llvm-tools
script: install_llvm.sh # [unix]
script: install_llvm.bat # [win]
build:
activate_in_script: true
requirements:
build:
- {{ stdlib('c') }}
- {{ compiler('cxx') }}
- cmake
- ninja
- python >=3
- libcxx {{ cxx_compiler_version }} # [osx]
host:
- {{ pin_subpackage("libllvm" ~ major_ver, exact=True) }}
- {{ pin_subpackage("llvm-tools-" ~ major_ver, exact=True) }} # [not win]
# on unix, there's only symlinks
- libxml2 # [win]
- zlib # [win]
- zstd # [win]
run:
- {{ pin_subpackage("libllvm" ~ major_ver, exact=True) }}
- {{ pin_subpackage("llvm-tools-" ~ major_ver, exact=True) }} # [not win]
run_constrained:
- llvm {{ version }}
- llvmdev {{ version }}
- clang {{ version }}
- clang-tools {{ version }}
test:
commands:
- $PREFIX/bin/llc -version # [not win]
# The test for windows is split into two lines instead of having it in one line
# like its unix variant because of a YAML parsing issue.
- if not exist "%LIBRARY_BIN%"\\llc.exe exit 1 # [win]
- llc -version # [win]
- test ! -f $PREFIX/bin/llvm-config # [not win]
- if exist "%LIBRARY_BIN%"\\llvm-config.exe exit 1 # [win]
# Contains LLVM-C shared library
- name: libllvm-c{{ major_ver }}
script: install_llvm.sh # [unix]
script: install_llvm.bat # [win]
build:
run_exports:
- {{ pin_subpackage("libllvm-c" ~ major_ver, max_pin="x.x") }}
activate_in_script: true
# not supported on linux, see
# https://github.com/llvm/llvm-project/blob/llvmorg-16.0.6/llvm/tools/llvm-shlib/CMakeLists.txt#L82-L85
# osx currently fails as well, see https://github.com/llvm/llvm-project/issues/64657
skip: true # [not win]
requirements:
build:
- {{ stdlib('c') }}
- {{ compiler('cxx') }}
- cmake
- ninja
- libcxx {{ cxx_compiler_version }} # [osx]
host:
- libcxx {{ cxx_compiler_version }} # [osx]
- {{ pin_subpackage("libllvm" ~ major_ver, exact=True) }}
- zlib
- zstd
run_constrained:
- llvmdev {{ version }}
test:
commands:
- test -f $PREFIX/lib/libLLVM-C.{{ major_ver }}.dylib # [osx]
- if not exist %LIBRARY_BIN%\LLVM-C.dll exit 1 # [win]
- if not exist %LIBRARY_LIB%\LLVM-C.lib exit 1 # [win]
- name: lit
build:
noarch: python
script: python -m pip install llvm/utils/lit --no-deps -vv
activate_in_script: true
skip: true # [not linux64]
entry_points:
# upstream LLVM is inconsistent; there's one way specified in lit's setup.py...
- lit = lit.main:main
# ... and then the CMake files we install here (e.g. AddLLVM.cmake) look for another
- llvm-lit = lit.main:main
requirements:
host:
- python >=3
- pip
- setuptools
run:
- python >=3
test:
imports:
- lit
commands:
- lit -h
- llvm-lit -h
about:
home: http://llvm.org/
dev_url: https://github.com/llvm/llvm-project
license: Apache-2.0 WITH LLVM-exception
license_file: llvm/LICENSE.TXT
license_family: Apache
summary: Development headers and libraries for LLVM
extra:
recipe-maintainers:
- JohanMabille
- inducer
- jakirkham
- mingwandroid
- SylvainCorlay
- isuruf
- timsnyder
- xhochy
- h-vetinari
feedstock-name: llvmdev