Skip to content

Commit

Permalink
disable_optimizer: disable optimization via environmental variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jumpsiegel committed Apr 26, 2024
1 parent d1c9699 commit a9ff287
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/extra/with-optimization.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
ifeq ($(FD_DISABLE_OPTIMIZATION),)
CPPFLAGS+=-O3 -ffast-math -fno-associative-math -fno-reciprocal-math
CPPFLAGS+=-DFD_HAS_OPTIMIZATION=1
FD_HAS_OPTIMIZATION:=1
else
CPPFLAGS+=-O0 -ffast-math -fno-associative-math -fno-reciprocal-math
endif

RUST_PROFILE:=release-with-debug
4 changes: 4 additions & 0 deletions config/extra/with-security.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
ifeq ($(FD_DISABLE_OPTIMIZATION),)
CPPFLAGS+=-D_FORTIFY_SOURCE=2 -fPIC -Wl,-z,now -fstack-protector-strong
else
CPPFLAGS+=-fPIC -Wl,-z,now -fstack-protector-strong
endif
LDFLAGS+=-fPIC

0 comments on commit a9ff287

Please sign in to comment.