mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2024-10-01 01:36:01 -04:00
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
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_UBSAN),true)
|
||||
SHARED_FLAGS += -fsanitize=undefined -fno-sanitize-recover=undefined
|
||||
endif
|
||||
|
||||
CFLAGS := $(CFLAGS) -std=c17 $(SHARED_FLAGS) -Wmissing-prototypes
|
||||
CXXFLAGS := $(CXXFLAGS) -std=c++17 -fsized-deallocation $(SHARED_FLAGS)
|
||||
LDFLAGS := $(LDFLAGS) -Wl,--as-needed,-z,defs,-z,relro,-z,now,-z,nodlopen,-z,text
|
||||
@ -48,11 +52,6 @@ endif
|
||||
|
||||
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))
|
||||
$(error CONFIG_SEAL_METADATA must be true or false)
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user