diff --git a/reactos/tools/helper.mk b/reactos/tools/helper.mk index da7387b6978..5266c7501e8 100644 --- a/reactos/tools/helper.mk +++ b/reactos/tools/helper.mk @@ -644,7 +644,7 @@ endif endif # -# Enable Tree-Wide Optimization. +# Enable Tree-Wide Optimization if Debug is on. # Protect uncompatible files here with an ifneq # if needed, until their problems can be found # @@ -653,6 +653,17 @@ ifneq ($(DBG),1) MK_CPPFLAGS += -O2 -Wno-strict-aliasing endif +# +# Force Optimization for w3seek +# +ifeq ($(OPTIMIZE),yes) + # Don't double it + ifneq ($(DBG),0) + MK_CFLAGS += -O2 -Wno-strict-aliasing + MK_CPPFLAGS += -O2 -Wno-strict-aliasing + endif +endif + ifneq ($(TARGET_LIBS),) MK_LIBS := $(TARGET_LIBS) $(MK_LIBS) endif