diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-07-13 16:14:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-13 16:14:54 -0700 |
commit | 757e9874be785ef23980034b41c91c7d9db55661 (patch) | |
tree | 6406257b717bc7dcd02fe3051cc28bd62d56136c /Makefile | |
parent | c9c63ee558ce3399bd2016388da9676d4f5ecf55 (diff) | |
parent | 566cf0b3bd6458a74e8a3df8c01d27f35e7814f2 (diff) | |
download | git-757e9874be785ef23980034b41c91c7d9db55661.tar.gz |
Merge branch 'jk/build-with-asan'
The build procedure has been improved to allow building and testing
Git with address sanitizer more easily.
* jk/build-with-asan:
Makefile: disable unaligned loads with UBSan
Makefile: turn off -fomit-frame-pointer with sanitizers
Makefile: add helper for compiling with -fsanitize
test-lib: turn on ASan abort_on_error by default
test-lib: set ASAN_OPTIONS variable before we run git
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1022,6 +1022,14 @@ ifdef DEVELOPER CFLAGS += $(DEVELOPER_CFLAGS) endif +ifdef SANITIZE +BASIC_CFLAGS += -fsanitize=$(SANITIZE) -fno-sanitize-recover=$(SANITIZE) +BASIC_CFLAGS += -fno-omit-frame-pointer +ifeq ($(SANITIZE),undefined) +BASIC_CFLAGS += -DNO_UNALIGNED_LOADS +endif +endif + ifndef sysconfdir ifeq ($(prefix),/usr) sysconfdir = /etc |