Tidy up linux link-time optimisation flags.

Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2020-06-07 12:33:19 +01:00
parent 3d30fe8f3b
commit c48a91216e
1 changed files with 7 additions and 2 deletions

View File

@ -1,10 +1,15 @@
LDFLAGS += -g
LDFLAGS_OPT = -flto
LDFLAGS_COVERAGE = -lgcov
LDFLAGS_PROFILE = $(LDFLAGS_COVERAGE) $(LDFLAGS_OPT)
opt: LDFLAGS += $(LDFLAGS_OPT)
opt: $(EXE)
debug: $(EXE)
coverage: LDFLAGS += -lgcov
coverage: LDFLAGS += $(LDFLAGS_COVERAGE)
coverage: $(EXE)
profile: LDFLAGS += -lgcov
profile: LDFLAGS += $(LDFLAGS_PROFILE)
profile: $(EXE)
profiled: $(EXE)