Skip to content

Commit

Permalink
Add build option for using Clang Control Flow Intergrity (CFI) sanitizer
Browse files Browse the repository at this point in the history
"make CFI=y" can now be used to build a sigma_dut version for checking
CFI sanitizer behavior.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
  • Loading branch information
Jouni Malinen committed Jun 12, 2019
1 parent 134fe3c commit c1735d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ LDFLAGS += -fsanitize=$(CHECKS)
LDFLAGS += -fno-sanitize-recover=all
endif

ifdef CFI
CC=clang-6.0
CFLAGS += -MMD -O2 -Wall -g
CFLAGS += -flto -fvisibility=hidden -fsanitize=cfi
LDFLAGS += -flto
endif

ifndef CC
CC=gcc
endif
Expand Down

0 comments on commit c1735d5

Please sign in to comment.