diff options
author | Tor Lillqvist <tml@collabora.com> | 2020-09-24 19:42:14 +0100 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2020-09-24 22:36:22 +0200 |
commit | 03d5167455a5cbadfad9a2d5989574b1d1929857 (patch) | |
tree | 6c65d0fa9ae099ce56b5967ddb85cb809f1f0ecc /solenv/gbuild | |
parent | 73f3028b501c72fb802aa15d0f450afd241e57c6 (diff) |
Use -flto=thin in gb_LTOFLAGS for Apple's Clang (for macOS and iOS)
Don't add any LTO flags into $CC and $CXX as we don't do that for
other platforms either. But maybe we should? Currently, with the
separate gb_LTOFLAGS, we have to handle each external project
separately to make it build with LTO.
Change-Id: I9761426585ebdfd976c74168218bd26bcc0e8517
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103351
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'solenv/gbuild')
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 0480b0fc3fd5..047f121106de 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -177,8 +177,12 @@ gb_CFLAGS_COMMON += -std=gnu89 ifeq ($(ENABLE_LTO),TRUE) ifeq ($(COM_IS_CLANG),TRUE) +ifneq (,$(index,iOS MACOSX,$(OS))) +gb_LTOFLAGS := -flto=thin +else gb_LTOFLAGS := -flto gb_LTOPLUGINFLAGS := --plugin LLVMgold.so +endif else gb_LTOFLAGS := -flto$(if $(filter-out 0,$(PARALLELISM)),=$(PARALLELISM)) -fuse-linker-plugin -O2 endif |