define UBSan flags for SHARED_FLAGS to reuse it
This commit is contained in:
parent
189d3362d5
commit
705211ef49
9
Makefile
9
Makefile
@ -30,6 +30,10 @@ ifeq ($(CONFIG_NATIVE),true)
|
|||||||
SHARED_FLAGS += -march=native
|
SHARED_FLAGS += -march=native
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_UBSAN),true)
|
||||||
|
SHARED_FLAGS += -fsanitize=undefined -fno-sanitize-recover=undefined
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS := $(CFLAGS) -std=c17 $(SHARED_FLAGS) -Wmissing-prototypes
|
CFLAGS := $(CFLAGS) -std=c17 $(SHARED_FLAGS) -Wmissing-prototypes
|
||||||
CXXFLAGS := $(CXXFLAGS) -std=c++17 -fsized-deallocation $(SHARED_FLAGS)
|
CXXFLAGS := $(CXXFLAGS) -std=c++17 -fsized-deallocation $(SHARED_FLAGS)
|
||||||
LDFLAGS := $(LDFLAGS) -Wl,--as-needed,-z,defs,-z,relro,-z,now,-z,nodlopen,-z,text
|
LDFLAGS := $(LDFLAGS) -Wl,--as-needed,-z,defs,-z,relro,-z,now,-z,nodlopen,-z,text
|
||||||
@ -48,11 +52,6 @@ endif
|
|||||||
|
|
||||||
OBJECTS := $(addprefix $(OUT)/,$(OBJECTS))
|
OBJECTS := $(addprefix $(OUT)/,$(OBJECTS))
|
||||||
|
|
||||||
ifeq ($(CONFIG_UBSAN),true)
|
|
||||||
CFLAGS += -fsanitize=undefined -fno-sanitize-recover=undefined
|
|
||||||
CXXFLAGS += -fsanitize=undefined -fno-sanitize-recover=undefined
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq (,$(filter $(CONFIG_SEAL_METADATA),true false))
|
ifeq (,$(filter $(CONFIG_SEAL_METADATA),true false))
|
||||||
$(error CONFIG_SEAL_METADATA must be true or false)
|
$(error CONFIG_SEAL_METADATA must be true or false)
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user