aboutsummaryrefslogtreecommitdiff
path: root/editors/libreoffice/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'editors/libreoffice/Makefile')
-rw-r--r--editors/libreoffice/Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/editors/libreoffice/Makefile b/editors/libreoffice/Makefile
index 3712209346c9..bca8c4763d0c 100644
--- a/editors/libreoffice/Makefile
+++ b/editors/libreoffice/Makefile
@@ -117,7 +117,7 @@ USE_OPENLDAP= yes
USE_PERL5= build
USE_XORG= ice sm x11 xaw xcb xext xinerama xrandr xrender
-OPTIONS_DEFINE= COINMP CUPS DOCS GNOME GTK3 JAVA KF5 MMEDIA PGSQL QT5 SDK TEST WEBDAV
+OPTIONS_DEFINE= COINMP CUPS DOCS GNOME GTK3 JAVA KF5 LTO MMEDIA PGSQL QT5 SDK TEST WEBDAV
OPTIONS_DEFAULT= CUPS MMEDIA QT5
.if !defined(DEFAULT_VERSIONS) || ! ${DEFAULT_VERSIONS:Mssl=*}
@@ -200,6 +200,8 @@ KF5_USE= kde=config,coreaddons,i18n,kio,windowsystem
KF5_USES= kde:5
KF5_IMPLIES= QT5
+LTO_CONFIGURE_ENABLE= lto
+
MMEDIA_CONFIGURE_ENABLE= gstreamer-1-0
MMEDIA_USE= GSTREAMER1=yes
@@ -287,6 +289,14 @@ EXTRA_PATCHES+= ${FILESDIR}/powerpc64
CONFIGURE_ARGS+= --disable-skia
.endif
+.if ${PORT_OPTIONS:MLTO} && ${CHOSEN_COMPILER_TYPE} == clang
+CPP= ${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT}
+CC= ${LOCALBASE}/bin/clang${LLVM_DEFAULT}
+CXX= ${LOCALBASE}/bin/clang++${LLVM_DEFAULT}
+BUILD_DEPENDS+= ${LOCALBASE}/bin/clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT}
+LLD_UNSAFE= yes
+.endif
+
.if ${CHOSEN_COMPILER_TYPE} == clang
CXXFLAGS_WARN= -Woverloaded-virtual -Wno-unused-parameter -Wno-unused-local-typedefs
.else