X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=f6f36727ae7ecc860b78cbdcdfb48664e71ad359;hp=72afcc35629405af04cb8d583172472277a98330;hb=ef618863325a34c7bcbd56930184b5a3d9aed74a;hpb=414a3e6ee3ab38215f9eba69939773ba62a9766e diff --git a/src/Makefile b/src/Makefile index 72afcc35..f6f36727 100644 --- a/src/Makefile +++ b/src/Makefile @@ -302,8 +302,6 @@ ifeq ($(optimize),yes) ifeq ($(comp),clang) ifeq ($(KERNEL),Darwin) - CXXFLAGS += -flto - LDFLAGS += $(CXXFLAGS) ifeq ($(arch),i386) CXXFLAGS += -mdynamic-no-pic endif @@ -349,24 +347,20 @@ endif ### 3.8 Link Time Optimization, it works since gcc 4.5 but not on mingw under Windows. ### This is a mix of compile and link time options because the lto link phase ### needs access to the optimization flags. -ifeq ($(comp),gcc) - ifeq ($(optimize),yes) - ifeq ($(debug),no) +ifeq ($(optimize),yes) +ifeq ($(debug), no) + ifeq ($(comp),$(filter $(comp),gcc clang)) CXXFLAGS += -flto LDFLAGS += $(CXXFLAGS) endif - endif -endif -ifeq ($(comp),mingw) + ifeq ($(comp),mingw) ifeq ($(KERNEL),Linux) - ifeq ($(optimize),yes) - ifeq ($(debug),no) CXXFLAGS += -flto LDFLAGS += $(CXXFLAGS) endif endif - endif +endif endif ### 3.9 Android 5 can only run position independent executables. Note that this