Split clang/gcc specific arguments
This commit is contained in:
parent
6a893b4e56
commit
dc536da513
13
src/Makefile
13
src/Makefile
|
@ -22,12 +22,12 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(findstring address,$(sanitize)))
|
ifneq (,$(findstring address,$(sanitize)))
|
||||||
CPPFLAGS += -fsanitize=address
|
CXXFLAGS += -fsanitize=address
|
||||||
LDFLAGS += -lasan
|
LDFLAGS += -lasan
|
||||||
sanitize_suffix := $(sanitize_suffix)a
|
sanitize_suffix := $(sanitize_suffix)a
|
||||||
endif
|
endif
|
||||||
ifneq (,$(findstring undefined,$(sanitize)))
|
ifneq (,$(findstring undefined,$(sanitize)))
|
||||||
CPPFLAGS += -fsanitize=undefined
|
CXXFLAGS += -fsanitize=undefined
|
||||||
LDFLAGS += -lubsan
|
LDFLAGS += -lubsan
|
||||||
sanitize_suffix := $(sanitize_suffix)u
|
sanitize_suffix := $(sanitize_suffix)u
|
||||||
endif
|
endif
|
||||||
|
@ -88,7 +88,14 @@ else
|
||||||
LDFLAGS += -rdynamic
|
LDFLAGS += -rdynamic
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CXXFLAGS += -pedantic -std=c++17 -g -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-address -Wno-init-list-lifetime
|
CXXFLAGS += -pedantic -std=c++17 -g -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-address
|
||||||
|
|
||||||
|
compiler := $(shell $(CXX) --version)
|
||||||
|
ifneq (,$(findstring clang,$(compiler)))
|
||||||
|
CXXFLAGS += -frelaxed-template-template-args
|
||||||
|
else ifneq (,$(findstring GCC,$(compiler)))
|
||||||
|
CXXFLAGS += -Wno-init-list-lifetime
|
||||||
|
endif
|
||||||
|
|
||||||
all : kak
|
all : kak
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user