From 042d01414885b483cf0dd1e619104fb322174e82 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 21 Dec 2020 17:32:51 +0100 Subject: [PATCH] disabled LTO for host release build on windows --- Makefile-Hosted | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile-Hosted b/Makefile-Hosted index 9dff3677..807fe5ec 100644 --- a/Makefile-Hosted +++ b/Makefile-Hosted @@ -227,7 +227,6 @@ DEAD_CODE_REMOVAL = -Wl,--gc-sections # Link time is larger and size of object files can not be retrieved # but resulting binary is smaller. Could be used in mission/deployment build # Requires -ffunction-section in linker call -LINK_TIME_OPTIMIZATION = -flto OPTIMIZATION += $(PROTOTYPE_OPTIMIZATION) endif @@ -309,7 +308,10 @@ all: executable # Build target configuration release: OPTIMIZATION = -Os $(PROTOTYPE_OPTIMIZATION) $(LINK_TIME_OPTIMIZATION) +# Problematic on MinGW +ifneq ($(OS),Windows_NT) release: LINK_TIME_OPTIMIZATION = -flto +endif release: TARGET = Release release: OPTIMIZATION_MESSAGE = On with Link Time Optimization release: DEBUG_LEVEL = -g0