-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathmeta.yaml
135 lines (124 loc) · 4.46 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
{% set version = "19.1.7" %}
# check https://clang.llvm.org/docs/OpenMPSupport.html
# occasionally to see last fully supported openmp ver.
{% set openmp_ver = "4.5" %}
package:
name: openmp
version: {{ version }}
source:
url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-{{ version.replace(".rc", "-rc") }}.tar.gz
sha256: 59abea1c22e64933fad4de1671a61cdb934098793c7a31b333ff58dc41bff36c
# name folder for easier deletion; we do the equivalent of downloading
# the subproject sources, so the work folder then has openmp in it;
# for details see build scripts
folder: llvm-project
patches:
# fix for https://github.com/llvm/llvm-project/issues/54596
- patches/0001-link-libomp-to-compiler-rt-on-osx-arm.patch
build:
number: 0
requirements:
build:
- {{ stdlib("c") }}
- {{ compiler("cxx") }}
- {{ compiler("fortran") }} # [win]
- clang # [win]
- cmake
- ninja
host:
- llvmdev {{ version }}
# see https://github.com/llvm/llvm-project/issues/54596
- compiler-rt # [osx and arm64]
outputs:
- name: llvm-openmp
script: install_pkg.sh # [unix]
script: install_pkg.bat # [win]
build:
ignore_run_exports_from:
- {{ compiler("cxx") }}
- {{ compiler("fortran") }}
run_exports:
strong:
- {{ pin_subpackage("llvm-openmp", max_pin=None) }}
- _openmp_mutex >={{ openmp_ver }} # [linux]
- _openmp_mutex * *_llvm # [linux]
requirements:
build:
- cmake
# for run-exports
- {{ stdlib("c") }}
- {{ compiler("cxx") }}
run_constrained:
- openmp {{ version }}|{{ version }}.*
test:
requires:
- clangxx
- {{ compiler('cxx') }}
files:
- omp_hello.c
commands:
# headers
- test -f $PREFIX/include/omp.h # [unix]
- if not exist %LIBRARY_INC%\omp.h exit 1 # [win]
# absence of fortran bits
- test ! -f $PREFIX/include/omp_lib.mod # [linux]
- test ! -f $PREFIX/include/omp_lib_kinds.mod # [linux]
- if exist %LIBRARY_INC%\omp_lib.mod exit 1 # [win]
- if exist %LIBRARY_INC%\omp_lib_kinds.mod exit 1 # [win]
# shared library
- test -f $PREFIX/lib/libomp.so # [linux]
- test -f $PREFIX/lib/libomp.dylib # [osx]
- if not exist %LIBRARY_BIN%\libomp.dll exit 1 # [win]
- if not exist %LIBRARY_LIB%\libomp.lib exit 1 # [win]
# compilation test
- export LNK_XTRA="-Wl,--allow-shlib-undefined" # [linux]
- $PREFIX/bin/clang -v -fopenmp -I$PREFIX/include -L$PREFIX/lib -Wl,-rpath,$PREFIX/lib $LNK_XTRA omp_hello.c -o omp_hello # [unix]
- '%LIBRARY_BIN%\clang -v -fopenmp -I%LIBRARY_INC% -L%LIBRARY_LIB% omp_hello.c -o omp_hello.exe' # [win]
- ./omp_hello # [unix]
- '%cd%\omp_hello.exe' # [win]
- name: llvm-openmp-fortran
script: install_pkg.sh # [unix]
script: install_pkg.bat # [win]
build:
# restricted to windows for now
skip: true # [not win]
run_exports:
strong:
- {{ pin_subpackage("llvm-openmp", max_pin=None) }}
- _openmp_mutex >={{ openmp_ver }} # [linux]
- _openmp_mutex * *_llvm # [linux]
requirements:
build:
- cmake
# for run-exports
- {{ stdlib("c") }}
- {{ compiler("cxx") }}
- {{ compiler("fortran") }} # [linux]
host:
- {{ pin_subpackage("llvm-openmp", exact=True) }}
run:
- {{ pin_subpackage("llvm-openmp", exact=True) }}
run_constrained:
# already contains the version
- {{ compiler("fortran") }}
test:
commands:
- test -f $PREFIX/include/omp_lib.mod # [linux]
- test -f $PREFIX/include/omp_lib_kinds.mod # [linux]
- if not exist %LIBRARY_INC%\omp_lib.mod exit 1 # [win]
- if not exist %LIBRARY_INC%\omp_lib_kinds.mod exit 1 # [win]
about:
home: http://openmp.llvm.org/
license: Apache-2.0 WITH LLVM-exception
license_file: openmp/LICENSE.TXT
summary: The OpenMP API supports multi-platform shared-memory parallel programming in C/C++ and Fortran.
dev_url: https://github.com/llvm/llvm-project/
extra:
recipe-maintainers:
- inducer
- jakirkham
- yesimon
- isuruf
- beckermr
- katietz
- h-vetinari