mirror of
https://github.com/sockspls/badfish
synced 2025-05-07 03:39:35 +00:00
Enable link time optimization only when optimizing
Because it is quite slow, skip it when 'optimize' flag is 'no' No functional change.
This commit is contained in:
parent
2379312028
commit
6e840f8033
1 changed files with 7 additions and 5 deletions
|
@ -321,6 +321,7 @@ endif
|
||||||
### This is a mix of compile and link time options because the lto link phase
|
### This is a mix of compile and link time options because the lto link phase
|
||||||
### needs access to the optimization flags.
|
### needs access to the optimization flags.
|
||||||
ifeq ($(comp),gcc)
|
ifeq ($(comp),gcc)
|
||||||
|
ifeq ($(optimize),yes)
|
||||||
GCC_MAJOR := `$(CXX) -dumpversion | cut -f1 -d.`
|
GCC_MAJOR := `$(CXX) -dumpversion | cut -f1 -d.`
|
||||||
GCC_MINOR := `$(CXX) -dumpversion | cut -f2 -d.`
|
GCC_MINOR := `$(CXX) -dumpversion | cut -f2 -d.`
|
||||||
ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \)))
|
ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \)))
|
||||||
|
@ -328,6 +329,7 @@ ifeq ($(comp),gcc)
|
||||||
LDFLAGS += $(CXXFLAGS)
|
LDFLAGS += $(CXXFLAGS)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
### ==========================================================================
|
### ==========================================================================
|
||||||
### Section 4. Public targets
|
### Section 4. Public targets
|
||||||
|
|
Loading…
Add table
Reference in a new issue