Skip to content

Commit

Permalink
Split out sanitize LDFLAGS from SANITIZE_OPTS
Browse files Browse the repository at this point in the history
Sometimes both CXXFLAGS and LDFLAGS are passed, in which case we need to avoid duplicating the `-mllvm` option, which may only be specified once.
  • Loading branch information
Keno committed Oct 19, 2015
1 parent 7d2f7b5 commit b82ab6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,14 @@ endif
ifeq ($(SANITIZE),1)
ifeq ($(SANITIZE_MEMORY),1)
SANITIZE_OPTS := -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer
SANITIZE_LDFLAGS := $(SANITIZE_OPTS)
else
SANITIZE_OPTS := -fsanitize=address -mllvm -asan-stack=0
SANITIZE_LDFLAGS := -fsanitize=address
endif
JCXXFLAGS += $(SANITIZE_OPTS)
JCFLAGS += $(SANITIZE_OPTS)
LDFLAGS += $(SANITIZE_OPTS)
LDFLAGS += $(SANITIZE_LDFLAGS)
DEPS_CFLAGS += $(SANITIZE_OPTS)
DEPS_CXXFLAGS += $(SANITIZE_OPTS)
endif
Expand Down

0 comments on commit b82ab6a

Please sign in to comment.