From ae45230c207ee56c4504ea3b5a278a16822643fe Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Tue, 26 Apr 2005 05:10:58 +0000 Subject: [PATCH] Change optimization settings for retail builds. Change to -Os for smaller executables which are not slower, and enable more advanced optimizations. funitatatime is already included by default in GCC 4.0. Strip debug info from retail builds, since we don't parse the symbols anyways. I hope these options don't break anything, they don't for me; Debugging is unaffected. svn path=/trunk/; revision=14810 --- reactos/tools/helper.mk | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/reactos/tools/helper.mk b/reactos/tools/helper.mk index 5266c7501e8..7d1dd7ca685 100644 --- a/reactos/tools/helper.mk +++ b/reactos/tools/helper.mk @@ -643,16 +643,6 @@ ifneq ($(TARGET_TYPE),kernel) endif endif -# -# Enable Tree-Wide Optimization if Debug is on. -# Protect uncompatible files here with an ifneq -# if needed, until their problems can be found -# -ifneq ($(DBG),1) - MK_CFLAGS += -O2 -Wno-strict-aliasing - MK_CPPFLAGS += -O2 -Wno-strict-aliasing -endif - # # Force Optimization for w3seek # @@ -664,6 +654,19 @@ ifeq ($(OPTIMIZE),yes) endif endif +# +# Enable Tree-Wide Optimization if Debug is on. +# Protect uncompatible files here with an ifneq +# if needed, until their problems can be found +# +ifneq ($(DBG),1) + MK_CFLAGS += -Os -Wno-strict-aliasing -funit-at-a-time -fweb -ftracer -momit-leaf-frame-pointer + TARGET_LFLAGS += -Wl,-O1 -Wl,--sort-common -s + MK_CFLAGS += -mpreferred-stack-boundary=2 + MK_CPPFLAGS += -O2 -Wno-strict-aliasing + MK_CPPFLAGS += -mpreferred-stack-boundary=2 +endif + ifneq ($(TARGET_LIBS),) MK_LIBS := $(TARGET_LIBS) $(MK_LIBS) endif