mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
removed Visual Studio specific makefile define MAXOPT in favor of adding more generic define LTO [Oliver Stöneberg]
This commit is contained in:
parent
f01e531966
commit
171d43ead6
12
makefile
12
makefile
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user