removed Visual Studio specific makefile define MAXOPT in favor of adding more generic define LTO [Oliver Stöneberg]

master
Oliver Stöneberg 2013-08-02 09:48:25 +00:00
parent f01e531966
commit 171d43ead6
2 changed files with 16 additions and 4 deletions

View File

@ -250,6 +250,9 @@ BUILD_MIDILIB = 1
# specify the sanitizer to use or leave empty to use none
# SANITIZE =
# uncomment next line to enable LTO (link-time optimizations)
# LTO = 1
# specify optimization level or leave commented to use the default
# (default is OPTIMIZE = 3 normally, or OPTIMIZE = 0 with symbols)
# OPTIMIZE = 3
@ -495,6 +498,9 @@ endif
# if we are optimizing, include optimization options
ifneq ($(OPTIMIZE),0)
CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS)
ifdef LTO
CCOMFLAGS += -flto
endif
endif
# add a basic set of warnings
@ -603,6 +609,12 @@ LDFLAGS += -s
endif
endif
ifneq ($(OPTIMIZE),0)
ifdef LTO
LDFLAGS += -flto
endif
endif
# output a map file (emulator only)
ifdef MAP
LDFLAGSEMULATOR += -Wl,-Map,$(FULLNAME).map

View File

@ -129,12 +129,12 @@ else
CCOMFLAGS += /MT
endif
# turn on link-time codegen if the MAXOPT flag is also set
ifdef MAXOPT
CCOMFLAGS += /GL
LDFLAGS += /LTCG
# use link-time optimizations when enabled
ifneq ($(OPTIMIZE),0)
ifdef LTO
AR += /LTCG
endif
endif
# disable warnings and link against bufferoverflowu for 64-bit targets
ifeq ($(PTR64),1)