Lines 3-15
Link Here
|
3 |
|
3 |
|
4 |
PORTNAME= llvm |
4 |
PORTNAME= llvm |
5 |
PORTVERSION= ${LLVM_MAJOR}.d${SNAPDATE} |
5 |
PORTVERSION= ${LLVM_MAJOR}.d${SNAPDATE} |
6 |
PORTREVISION= 1 |
6 |
PORTREVISION= 2 |
7 |
CATEGORIES= devel lang |
7 |
CATEGORIES= devel lang |
8 |
PKGNAMESUFFIX= -devel |
8 |
PKGNAMESUFFIX= -devel |
9 |
|
9 |
|
10 |
MAINTAINER= brooks@FreeBSD.org |
10 |
MAINTAINER= brooks@FreeBSD.org |
11 |
COMMENT= LLVM and Clang |
11 |
COMMENT= LLVM and Clang |
12 |
|
12 |
|
|
|
13 |
LICENSE= LLVM |
14 |
LICENSE_NAME= LLVM Release License |
15 |
LICENSE_FILE= ${WRKSRC}/LICENSE.TXT |
16 |
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept |
17 |
|
13 |
BROKEN_powerpc64= Does not build |
18 |
BROKEN_powerpc64= Does not build |
14 |
|
19 |
|
15 |
LLVM_SUFFIX= -devel |
20 |
LLVM_SUFFIX= -devel |
Lines 17-23
Link Here
|
17 |
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${LLVM_SUFFIX} |
22 |
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${LLVM_SUFFIX} |
18 |
DATADIR= ${PREFIX}/share/${PORTNAME}${LLVM_SUFFIX} |
23 |
DATADIR= ${PREFIX}/share/${PORTNAME}${LLVM_SUFFIX} |
19 |
|
24 |
|
|
|
25 |
TEST_TARGET= check |
26 |
TEST_WRKSRC= ${BUILD_WRKSRC} |
27 |
|
20 |
USES= cmake:outsource compiler:c++11-lib libedit ninja perl5 |
28 |
USES= cmake:outsource compiler:c++11-lib libedit ninja perl5 |
|
|
29 |
_USES_PYTHON?= python:build |
30 |
USES+= ${_USES_PYTHON} |
21 |
USE_LDCONFIG= ${LLVM_PREFIX}/lib |
31 |
USE_LDCONFIG= ${LLVM_PREFIX}/lib |
22 |
|
32 |
|
23 |
SUB_FILES= llvm-wrapper.sh |
33 |
SUB_FILES= llvm-wrapper.sh |
Lines 27-42
Link Here
|
27 |
#CMAKE_ARGS= -DBUILD_SHARED_LIBS=ON |
37 |
#CMAKE_ARGS= -DBUILD_SHARED_LIBS=ON |
28 |
CMAKE_ARGS= |
38 |
CMAKE_ARGS= |
29 |
|
39 |
|
|
|
40 |
PORTDOCS= * |
41 |
|
30 |
USE_GITHUB= yes |
42 |
USE_GITHUB= yes |
31 |
GH_ACCOUNT= llvm-mirror |
43 |
GH_ACCOUNT= llvm-mirror |
32 |
GH_TAGNAME= ${LLVM_COMMIT} |
44 |
GH_TAGNAME= ${LLVM_COMMIT} |
33 |
|
45 |
|
34 |
.include "Makefile.snapshot" |
46 |
.include "Makefile.snapshot" |
35 |
|
47 |
|
36 |
OPTIONS_DEFINE= CLANG DOCS EXTRAS LIT LLD LLDB |
48 |
OPTIONS_DEFINE= CLANG DOCS EXTRAS LIT LLD LLDB UTILS |
37 |
OPTIONS_DEFINE_amd64= COMPILER_RT GOLD OPENMP |
49 |
OPTIONS_DEFINE_amd64= COMPILER_RT GOLD OPENMP |
38 |
OPTIONS_DEFINE_i386= COMPILER_RT |
50 |
OPTIONS_DEFINE_i386= COMPILER_RT |
39 |
OPTIONS_DEFAULT= CLANG EXTRAS LIT LLD LLDB |
51 |
OPTIONS_DEFAULT= CLANG EXTRAS LIT LLD LLDB UTILS |
40 |
OPTIONS_DEFAULT_amd64= COMPILER_RT GOLD OPENMP |
52 |
OPTIONS_DEFAULT_amd64= COMPILER_RT GOLD OPENMP |
41 |
OPTIONS_DEFAULT_i386= COMPILER_RT |
53 |
OPTIONS_DEFAULT_i386= COMPILER_RT |
42 |
OPTIONS_SUB= yes |
54 |
OPTIONS_SUB= yes |
Lines 44-62
Link Here
|
44 |
PLIST_FILES= |
56 |
PLIST_FILES= |
45 |
|
57 |
|
46 |
CLANG_DESC= Build clang |
58 |
CLANG_DESC= Build clang |
47 |
CLANG_EXTRA_PATCHES= \ |
59 |
CLANG_EXTRA_PATCHES= \ |
48 |
${PATCHDIR}/clang-patch-fformat_extensions.diff \ |
60 |
${PATCHDIR}/clang-patch-fformat_extensions.diff \ |
49 |
${PATCHDIR}/clang-patch-tools_clang_lib_Headers_CMakeLists.txt |
61 |
${PATCHDIR}/clang-patch-tools_clang_lib_Headers_CMakeLists.txt |
50 |
CLANG_CONFLICTS_INSTALL= clang-devel-3.[1234567]* |
62 |
CLANG_CONFLICTS_INSTALL= clang-devel-3.[1234567]* |
51 |
CLANG_GH_PROJECT= clang:clang |
63 |
CLANG_GH_PROJECT= clang:clang |
|
|
64 |
CLANG_GH_SUBDIR= tools/clang:clang |
52 |
CLANG_GH_TAGNAME= ${CLANG_COMMIT}:clang |
65 |
CLANG_GH_TAGNAME= ${CLANG_COMMIT}:clang |
53 |
CLANG_CMAKE_ON= -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp |
66 |
CLANG_CMAKE_ON= -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp |
54 |
CLANG_PORTDOCS= clang |
67 |
CLANG_USE= GNOME=libxml2 |
55 |
COMPILER_RT_DESC= Sanitizer libraries |
68 |
COMPILER_RT_DESC= Sanitizer libraries |
|
|
69 |
COMPILER_RT_IMPLIES= CLANG |
56 |
COMPILER_RT_GH_PROJECT= compiler-rt:compiler_rt |
70 |
COMPILER_RT_GH_PROJECT= compiler-rt:compiler_rt |
|
|
71 |
COMPILER_RT_GH_SUBDIR= projects/compiler-rt:compiler_rt |
57 |
COMPILER_RT_GH_TAGNAME= ${COMPILER_RT_COMMIT}:compiler_rt |
72 |
COMPILER_RT_GH_TAGNAME= ${COMPILER_RT_COMMIT}:compiler_rt |
58 |
COMPILER_RT_PLIST_FILES=${_COMPILER_RT_LIBS:S|^|${_CRTLIBDIR}/|} |
73 |
COMPILER_RT_PLIST_FILES= ${_COMPILER_RT_LIBS:S|^|${_CRTLIBDIR_PREFIX}/|} |
59 |
DOCS_PORTDOCS= llvm |
74 |
DOCS_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx |
60 |
DOCS_CMAKE_ON= -DLLVM_ENABLE_SPHINX=ON \ |
75 |
DOCS_CMAKE_ON= -DLLVM_ENABLE_SPHINX=ON \ |
61 |
-DSPHINX_WARNINGS_AS_ERRORS=OFF \ |
76 |
-DSPHINX_WARNINGS_AS_ERRORS=OFF \ |
62 |
-DLLVM_BUILD_DOCS=ON |
77 |
-DLLVM_BUILD_DOCS=ON |
Lines 64-90
Link Here
|
64 |
EXTRAS_DESC= Extra clang tools |
79 |
EXTRAS_DESC= Extra clang tools |
65 |
EXTRAS_IMPLIES= CLANG |
80 |
EXTRAS_IMPLIES= CLANG |
66 |
EXTRAS_GH_PROJECT= clang-tools-extra:extras |
81 |
EXTRAS_GH_PROJECT= clang-tools-extra:extras |
|
|
82 |
EXTRAS_GH_SUBDIR= tools/clang/tools/extra:extras |
67 |
EXTRAS_GH_TAGNAME= ${EXTRAS_COMMIT}:extras |
83 |
EXTRAS_GH_TAGNAME= ${EXTRAS_COMMIT}:extras |
68 |
LIT_DESC= Install lit and FileCheck test tools |
84 |
GOLD_DESC= Build the LLVM Gold plugin for LTO |
|
|
85 |
GOLD_CMAKE_ON= -DLLVM_BINUTILS_INCDIR=${LOCALBASE}/include |
86 |
GOLD_BUILD_DEPENDS= ld.gold:devel/binutils |
87 |
LIT_DESC= Install lit testing tool |
88 |
LIT_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools${PYTHON_SUFFIX}>0:devel/py-setuptools${PYTHON_SUFFIX} |
89 |
LIT_IMPLIES= UTILS |
90 |
LIT_SUB_FILES= llvm-lit-wrapper.sh |
91 |
LIT_SUB_LIST= LLVM_PYTHON_SITELIBDIR="${PYTHONPREFIX_SITELIBDIR:S|^${PREFIX}||}" |
92 |
LIT_VARS= _USES_PYTHON=python |
69 |
LLD_DESC= Install lld, the LLVM linker |
93 |
LLD_DESC= Install lld, the LLVM linker |
70 |
LLD_GH_PROJECT= lld:lld |
94 |
LLD_GH_PROJECT= lld:lld |
|
|
95 |
LLD_GH_SUBDIR= tools/lld:lld |
71 |
LLD_GH_TAGNAME= ${LLD_COMMIT}:lld |
96 |
LLD_GH_TAGNAME= ${LLD_COMMIT}:lld |
72 |
LLDB_DESC= Install lldb, the LLVM debugger (ignored on 9.x) |
97 |
LLDB_DESC= Install lldb, the LLVM debugger (ignored on 9.x) |
73 |
LLDB_BUILD_DEPENDS= swig:devel/swig13 |
98 |
LLDB_BUILD_DEPENDS= swig:devel/swig13 |
74 |
LLDB_GH_PROJECT= lldb:lldb |
99 |
LLDB_GH_PROJECT= lldb:lldb |
|
|
100 |
LLDB_GH_SUBDIR= tools/lldb:lldb |
75 |
LLDB_GH_TAGNAME= ${LLDB_COMMIT}:lldb |
101 |
LLDB_GH_TAGNAME= ${LLDB_COMMIT}:lldb |
76 |
LLDB_USES= execinfo |
102 |
LLDB_USES= execinfo |
|
|
103 |
LLDB_VARS= _USES_PYTHON=python |
77 |
OPENMP_DESC= Install libomp, the LLVM OpenMP runtime library |
104 |
OPENMP_DESC= Install libomp, the LLVM OpenMP runtime library |
78 |
OPENMP_CONFLICTS_INSTALL= libiomp5-devel-* |
105 |
OPENMP_CONFLICTS_INSTALL= libiomp5-devel-* |
79 |
OPENMP_GH_PROJECT= openmp:openmp |
106 |
OPENMP_GH_PROJECT= openmp:openmp |
|
|
107 |
OPENMP_GH_SUBDIR= tools/openmp:openmp |
80 |
OPENMP_GH_TAGNAME= ${OPENMP_COMMIT}:openmp |
108 |
OPENMP_GH_TAGNAME= ${OPENMP_COMMIT}:openmp |
81 |
GOLD_DESC= Build the LLVM Gold plugin for LTO |
109 |
UTILS_DESC= Install utility binaries |
82 |
GOLD_CMAKE_ON= -DLLVM_BINUTILS_INCDIR=${LOCALBASE}/include |
110 |
UTILS_CMAKE_ON= -DLLVM_INSTALL_UTILS=ON |
83 |
GOLD_BUILD_DEPENDS= ld.gold:devel/binutils |
|
|
84 |
|
85 |
OPTIONS_SUB= yes |
86 |
|
87 |
DOCS_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx |
88 |
|
111 |
|
89 |
PLIST_SUB+= LLVM_MAJOR=${LLVM_MAJOR} LLVM_RELEASE=${LLVM_RELEASE} |
112 |
PLIST_SUB+= LLVM_MAJOR=${LLVM_MAJOR} LLVM_RELEASE=${LLVM_RELEASE} |
90 |
|
113 |
|
Lines 115-121
Link Here
|
115 |
llvm-stress \ |
138 |
llvm-stress \ |
116 |
llvm-symbolizer \ |
139 |
llvm-symbolizer \ |
117 |
llvm-tblgen \ |
140 |
llvm-tblgen \ |
118 |
macho-dump \ |
|
|
119 |
opt \ |
141 |
opt \ |
120 |
sancov |
142 |
sancov |
121 |
FIRST_COMMAND= ${COMMANDS:C/^/XXXX/1:MXXXX*:C/^XXXX//} |
143 |
FIRST_COMMAND= ${COMMANDS:C/^/XXXX/1:MXXXX*:C/^XXXX//} |
Lines 125-134
Link Here
|
125 |
${LIBNAME}.0 \ |
147 |
${LIBNAME}.0 \ |
126 |
libLTO.so |
148 |
libLTO.so |
127 |
|
149 |
|
128 |
EXTRAS_COMMANDS= \ |
150 |
EXTRAS_COMMANDS= \ |
129 |
clang-apply-replacements \ |
151 |
clang-apply-replacements \ |
130 |
clang-include-fixer \ |
152 |
clang-include-fixer \ |
131 |
clang-modernize \ |
|
|
132 |
clang-query \ |
153 |
clang-query \ |
133 |
clang-rename \ |
154 |
clang-rename \ |
134 |
clang-tidy \ |
155 |
clang-tidy \ |
Lines 147-153
Link Here
|
147 |
libclangTidyUtils \ |
168 |
libclangTidyUtils \ |
148 |
libfindAllSymbols \ |
169 |
libfindAllSymbols \ |
149 |
libmodernizeCore |
170 |
libmodernizeCore |
150 |
EXTRAS_PATTERN= ${EXTRAS_COMMANDS:tW:C/ */|/g}|${EXTRAS_LIBS:tW:C/ */|/g} |
171 |
EXTRAS_PATTERN= ${EXTRAS_COMMANDS:tW:C/ */|/g}|${EXTRAS_LIBS:tW:C/ */|/g} |
151 |
|
172 |
|
152 |
.include <bsd.port.options.mk> |
173 |
.include <bsd.port.options.mk> |
153 |
|
174 |
|
Lines 169-178
Link Here
|
169 |
COMPILER_RT_PATTERN= (asan_blacklist.txt|sanitizer|xray) |
190 |
COMPILER_RT_PATTERN= (asan_blacklist.txt|sanitizer|xray) |
170 |
.endif |
191 |
.endif |
171 |
|
192 |
|
|
|
193 |
LIT_COMMANDS= lit llvm-lit |
194 |
FIRST_LIT_COMMAND= ${LIT_COMMANDS:C/^/XXXX/1:MXXXX*:C/^XXXX//} |
195 |
|
172 |
.if ${PORT_OPTIONS:MLIT} |
196 |
.if ${PORT_OPTIONS:MLIT} |
173 |
MAN1SRCS+= lit.1 FileCheck.1 |
197 |
MAN1SRCS+= lit.1 |
174 |
_USES_PYTHON= python |
198 |
.endif |
175 |
LIT_COMMANDS= lit llvm-lit FileCheck |
199 |
|
|
|
200 |
UTILS_COMMANDS= count \ |
201 |
FileCheck \ |
202 |
lli-child-target \ |
203 |
llvm-PerfectShuffle \ |
204 |
not \ |
205 |
yaml-bench |
206 |
CLANG_UTILS_COMMANDS= clang-tblgen |
207 |
UTILS_PATTERN= ${UTILS_COMMANDS:tW:C/ */|/g}|${CLANG_UTILS_COMMANDS:tW:C/ */|/g} |
208 |
|
209 |
.if ${PORT_OPTIONS:MUTILS} |
210 |
COMMANDS+= ${UTILS_COMMANDS} |
211 |
.if ${PORT_OPTIONS:MCLANG} |
212 |
COMMANDS+= ${CLANG_UTILS_COMMANDS} |
213 |
.endif |
214 |
MAN1SRCS+= FileCheck.1 |
176 |
.endif |
215 |
.endif |
177 |
|
216 |
|
178 |
.if ${PORT_OPTIONS:MLLDB} |
217 |
.if ${PORT_OPTIONS:MLLDB} |
Lines 180-209
Link Here
|
180 |
lldb-argdumper \ |
219 |
lldb-argdumper \ |
181 |
lldb-mi \ |
220 |
lldb-mi \ |
182 |
lldb-server |
221 |
lldb-server |
183 |
_USES_PYTHON= python |
|
|
184 |
.endif |
222 |
.endif |
185 |
|
223 |
|
186 |
.if ! ${OPTIONS_DEFINE:MCOMPILER_RT} |
224 |
.if ! ${OPTIONS_DEFINE:MCOMPILER_RT} |
187 |
# Hack to disable COMPILER_RT in plist of unsupported architectures |
225 |
# Hack to disable COMPILER_RT in plist of unsupported architectures |
188 |
PLIST_SUB+= COMPILER_RT="@comment " |
226 |
PLIST_SUB+= COMPILER_RT="@comment " |
189 |
.else |
227 |
.else |
190 |
.endif |
228 |
.endif |
191 |
|
229 |
|
192 |
.if ! ${OPTIONS_DEFINE:MGOLD} |
230 |
.if ! ${OPTIONS_DEFINE:MGOLD} |
193 |
# Hack to disable GOLD in plist of unsupported architectures |
231 |
# Hack to disable GOLD in plist of unsupported architectures |
194 |
PLIST_SUB+= GOLD="@comment " |
232 |
PLIST_SUB+= GOLD="@comment " |
195 |
.else |
233 |
.else |
196 |
.endif |
234 |
.endif |
197 |
|
235 |
|
198 |
.if ! ${OPTIONS_DEFINE:MOPENMP} |
236 |
.if ! ${OPTIONS_DEFINE:MOPENMP} |
199 |
# Hack to disable OPENMP in plist of unsupported architectures |
237 |
# Hack to disable OPENMP in plist of unsupported architectures |
200 |
PLIST_SUB+= OPENMP="@comment " |
238 |
PLIST_SUB+= OPENMP="@comment " |
201 |
.else |
239 |
.else |
202 |
.endif |
240 |
.endif |
203 |
|
241 |
|
204 |
_USES_PYTHON?= python:build |
|
|
205 |
USES+= ${_USES_PYTHON} |
206 |
|
207 |
MAN1SRCS+= bugpoint.1 llc.1 lli.1 llvm-ar.1 llvm-as.1 \ |
242 |
MAN1SRCS+= bugpoint.1 llc.1 lli.1 llvm-ar.1 llvm-as.1 \ |
208 |
llvm-bcanalyzer.1 llvm-build.1 llvm-config.1 llvm-cov.1 \ |
243 |
llvm-bcanalyzer.1 llvm-build.1 llvm-config.1 llvm-cov.1 \ |
209 |
llvm-diff.1 llvm-dis.1 llvm-dwarfdump.1 \ |
244 |
llvm-diff.1 llvm-dis.1 llvm-dwarfdump.1 \ |
Lines 215-223
Link Here
|
215 |
|
250 |
|
216 |
.include <bsd.port.pre.mk> |
251 |
.include <bsd.port.pre.mk> |
217 |
|
252 |
|
218 |
_CRTLIBDIR= ${LLVM_PREFIX:S|${PREFIX}/||}/lib/freebsd |
253 |
_CRTLIBDIR= /lib/clang/${LLVM_RELEASE}/lib/${OPSYS:tl} |
|
|
254 |
_CRTLIBDIR_PREFIX= ${LLVM_PREFIX:S|${PREFIX}/||}${_CRTLIBDIR} |
219 |
.if ${ARCH} == "amd64" |
255 |
.if ${ARCH} == "amd64" |
220 |
_COMPILER_RT_LIBS= \ |
256 |
_COMPILER_RT_LIBS= \ |
221 |
libclang_rt.asan-preinit-x86_64.a \ |
257 |
libclang_rt.asan-preinit-x86_64.a \ |
222 |
libclang_rt.asan-x86_64.a \ |
258 |
libclang_rt.asan-x86_64.a \ |
223 |
libclang_rt.asan-x86_64.a.syms \ |
259 |
libclang_rt.asan-x86_64.a.syms \ |
Lines 242-248
Link Here
|
242 |
libclang_rt.ubsan_standalone_cxx-x86_64.a.syms |
278 |
libclang_rt.ubsan_standalone_cxx-x86_64.a.syms |
243 |
.endif |
279 |
.endif |
244 |
.if ${ARCH} == "i386" |
280 |
.if ${ARCH} == "i386" |
245 |
_COMPILER_RT_LIBS+= \ |
281 |
_COMPILER_RT_LIBS+= \ |
246 |
libclang_rt.asan-i386.a \ |
282 |
libclang_rt.asan-i386.a \ |
247 |
libclang_rt.asan-i386.so \ |
283 |
libclang_rt.asan-i386.so \ |
248 |
libclang_rt.asan-preinit-i386.a \ |
284 |
libclang_rt.asan-preinit-i386.a \ |
Lines 259-271
Link Here
|
259 |
.if ${PORT_OPTIONS:MEXTRAS} |
295 |
.if ${PORT_OPTIONS:MEXTRAS} |
260 |
COMMANDS+= ${EXTRAS_COMMANDS} |
296 |
COMMANDS+= ${EXTRAS_COMMANDS} |
261 |
MAN1SRCS+= extraclangtools.1 |
297 |
MAN1SRCS+= extraclangtools.1 |
262 |
PORTDOCS+= clang-tools |
|
|
263 |
.endif |
298 |
.endif |
264 |
|
299 |
|
265 |
.if ${PORT_OPTIONS:MLLD} |
300 |
.if ${PORT_OPTIONS:MLLD} |
266 |
COMMANDS+= lld \ |
301 |
COMMANDS+= lld \ |
267 |
lld-link |
302 |
lld-link |
268 |
PORTDOCS+= lld |
|
|
269 |
.endif |
303 |
.endif |
270 |
|
304 |
|
271 |
.if ${OPSYS} == "FreeBSD" && ${COMPILER_TYPE} != clang |
305 |
.if ${OPSYS} == "FreeBSD" && ${COMPILER_TYPE} != clang |
Lines 276-326
Link Here
|
276 |
BROKEN= LLDB does not build with Python 3 |
310 |
BROKEN= LLDB does not build with Python 3 |
277 |
.endif |
311 |
.endif |
278 |
|
312 |
|
279 |
post-extract-CLANG-on: |
313 |
do-install-LIT-on: |
280 |
${MV} ${WRKSRC_clang} ${PATCH_WRKSRC}/tools/clang |
314 |
@(cd ${WRKSRC}/utils/lit; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} \ |
281 |
|
315 |
${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} \ |
282 |
post-extract-EXTRAS-on: |
316 |
--single-version-externally-managed --root=${STAGEDIR} \ |
283 |
${MV} ${WRKSRC_extras} ${PATCH_WRKSRC}/tools/clang/tools/extra |
317 |
${PYDISTUTILS_INSTALLARGS}/${PORTNAME}${LLVM_SUFFIX}) |
284 |
|
318 |
${LN} -f ${STAGEDIR}${LLVM_PREFIX}/bin/lit \ |
285 |
post-extract-LLD-on: |
319 |
${STAGEDIR}${LLVM_PREFIX}/bin/llvm-lit |
286 |
${MV} ${WRKSRC_lld} ${PATCH_WRKSRC}/tools/lld |
|
|
287 |
|
288 |
post-extract-LLDB-on: |
289 |
${MV} ${WRKSRC_lldb} ${PATCH_WRKSRC}/tools/lldb |
290 |
|
291 |
post-extract-OPENMP-on: |
292 |
${MV} ${WRKSRC_openmp} ${PATCH_WRKSRC}/tools/openmp |
293 |
|
294 |
post-patch: |
295 |
${REINPLACE_CMD} -e 's|import lit|import lit${LLVM_SUFFIX}|' \ |
296 |
-e 's|from lit|from lit${LLVM_SUFFIX}|' \ |
297 |
-e 's|lit\.|lit${LLVM_SUFFIX}.|' \ |
298 |
${WRKSRC}/utils/lit/lit.py ${WRKSRC}/utils/lit/lit/*.py |
299 |
|
300 |
post-build-COMPILER_RT-on: |
301 |
${MKDIR} ${WRKDIR}/compiler-rt-build |
302 |
cd ${WRKDIR}/compiler-rt-build && \ |
303 |
${CMAKE_BIN} ${CMAKE_ARGS} \ |
304 |
-DLLVM_CONFIG_PATH=${CONFIGURE_WRKSRC}/bin/llvm-config \ |
305 |
${WRKSRC_compiler_rt} && \ |
306 |
${MAKE_ENV} ${MAKE_CMD} |
307 |
|
308 |
post-install: |
309 |
${INSTALL_SCRIPT} ${WRKDIR}/llvm-wrapper.sh \ |
310 |
${STAGEDIR}${PREFIX}/bin/${FIRST_COMMAND}${LLVM_SUFFIX} |
311 |
.for command in ${COMMANDS:C/^/XXXX/1:NXXXX*} |
312 |
${LN} -f ${STAGEDIR}${PREFIX}/bin/${FIRST_COMMAND}${LLVM_SUFFIX} \ |
313 |
${STAGEDIR}${PREFIX}/bin/${command}${LLVM_SUFFIX} |
314 |
.endfor |
315 |
|
320 |
|
316 |
post-install-DOCS-on: |
321 |
post-install-DOCS-on: |
317 |
${MV} ${STAGEDIR}${LLVM_PREFIX}/share/doc ${STAGEDIR}${DOCSDIR} |
322 |
${MV} ${STAGEDIR}${LLVM_PREFIX}/share/doc ${STAGEDIR}${DOCSDIR} |
318 |
.for _man in ${MAN1SRCS} |
323 |
.for _man in ${MAN1SRCS} |
319 |
${MV} ${STAGEDIR}${LLVM_PREFIX}/share/man/man1/${_man} \ |
324 |
${MV} ${STAGEDIR}${LLVM_PREFIX}/share/man/man1/${_man} \ |
320 |
${STAGEDIR}${MANPREFIX}/man/man1/${_man:R}${LLVM_SUFFIX}.1 |
325 |
${STAGEDIR}${MANPREFIX}/man/man1/${_man:R}${LLVM_SUFFIX}.1 |
321 |
.endfor |
326 |
.endfor |
322 |
.if ! ${PORT_OPTIONS:MLIT} |
327 |
.if ! ${PORT_OPTIONS:MLIT} |
323 |
${RM} ${STAGEDIR}${LLVM_PREFIX}/share/man/man1/lit.1 |
328 |
${RM} ${STAGEDIR}${LLVM_PREFIX}/share/man/man1/lit.1 |
|
|
329 |
.endif |
330 |
.if ! ${PORT_OPTIONS:MUTILS} |
324 |
${RM} ${STAGEDIR}${LLVM_PREFIX}/share/man/man1/FileCheck.1 |
331 |
${RM} ${STAGEDIR}${LLVM_PREFIX}/share/man/man1/FileCheck.1 |
325 |
.endif |
332 |
.endif |
326 |
${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/share/man/man1/ |
333 |
${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/share/man/man1/ |
Lines 335-374
Link Here
|
335 |
|
342 |
|
336 |
post-install-CLANG-on: |
343 |
post-install-CLANG-on: |
337 |
${LN} -f ${STAGEDIR}${LLVM_PREFIX}/bin/clang \ |
344 |
${LN} -f ${STAGEDIR}${LLVM_PREFIX}/bin/clang \ |
338 |
${STAGEDIR}${LLVM_PREFIX}/bin/clang-cpp |
345 |
${STAGEDIR}${LLVM_PREFIX}/bin/clang-cpp |
339 |
|
346 |
|
340 |
post-install-COMPILER_RT-on: |
347 |
post-install-COMPILER_RT-on: |
341 |
cd ${WRKDIR}/compiler-rt-build && \ |
|
|
342 |
${MAKE_ENV} ${MAKE_CMD} ${INSTALL_TARGET} |
343 |
.if ${ARCH} == "amd64" |
348 |
.if ${ARCH} == "amd64" |
344 |
${RM} ${STAGEDIR}${LLVM_PREFIX}/lib/freebsd/libclang_rt*i386* |
349 |
${RM} ${STAGEDIR}${LLVM_PREFIX}${_CRTLIBDIR}/libclang_rt*i386* |
345 |
.endif |
350 |
.endif |
346 |
|
351 |
|
347 |
post-install-LIT-on: |
352 |
post-install-script: |
348 |
${INSTALL_SCRIPT} ${PATCH_WRKSRC}/utils/lit/lit.py \ |
353 |
${INSTALL_SCRIPT} ${WRKDIR}/llvm-wrapper.sh \ |
349 |
${STAGEDIR}${LLVM_PREFIX}/bin/lit |
354 |
${STAGEDIR}${PREFIX}/bin/${FIRST_COMMAND}${LLVM_SUFFIX} |
350 |
${LN} -f ${STAGEDIR}${LLVM_PREFIX}/bin/lit \ |
355 |
.for command in ${COMMANDS:C/^/XXXX/1:NXXXX*} |
351 |
${STAGEDIR}${LLVM_PREFIX}/bin/llvm-lit |
356 |
${LN} -f ${STAGEDIR}${PREFIX}/bin/${FIRST_COMMAND}${LLVM_SUFFIX} \ |
352 |
${LN} -f ${STAGEDIR}${LLVM_PREFIX}/bin/lit \ |
357 |
${STAGEDIR}${PREFIX}/bin/${command}${LLVM_SUFFIX} |
353 |
${STAGEDIR}${PREFIX}/bin/lit${LLVM_SUFFIX} |
358 |
.endfor |
354 |
${LN} -f ${STAGEDIR}${LLVM_PREFIX}/bin/lit \ |
359 |
.if ${PORT_OPTIONS:MLIT} |
355 |
${STAGEDIR}${PREFIX}/bin/llvm-lit${LLVM_SUFFIX} |
360 |
${INSTALL_SCRIPT} ${WRKDIR}/llvm-lit-wrapper.sh \ |
356 |
${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/lit${LLVM_SUFFIX} |
361 |
${STAGEDIR}${PREFIX}/bin/${FIRST_LIT_COMMAND}${LLVM_SUFFIX} |
357 |
${INSTALL_DATA} ${WRKSRC}/utils/lit/lit/*.py \ |
362 |
.for command in ${LIT_COMMANDS:C/^/XXXX/1:NXXXX*} |
358 |
${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/lit${LLVM_SUFFIX} |
363 |
${LN} -f ${STAGEDIR}${PREFIX}/bin/${FIRST_LIT_COMMAND}${LLVM_SUFFIX} \ |
359 |
${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/FileCheck \ |
364 |
${STAGEDIR}${PREFIX}/bin/${command}${LLVM_SUFFIX} |
360 |
${STAGEDIR}${LLVM_PREFIX}/bin/ |
365 |
.endfor |
361 |
${LN} -f ${STAGEDIR}${LLVM_PREFIX}/bin/FileCheck \ |
366 |
.endif |
362 |
${STAGEDIR}${PREFIX}/bin/FileCheck${LLVM_SUFFIX} |
|
|
363 |
|
364 |
TEST_CMD= '(cd ${WRKSRC}/test; ${SETENV} ${MAKE_ENV} LD_LIBRARY_PATH=${WRKSRC}/Release/lib ${MAKE_CMD} check-local-lit)' |
365 |
regression-test: ${BUILD_COOKIE} |
366 |
if [ `${ID} -u` = 0 ]; then \ |
367 |
${CHOWN} -R nobody ${WRKSRC}/test; \ |
368 |
su -m nobody -c ${TEST_CMD}; \ |
369 |
else \ |
370 |
${SH} -c ${TEST_CMD}; \ |
371 |
fi |
372 |
|
367 |
|
373 |
build-plist: |
368 |
build-plist: |
374 |
${RM} -f ${PLIST} ${PLIST}.tmp |
369 |
${RM} -f ${PLIST} ${PLIST}.tmp |
Lines 380-410
Link Here
|
380 |
${ECHO_CMD} %%LIT%%${LLVM_PREFIX:S|${PREFIX}/||}/bin/${command} >> ${PLIST}.tmp |
375 |
${ECHO_CMD} %%LIT%%${LLVM_PREFIX:S|${PREFIX}/||}/bin/${command} >> ${PLIST}.tmp |
381 |
.endfor |
376 |
.endfor |
382 |
${FIND} ${STAGEDIR}${LLVM_PREFIX} -type f -o -type l | \ |
377 |
${FIND} ${STAGEDIR}${LLVM_PREFIX} -type f -o -type l | \ |
383 |
${GREP} -v '[/-]lit$$' | ${GREP} -v 'FileCheck$$' | \ |
378 |
${GREP} -v '[/-]lit$$' | \ |
384 |
${GREP} -v man/man1 | ${SED} -e 's|${STAGEDIR}${PREFIX}/||' \ |
379 |
${GREP} -v man/man1 | ${SED} -e 's|${STAGEDIR}${PREFIX}/||' \ |
385 |
-e 's|${PORTVERSION}|%%PORTVERSION%%|' \ |
380 |
-e 's|${PORTVERSION}|%%PORTVERSION%%|' \ |
386 |
-e 's|release.cmake|%%CMAKE_BUILD_TYPE%%.cmake|' \ |
381 |
-e 's|release.cmake|%%CMAKE_BUILD_TYPE%%.cmake|' \ |
387 |
-e 's|${LLVM_RELEASE:C/\./\\./g}|%%LLVM_RELEASE%%|' \ |
382 |
-e 's|${LLVM_RELEASE:C/\./\\./g}|%%LLVM_RELEASE%%|' \ |
388 |
-e 's|${LLVM_MAJOR:C/\./\\./}|%%LLVM_MAJOR%%|' | \ |
383 |
-e 's|${LLVM_MAJOR:C/\./\\./}|%%LLVM_MAJOR%%|' \ |
389 |
${SORT} >> ${PLIST}.tmp |
384 |
-e 's|${PYTHONPREFIX_SITELIBDIR:S|^${PREFIX}||}|/%%PYTHON_SITELIBDIR%%|' | \ |
390 |
${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/lit${LLVM_SUFFIX} -type f | \ |
385 |
${SORT} >> ${PLIST}.tmp |
391 |
${SED} -e 's|${STAGEDIR}${PYTHON_SITELIBDIR}|%%LIT%%%%PYTHON_SITELIBDIR%%|' \ |
386 |
${AWK} '{ \ |
392 |
-e 's|${LLVM_RELEASE:C/\./\\./g}|%%LLVM_RELEASE%%|' \ |
387 |
if ($$0 ~ /${CLANG_PATTERN}/ && $$0 !~ /omp.h|${EXTRAS_PATTERN}|libclang_rt/) {printf "%%%%CLANG%%%%"} \ |
393 |
-e 's|${LLVM_MAJOR:C/\./\\./}|%%LLVM_MAJOR%%|' | \ |
388 |
if ($$0 ~ /${COMPILER_RT_PATTERN}/) \ |
394 |
${SORT} >> ${PLIST}.tmp |
|
|
395 |
awk '{ \ |
396 |
if ($$0 ~ /${CLANG_PATTERN}/ && $$0 !~ /omp.h|${EXTRAS_PATTERN}|libclang_rt/) {printf "%%%%CLANG%%%%"} \ |
397 |
if ($$0 ~ /${COMPILER_RT_PATTERN}/) \ |
398 |
{printf "%%%%COMPILER_RT%%%%"} \ |
389 |
{printf "%%%%COMPILER_RT%%%%"} \ |
399 |
if ($$0 ~ /lld/ && $$0 !~ /lldb/) {printf "%%%%LLD%%%%"} \ |
390 |
if ($$0 ~ /PYTHON_SITELIBDIR/ && /lit/) {printf "%%%%LIT%%%%"} \ |
400 |
if ($$0 ~ /(${EXTRAS_PATTERN})/) {printf "%%%%EXTRAS%%%%"} \ |
391 |
if ($$0 ~ /lld/ && $$0 !~ /lldb/) {printf "%%%%LLD%%%%"} \ |
401 |
if ($$0 ~ /(argdumper|lldb|six.py)/) {printf "%%%%LLDB%%%%"} \ |
392 |
if ($$0 ~ /bin/ && /(${UTILS_PATTERN})/) {printf "%%%%UTILS%%%%"} \ |
402 |
if ($$0 ~ /lib.*omp/) {printf "%%%%OPENMP%%%%"} \ |
393 |
if ($$0 ~ /(${EXTRAS_PATTERN})/) {printf "%%%%EXTRAS%%%%"} \ |
403 |
if ($$0 ~ /LLVMgold/) {printf "%%%%GOLD%%%%"} \ |
394 |
if ($$0 ~ /(argdumper|lldb|six.py)/) {printf "%%%%LLDB%%%%"} \ |
404 |
if ($$0 !~ /libclang_rt/) {print} \ |
395 |
if ($$0 ~ /lib.*omp/) {printf "%%%%OPENMP%%%%"} \ |
|
|
396 |
if ($$0 ~ /LLVMgold/) {printf "%%%%GOLD%%%%"} \ |
397 |
if ($$0 !~ /libclang_rt/) {print} \ |
405 |
}' ${PLIST}.tmp >> ${PLIST} |
398 |
}' ${PLIST}.tmp >> ${PLIST} |
406 |
${RM} ${PLIST}.tmp |
399 |
${RM} ${PLIST}.tmp |
407 |
|
|
|
408 |
check-commands: |
400 |
check-commands: |
409 |
.for command in ${COMMANDS} |
401 |
.for command in ${COMMANDS} |
410 |
test -e ${STAGEDIR}${LLVM_PREFIX}/bin/${command} |
402 |
test -e ${STAGEDIR}${LLVM_PREFIX}/bin/${command} |