pkgsrc/lang/llvm/Makefile
adam 1cc70026cc llvm: updated to 7.0.0
LLVM 7.0.0 Release

The release contains the work on trunk up to SVN revision 338536 plus
work on the release branch. It is the result of the community's work
over the past six months, including: function multiversioning in Clang
with the 'target' attribute for ELF-based x86/x86_64 targets, improved
PCH support in clang-cl, preliminary DWARF v5 support, basic support
for OpenMP 4.5 offloading to NVPTX, OpenCL C++ support, MSan, X-Ray
and libFuzzer support for FreeBSD, early UBSan, X-Ray and libFuzzer
support for OpenBSD, UBSan checks for implicit conversions, many
long-tail compatibility issues fixed in lld which is now production
ready for ELF, COFF and MinGW, new tools llvm-exegesis, llvm-mca and
diagtool. And as usual, many optimizations, improved diagnostics, and
bug fixes.

For more details, see the release notes:
https://llvm.org/releases/7.0.0/docs/ReleaseNotes.html
https://llvm.org/releases/7.0.0/tools/clang/docs/ReleaseNotes.html
https://llvm.org/releases/7.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html
https://llvm.org/releases/7.0.0/tools/lld/docs/ReleaseNotes.html
2018-12-09 20:04:38 +00:00

110 lines
3 KiB
Makefile

# $NetBSD: Makefile,v 1.35 2018/12/09 20:04:38 adam Exp $
#
# when updating this, please also update:
# devel/include-what-you-use
# devel/lldb
# devel/polly
# lang/clang
# lang/clang-static-analyzer
# lang/compiler-rt
# lang/libcxx
# lang/libcxxabi
# lang/libunwind
#
# Do not update:
# lang/libLLVM
# because pkgsrc provides multiple versions and lang/libLLVM is
# logically libLLVM4.
#
# Always update all */buildlink3.mk to require the latest stable release
# version in BUILDLINK_API_DEPENDS, as there is no backwards compatibility
DISTNAME= llvm-7.0.0.src
PKGNAME= ${DISTNAME:S/.src//}
CATEGORIES= lang devel
MASTER_SITES= http://llvm.org/releases/${PKGVERSION_NOREV}/
EXTRACT_SUFX= .tar.xz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://llvm.org/
COMMENT= Low Level Virtual Machine compiler infrastructure
LICENSE= modified-bsd
USE_LANGUAGES= c c++11
USE_CMAKE= yes
GCC_REQD+= 4.8
PYTHON_FOR_BUILD_ONLY= yes
CONFIGURE_DIRS= ${WRKDIR}/build
CMAKE_ARG_PATH= ${WRKSRC}
CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
CMAKE_ARGS+= -DCMAKE_C_COMPILER=${CC:Q}
CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=${CXX:Q}
CMAKE_ARGS+= -DCMAKE_CXX_LINK_FLAGS=${LDFLAGS:Q}
CMAKE_ARGS+= -DLLVM_BUILD_LLVM_DYLIB=ON
CMAKE_ARGS+= -DLLVM_INSTALL_UTILS=ON
CMAKE_ARGS+= -DLLVM_LINK_LLVM_DYLIB=ON
CMAKE_ARGS.Darwin+= -DCMAKE_LIBTOOL=/usr/bin/libtool
CHECK_PORTABILITY_SKIP= utils/buildit/build_llvm
# XXX perl is not added as a tool as it does not seem to be required
REPLACE_PERL+= utils/*.pl
REPLACE_PERL+= utils/codegen-diff
REPLACE_PERL+= utils/llvm-native-gxx
REPLACE_PYTHON+= tools/opt-viewer/*.py
REPLACE_PYTHON+= tools/sancov/*.py
REPLACE_PYTHON+= utils/*.py
REPLACE_PYTHON+= utils/Misc/zkill
REPLACE_PYTHON+= utils/bisect
REPLACE_PYTHON+= utils/clang-parse-diagnostics-file
REPLACE_PYTHON+= utils/git/find-rev
REPLACE_PYTHON+= utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest
REPLACE_PYTHON+= utils/llvm-build/llvm-build
REPLACE_PYTHON+= utils/llvm-compilers-check
REPLACE_PYTHON+= utils/llvm-lit/llvm-lit.in
TEST_TARGET= check
TEST_ENV+= LD_LIBRARY_PATH=${WRKDIR}/build/lib
# It may be that the Solaris linker is more strict here and they can be removed on
# all platforms. Change this to a patch if verified.
SUBST_CLASSES.SunOS+= lto
SUBST_STAGE.lto= pre-configure
SUBST_FILES.lto= tools/lto/lto.exports
SUBST_SED.lto= -e '/^LLVM/d'
.include "../../mk/bsd.prefs.mk"
PLIST_VARS+= notdylib
.if ${SHLIB_TYPE} == "dylib"
SOEXT= dylib
.else
SOEXT= so
PLIST.notdylib= yes
.endif
PLIST_SUBST+= SOEXT=${SOEXT}
# needs std::atomic with 64-bit CAS
.if ${MACHINE_ARCH} == "i386"
CXXFLAGS+= -march=i586
.endif
.include "options.mk"
# replacing config.guess is required even for cmake.
# It is used to detect correct LLVM_HOST_TRIPLE, e.g. for NetBSD/evbarm.
post-extract:
${MKDIR} ${WRKDIR}/build
.for f in config.guess config.sub
cp ../../mk/gnu-config/${f} ${WRKSRC}/cmake/${f}
.endfor
.include "../../devel/zlib/buildlink3.mk"
.include "../../lang/python/application.mk"
.include "../../lang/python/tool.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"