Skip to content

Commit 3b6a727

Browse files
authored
Merge pull request #566 from libtom/fix-ci
Newer GCC requires `-flto=auto`
2 parents 3746c58 + 6d65a8f commit 3b6a727

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

makefile_include.mk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,11 @@ LTM_CFLAGS += -fomit-frame-pointer
8686
endif
8787

8888
ifdef COMPILE_LTO
89-
LTM_CFLAGS += -flto
90-
LTM_LDFLAGS += -flto
89+
ifeq ($(findstring clang,$(CC)),)
90+
LTO_ARG = "=auto"
91+
endif
92+
LTM_CFLAGS += -flto$(LTO_ARG)
93+
LTM_LDFLAGS += -flto$(LTO_ARG)
9194
AR = $(subst clang,llvm-ar,$(subst gcc,gcc-ar,$(CC)))
9295
endif
9396

0 commit comments

Comments
 (0)