Date: Sun, 2 Apr 2023 02:23:55 GMT From: Brooks Davis <brooks@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: d21523ff2022 - main - devel/llvm-devel: reduce diffs to llvm16 Message-ID: <202304020223.3322NtOs084250@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/ports/commit/?id=d21523ff202208a1808ef4bbc603b1427371e044 commit d21523ff202208a1808ef4bbc603b1427371e044 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2023-04-02 02:17:48 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2023-04-02 02:17:48 +0000 devel/llvm-devel: reduce diffs to llvm16 Mostly whitespace and style, but a few functional changes: - It is new possible to enable COMPILER_RT for the lite flavor. - Fix installation of internal lit depends. --- devel/llvm-devel/Makefile | 134 ++++++++++++++++++++++++--------------------- devel/llvm-devel/pkg-plist | 7 +++ 2 files changed, 78 insertions(+), 63 deletions(-) diff --git a/devel/llvm-devel/Makefile b/devel/llvm-devel/Makefile index 9f4c1c38c741..6d324c45670b 100644 --- a/devel/llvm-devel/Makefile +++ b/devel/llvm-devel/Makefile @@ -1,6 +1,6 @@ PORTNAME= llvm PORTVERSION= ${LLVM_MAJOR}.0.d${SNAPDATE} -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= devel lang PKGNAMESUFFIX= ${LLVM_SUFFIX} @@ -29,24 +29,29 @@ LLVM_PREFIX= ${PREFIX}/${LLVM_DIR} DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${LLVM_SUFFIX} DATADIR= ${PREFIX}/share/${PORTNAME}${LLVM_SUFFIX} -BUILD_DEPENDS= - USES= cmake compiler:c++17-lang cpe shebangfix -USE_LDCONFIG= ${LLVM_PREFIX}/lib -_USES_PYTHON?= python:build,3.6+ +_USES_PYTHON?= python:3.6+,build USES+= ${_USES_PYTHON} +USE_LDCONFIG= ${LLVM_PREFIX}/lib SHEBANG_FILES= \ + clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py \ + clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py \ + clang-tools-extra/clang-tidy/tool/run-clang-tidy.py \ + clang/tools/clang-format/clang-format-diff.py \ + clang/tools/clang-format/git-clang-format \ clang/tools/scan-build-py/bin/analyze-build \ clang/tools/scan-build-py/bin/intercept-build \ clang/tools/scan-build-py/bin/scan-build \ - clang/tools/scan-build-py/libexec/analyze-cc \ clang/tools/scan-build-py/libexec/analyze-c++ \ - clang/tools/scan-build-py/libexec/intercept-cc \ + clang/tools/scan-build-py/libexec/analyze-cc \ clang/tools/scan-build-py/libexec/intercept-c++ \ - llvm/tools/opt-viewer/optrecord.py \ + clang/tools/scan-build-py/libexec/intercept-cc \ + clang/tools/scan-view/bin/scan-view \ + clang/utils/hmaptool/hmaptool \ llvm/tools/opt-viewer/opt-diff.py \ llvm/tools/opt-viewer/opt-stats.py \ llvm/tools/opt-viewer/opt-viewer.py \ + llvm/tools/opt-viewer/optrecord.py \ llvm/utils/lit/lit.py \ llvm/utils/llvm-lit/llvm-lit.in @@ -82,57 +87,57 @@ GH_TAGNAME= ${LLVM_PROJECT_COMMIT} .include "Makefile.snapshot" -OPTIONS_DEFINE= CLANG DOCS LLD STATIC_LIBS +OPTIONS_DEFINE= CLANG COMPILER_RT DOCS LLD STATIC_LIBS OPTIONS_DEFAULT= CLANG LLD +OPTIONS_EXCLUDE_armv6= COMPILER_RT +OPTIONS_EXCLUDE_armv7= COMPILER_RT +OPTIONS_SUB= yes .if !${FLAVOR:Mlite} -OPTIONS_DEFINE+= COMPILER_RT EXTRAS FLANG LIT LLDB MLIR OPENMP +OPTIONS_DEFINE+= EXTRAS FLANG LIT LLDB MLIR OPENMP OPTIONS_DEFINE_amd64= GOLD OPTIONS_DEFINE_powerpc= GOLD OPTIONS_DEFINE_powerpc64= GOLD OPTIONS_DEFINE_powerpc64le= GOLD -OPTIONS_DEFAULT+= COMPILER_RT EXTRAS FLANG LIT LLDB STATIC_LIBS OPENMP + +OPTIONS_DEFAULT+= COMPILER_RT EXTRAS FLANG LIT LLDB MLIR OPENMP STATIC_LIBS OPTIONS_DEFAULT_amd64= GOLD OPTIONS_DEFAULT_powerpc= GOLD OPTIONS_DEFAULT_powerpc64= GOLD OPTIONS_DEFAULT_powerpc64le= GOLD -OPTIONS_EXCLUDE_armv6= COMPILER_RT FLANG OPENMP -OPTIONS_EXCLUDE_armv7= COMPILER_RT FLANG OPENMP + +OPTIONS_EXCLUDE_armv6+= FLANG OPENMP +OPTIONS_EXCLUDE_armv7+= FLANG OPENMP OPTIONS_EXCLUDE_i386= FLANG OPENMP OPTIONS_EXCLUDE_powerpc= FLANG OPENMP OPTIONS_EXCLUDE_riscv64= LLDB OPTIONS_EXCLUDE_FreeBSD_12= OPENMP .endif -OPTIONS_SUB= yes + _ALL_OPTIONS= CLANG COMPILER_RT DOCS EXTRAS FLANG GOLD LIT LLD LLDB MLIR \ OPENMP STATIC_LIBS -# Pre-declared for options framework -LIB_DEPENDS= -PLIST_DIRS= -PLIST_FILES= -PLIST_SUB_SED_EXCLUDE_VAL= lib "3.0.0" - CLANG_DESC= Build clang CLANG_CMAKE_ON= -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp CLANG_PORTDOCS= clang -CLANG_PLIST_FILES= share/toolchains/llvm-devel.mk +CLANG_PLIST_FILES= share/toolchains/llvm${LLVM_SUFFIX}.mk CLANG_SUB_FILES= xtoolchain.mk CLANG_SUB_LIST= XCC=clang${LLVM_SUFFIX} \ XCXX=clang++${LLVM_SUFFIX} \ XCPP=clang-cpp${LLVM_SUFFIX} \ XLD=ld.lld${LLVM_SUFFIX} \ X_COMPILER_TYPE=clang -.if ${FLAVOR:Nlite} -# Required by scan-build. Users of lite can install by hand. CLANG_USES= perl5 -CLANG_USE= PERL5=run +.if ${FLAVOR:Mlite} +# scan-build does require perl, but lite users can install it manually. +CLANG_USE= PERL5=build .endif COMPILER_RT_DESC= Sanitizer libraries COMPILER_RT_IMPLIES= CLANG COMPILER_RT_PLIST_FILES=${_COMPILER_RT_LIBS} -DOCS_PORTDOCS= llvm DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx-markdown-tables>=0:textproc/py-sphinx-markdown-tables@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}recommonmark>=0.0.20180530:textproc/py-recommonmark@${PY_FLAVOR} +DOCS_CONFLICTS_BUILD= cmark +DOCS_PORTDOCS= llvm DOCS_CMAKE_ON= -DLLVM_ENABLE_SPHINX=ON \ -DSPHINX_EXECUTABLE=${LOCALBASE}/bin/sphinx-build-${PYTHON_VER} \ -DSPHINX_WARNINGS_AS_ERRORS=OFF \ @@ -145,7 +150,12 @@ FLANG_DESC= Flang FORTRAN compiler FLANG_IMPLIES= MLIR FLANG_PORTDOCS= flang FLANG_PLIST_DIRS= ${LLVM_DIR}/include/flang/Config +GOLD_DESC= Build the LLVM Gold plugin for LTO +GOLD_CMAKE_ON= -DLLVM_BINUTILS_INCDIR=${LOCALBASE}/include +GOLD_BUILD_DEPENDS= ${LOCALBASE}/bin/ld.gold:devel/binutils +GOLD_PLIST_FILES= ${LLVM_DIR}/lib/LLVMgold.so LIT_DESC= Install lit and FileCheck test tools +LIT_VARS= _USES_PYTHON=python:3.6+ LLD_DESC= Install lld, the LLVM linker LLDB_BUILD_DEPENDS= swig:devel/swig LLDB_DESC= Install lldb, the LLVM debugger @@ -158,15 +168,9 @@ MLIR_DESC= Multi-Level Intermediate Representation OPENMP_DESC= Install libomp, the LLVM OpenMP runtime library OPENMP_CMAKE_ON= -DLIBOMPTARGET_BUILD_DEVICERTL_BCLIB=OFF OPENMP_PORTDOCS= openmp -OPENMP_USES= perl5 -OPENMP_USE= PERL5=build STATIC_LIBS_DESC= Install static libraries (does not effect sanitizers) -GOLD_DESC= Build the LLVM Gold plugin for LTO -GOLD_CMAKE_ON= -DLLVM_BINUTILS_INCDIR=${LOCALBASE}/include -GOLD_BUILD_DEPENDS= ${LOCALBASE}/bin/ld.gold:devel/binutils -GOLD_PLIST_FILES= ${LLVM_DIR}/lib/LLVMgold.so -CONFLICTS_INSTALL= llvm-devel llvm-devel-lite +CONFLICTS_INSTALL= ${PORTNAME}${LLVM_SUFFIX} ${PORTNAME}${LLVM_SUFFIX}-lite PLIST_SUB+= LLVM_MAJOR=${LLVM_MAJOR} \ LLVM_RELEASE=${LLVM_RELEASE} @@ -230,11 +234,7 @@ CONFIGURE_TARGET:=${ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-portbld-${OPSYS:tl}${ LLVM_ENABLE_PROJECTS+= clang COMMANDS+= ${CLANG_COMMANDS} MAN1SRCS+= ${CLANG_MAN1SRCS} -CLANG_PATTERN= (amdgpu-arch|c-index-test|clang|diagtool|hmaptool|intercept-|libear|libscanbuild|nvptx-arch|analyze-|scan-|Reporter.py|ScanView.py|scanview.css|sorttable.js|startfile.py|-analyzer) -SHEBANG_FILES+= clang/tools/clang-format/git-clang-format \ - clang/tools/clang-format/clang-format-diff.py \ - clang/tools/scan-view/bin/scan-view \ - clang/utils/hmaptool/hmaptool +CLANG_PATTERN= (amdgpu-arch|c-index-test|clang|diagtool|hmaptool|intercept-|libear|libscanbuild|nvptx-arch|analyze-|scan-|Reporter.py|ScanView.py|scanview.css|sorttable.js|startfile.py|-analyzer|AnalyzerPlugin.so) USES+= gnome .endif @@ -255,9 +255,6 @@ LLVM_ENABLE_PROJECTS+= clang-tools-extra COMMANDS+= ${EXTRAS_COMMANDS} MAN1SRCS+= ${EXTRAS_MAN1SRCS} PORTDOCS+= clang-tools -SHEBANG_FILES+= clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py \ - clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py \ - clang-tools-extra/clang-tidy/tool/run-clang-tidy.py .endif .if ${PORT_OPTIONS:MFLANG} @@ -277,11 +274,13 @@ PORTDOCS+= lld .if ${PORT_OPTIONS:MLLDB} LLVM_ENABLE_PROJECTS+= lldb +MAN1SRCS+= ${LLDB_MAN1SRCS} COMMANDS+= ${LLDB_COMMANDS} .endif .if ${PORT_OPTIONS:MMLIR} LLVM_ENABLE_PROJECTS+= mlir +MAN1SRCS+= ${MLIR_MAN1SRCS} COMMANDS+= ${MLIR_COMMANDS} .endif @@ -306,25 +305,25 @@ STRIP= .endif .if ${ARCH} == "aarch64" -COMPILER_RT_ARCHS= aarch64 +COMPILER_RT_ARCHS= aarch64 .elif ${ARCH} == "amd64" -COMPILER_RT_ARCHS= x86_64 +COMPILER_RT_ARCHS= x86_64 .if exists(/usr/lib32/libc.so.7) -COMPILER_RT_ARCHS+= i386 +COMPILER_RT_ARCHS+= i386 .endif .elif ${ARCH} == "i386" -COMPILER_RT_ARCHS= i386 +COMPILER_RT_ARCHS= i386 .elif ${ARCH} == "powerpc" -COMPILER_RT_ARCHS= powerpc +COMPILER_RT_ARCHS= powerpc .elif ${ARCH} == "powerpc64" -COMPILER_RT_ARCHS= powerpc64 +COMPILER_RT_ARCHS= powerpc64 .if exists(/usr/lib32/libc.so.7) -COMPILER_RT_ARCHS+= powerpc +COMPILER_RT_ARCHS+= powerpc .endif .elif ${ARCH} == "powerpc64le" -COMPILER_RT_ARCHS= powerpc64le +COMPILER_RT_ARCHS= powerpc64le .elif ${ARCH} == "riscv64" -COMPILER_RT_ARCHS= riscv64 +COMPILER_RT_ARCHS= riscv64 .endif _CRTBASEDIR= ${LLVM_DIR}/lib/clang/${LLVM_MAJOR} @@ -360,20 +359,22 @@ PLIST_SUB+= ${opt}="@comment " post-patch: ${REINPLACE_CMD} -e 's|import lit|import lit${LLVM_SUFFIX}|' \ -e 's|from lit|from lit${LLVM_SUFFIX}|' \ - -e 's|lit\.|lit${LLVM_SUFFIX}.|' \ - ${WRKSRC}/llvm/utils/lit/lit.py ${WRKSRC}/llvm/utils/lit/lit/*.py + -e 's|lit\.|lit${LLVM_SUFFIX}.|g' \ + ${WRKSRC}/llvm/utils/lit/lit.py \ + ${WRKSRC}/llvm/utils/lit/lit/*.py \ + ${WRKSRC}/llvm/utils/lit/lit/formats/*.py post-patch-CLANG-on: ${REINPLACE_CMD} -e 's|%%LLVM_PREFIX%%|${LLVM_PREFIX}|' \ - ${PATCH_WRKSRC}/clang/lib/Driver/ToolChains/CommonArgs.cpp + ${WRKSRC}/clang/lib/Driver/ToolChains/CommonArgs.cpp ${REINPLACE_CMD} -e 's|%%LLVM_SUFFIX%%|${LLVM_SUFFIX}|' \ - ${PATCH_WRKSRC}/clang/tools/clang-format/clang-format.py \ - ${PATCH_WRKSRC}/clang/tools/clang-format/clang-format-sublime.py \ - ${PATCH_WRKSRC}/clang/tools/clang-format/git-clang-format + ${WRKSRC}/clang/tools/clang-format/clang-format.py \ + ${WRKSRC}/clang/tools/clang-format/clang-format-sublime.py \ + ${WRKSRC}/clang/tools/clang-format/git-clang-format post-patch-LLD-on: - ${REINPLACE_CMD} -e "s|'indexsidebar.html'|['indexsidebar.html']|" \ - ${PATCH_WRKSRC}/lld/docs/conf.py + ${REINPLACE_CMD} -e "s|'indexsidebar.html'|['indexsidebar.html']|" \ + ${WRKSRC}/lld/docs/conf.py post-install: ${INSTALL_SCRIPT} ${WRKDIR}/llvm-wrapper.sh \ @@ -426,9 +427,6 @@ post-install-FLANG-on: ${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/include/flang/Optimizer/CMakeFiles ${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/include/flang/CMakeFiles -post-install-STATIC_LIBS-off: - ${RM} ${STAGEDIR}${LLVM_PREFIX}/lib/lib*.a - post-install-LIT-on: ${INSTALL_SCRIPT} ${PATCH_WRKSRC}/llvm/utils/lit/lit.py \ ${STAGEDIR}${LLVM_PREFIX}/bin/lit @@ -436,11 +434,17 @@ post-install-LIT-on: ${STAGEDIR}${LLVM_PREFIX}/bin/llvm-lit ${LN} -fs ../${LLVM_DIR}/bin/lit \ ${STAGEDIR}${PREFIX}/bin/lit${LLVM_SUFFIX} - ${LN} -fs ../${LLVM_DIR}/bin/lit \ + ${LN} -fs ../${LLVM_DIR}/bin/llvm-lit \ ${STAGEDIR}${PREFIX}/bin/llvm-lit${LLVM_SUFFIX} ${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/lit${LLVM_SUFFIX} + ${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/lit${LLVM_SUFFIX}/builtin_commands + ${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/lit${LLVM_SUFFIX}/formats ${INSTALL_DATA} ${WRKSRC}/llvm/utils/lit/lit/*.py \ ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/lit${LLVM_SUFFIX} + ${INSTALL_DATA} ${WRKSRC}/llvm/utils/lit/lit/builtin_commands/*.py \ + ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/lit${LLVM_SUFFIX}/builtin_commands/ + ${INSTALL_DATA} ${WRKSRC}/llvm/utils/lit/lit/formats/*.py \ + ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/lit${LLVM_SUFFIX}/formats/ ${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/FileCheck \ ${STAGEDIR}${LLVM_PREFIX}/bin/ ${LN} -fs ../${LLVM_DIR}/bin/FileCheck \ @@ -458,7 +462,11 @@ do-test: ${SH} -c ${TEST_CMD}; \ fi +post-install-STATIC_LIBS-off: + ${RM} ${STAGEDIR}${LLVM_PREFIX}/lib/lib*.a + build-plist: + @[ -d ${STAGEDIR} ] || (echo "Can't make plist before package is staged ${STAGEDIR}" && exit 1) ${RM} ${PLIST} ${PLIST}.tmp ${ECHO_CMD} "@comment >>>>> GENERATED FILE, DO NOT EDIT <<<<<" >> ${PLIST}.tmp ${ECHO_CMD} "@comment Alter build-plist target and regenerate as required" >> ${PLIST}.tmp @@ -487,14 +495,14 @@ build-plist: -e 's|${LLVM_RELEASE:C/\./\\./g}|%%LLVM_RELEASE%%|' \ -e 's|${LLVM_MAJOR}|%%LLVM_MAJOR%%|' | \ ${SORT} >> ${PLIST}.tmp - awk '{ \ + ${AWK} '{ \ if ($$0 ~ /lib.lib[a-zA-Z].*\.a$$/) {printf "%%%%STATIC_LIBS%%%%"} \ if ($$0 ~ /${CLANG_PATTERN}/ && $$0 !~ /${OPENMP_PATTERN}|${EXTRAS_PATTERN}|${COMPILER_RT_PATTERN}|lib[a-z]*_rt/) {printf "%%%%CLANG%%%%"} \ if ($$0 ~ /${COMPILER_RT_PATTERN}/) \ {printf "%%%%COMPILER_RT%%%%"} \ - if ($$0 ~ /(bin\/(ld|lld|wasm-ld))|liblld[^b]|\/lld\// && $$0 !~ /lldb/) {printf "%%%%LLD%%%%"} \ if ($$0 ~ /(${EXTRAS_PATTERN})/) {printf "%%%%EXTRAS%%%%"} \ if ($$0 ~ /(${FLANG_PATTERN})/) {printf "%%%%FLANG%%%%"} \ + if ($$0 ~ /(bin\/(ld|lld|wasm-ld))|liblld[^b]|\/lld\// && $$0 !~ /lldb/) {printf "%%%%LLD%%%%"} \ if ($$0 ~ /(argdumper|lldb|six.py)/) {printf "%%%%LLDB%%%%"} \ if ($$0 ~ /(${MLIR_PATTERN})/) {printf "%%%%MLIR%%%%"} \ if ($$0 ~ /(${OPENMP_PATTERN})/) {printf "%%%%OPENMP%%%%"} \ diff --git a/devel/llvm-devel/pkg-plist b/devel/llvm-devel/pkg-plist index 49a0cb4be012..d74231b7268c 100644 --- a/devel/llvm-devel/pkg-plist +++ b/devel/llvm-devel/pkg-plist @@ -6154,9 +6154,16 @@ llvm-devel/share/opt-viewer/style.css %%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/TestTimes.py %%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/TestingConfig.py %%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/__init__.py +%%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/builtin_commands/__init__.py +%%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/builtin_commands/cat.py +%%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/builtin_commands/diff.py %%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/cl_arguments.py %%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/discovery.py %%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/display.py +%%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/formats/__init__.py +%%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/formats/base.py +%%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/formats/googletest.py +%%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/formats/shtest.py %%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/main.py %%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/reports.py %%LIT%%%%PYTHON_SITELIBDIR%%/lit-devel/run.py
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304020223.3322NtOs084250>