Skip to content
Permalink
Browse files

Enable Link Time Optimization only if the compiler is gcc because clang

needs ld.gold which is not neccessary available.
  • Loading branch information...
decke committed Jan 2, 2015
1 parent 3ad3783 commit a3de3bd4547431db51b388255bc497d187b0f3a7
Showing with 6 additions and 0 deletions.
  1. +6 −0 Makefile
@@ -26,6 +26,12 @@ LDFLAGS += -pg
else
# for release
CFLAGS += -Ofast

# enable LTO for gcc
ifeq ($(shell $(CC) --version | grep gcc >/dev/null; echo $$?),0)
CFLAGS += -flto
LDFLAGS += -flto
endif
endif

# we need to link to libc/msvcrt

0 comments on commit a3de3bd

Please sign in to comment.
You can’t perform that action at this time.