Skip to content

Commit

Permalink
Revert "[build] Add -fsanitize=undefined to debug flags (#608)" (#618)
Browse files Browse the repository at this point in the history
This reverts commit 0bb7d92.
  • Loading branch information
Frenzie committed Mar 22, 2018
1 parent 0bb7d92 commit f92a6b5
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Makefile.defs
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,12 @@ else
STATIC_LIBSTDCPP=
endif

FSANITIZED_UNDEFINED_SUPPORTED := $(shell touch foo.c && gcc -fsanitize=undefined -c foo.c -o foo.o &> /dev/null && echo 1; rm -f foo.c foo.o)

# Base CFLAGS, without arch. We'll need it for luajit, because its
# Makefiles do some tricky stuff to differentiate HOST/TARGET
BASE_CFLAGS:=-O2 -ffast-math -pipe -fomit-frame-pointer
# Use this for debugging:
ifdef KODEBUG
BASE_CFLAGS:=-Og -g -ffast-math -pipe -fomit-frame-pointer
ifeq ($(FSANITIZED_UNDEFINED_SUPPORTED),1)
BASE_CFLAGS:=$(BASE_CFLAGS) -fsanitize=undefined
endif
endif
# For ricers.
#BASE_CFLAGS:=-O3 -ffast-math -pipe -fomit-frame-pointer -frename-registers -fweb
Expand Down Expand Up @@ -408,7 +403,6 @@ ifdef KODEBUG
$(info ************ Building for MACHINE: "$(MACHINE)" **********)
$(info ************ PATH: "$(PATH)" **********)
$(info ************ CHOST: "$(CHOST)" **********)
$(info ************ BASE_CFLAGS: "$(BASE_CFLAGS)" **********)
endif
OUTPUT_DIR?=build/$(MACHINE)

Expand Down

0 comments on commit f92a6b5

Please sign in to comment.