pkgsrc/devel/lld/options.mk
mgorny ac9eb3e1ef devel/lld: import lld-7.0.1
LLD is a linker from the LLVM project that is a drop-in replacement for system
linkers and runs much faster than them. It also provides features that are
useful for toolchain developers.
2019-02-01 16:30:00 +00:00

20 lines
768 B
Makefile

# $NetBSD: options.mk,v 1.1 2019/02/01 16:30:00 mgorny Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.lld
PKG_SUPPORTED_OPTIONS= tests
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mtests)
DISTFILES+= llvm-${PKGVERSION_NOREV}.src${EXTRACT_SUFX}
CMAKE_ARGS+= -DLLVM_CONFIG_PATH=${LLVM_CONFIG_PATH:Q}
CMAKE_ARGS+= -DLLVM_INCLUDE_TESTS=ON
CMAKE_ARGS+= -DLLVM_BUILD_TESTS=ON
CMAKE_ARGS+= -DLLVM_MAIN_SRC_DIR=${WRKDIR}/llvm-${PKGVERSION_NOREV}.src
CMAKE_ARGS+= -DLLVM_EXTERNAL_LIT=${WRKDIR}/llvm-${PKGVERSION_NOREV}.src/utils/lit/lit.py
REPLACE_PYTHON+= ${WRKDIR}/llvm-${PKGVERSION_NOREV}.src/utils/lit/lit.py
TEST_TARGET= check-lld # failing tests fixed in 8.0
TEST_ENV+= LD_LIBRARY_PATH=${WRKDIR}/build/lib
.else
CMAKE_ARGS+= -DLLVM_INCLUDE_TESTS=OFF
.endif