mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-06-23 13:44:22 -04:00
use -march=native by default with a disable toggle
This commit is contained in:
parent
00915521a3
commit
5bee717134
2 changed files with 10 additions and 0 deletions
6
Makefile
6
Makefile
|
@ -1,3 +1,4 @@
|
|||
CONFIG_NATIVE := true
|
||||
CONFIG_CXX_ALLOCATOR := true
|
||||
CONFIG_UBSAN := false
|
||||
CONFIG_SEAL_METADATA := false
|
||||
|
@ -8,6 +9,11 @@ endef
|
|||
|
||||
CPPFLAGS := -D_GNU_SOURCE
|
||||
SHARED_FLAGS := -O2 -flto -fPIC -fvisibility=hidden -fno-plt -pipe -Wall -Wextra $(call safe_flag,-Wcast-align=strict) -Wcast-qual -Wwrite-strings
|
||||
|
||||
ifeq ($(CONFIG_NATIVE),true)
|
||||
SHARED_FLAGS += -march=native
|
||||
endif
|
||||
|
||||
CFLAGS := -std=c11 $(SHARED_FLAGS) -Wmissing-prototypes
|
||||
CXXFLAGS := -std=c++14 $(SHARED_FLAGS)
|
||||
LDFLAGS := -Wl,-z,defs,-z,relro,-z,now,-z,nodlopen,-z,text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue