Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: Makefile.standalone

Issue 1311653003: Add UBSAN build option and fix undefined behaviour errors. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix after native_client pull Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceAssembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Makefile.standalone
diff --git a/Makefile.standalone b/Makefile.standalone
index 0210ed4f1a3d93364d077835c4c195d4105c091c..9469f81e5b528f5172f22a737fa2d782b9f07832 100644
--- a/Makefile.standalone
+++ b/Makefile.standalone
@@ -96,6 +96,18 @@ else
OBJDIR := $(OBJDIR)+Asserts
endif
+ifdef UBSAN
+ OBJDIR := $(OBJDIR)+UBSan
+ CXX_EXTRA += -fsanitize=undefined -fno-sanitize=vptr -fno-sanitize=nonnull-attribute
+ LD_EXTRA += -fsanitize=undefined
+endif
+
+ifdef UBSAN_TRAP
+ OBJDIR := $(OBJDIR)+UBSan_Trap
+ CXX_EXTRA += -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -fno-sanitize=vptr -fno-sanitize=nonnull-attribute
+ LD_EXTRA += -fsanitize=undefined-trap
+endif
+
ifdef TSAN
OBJDIR := $(OBJDIR)+TSan
CXX_EXTRA += -fsanitize=thread
@@ -108,6 +120,12 @@ ifdef ASAN
LD_EXTRA += -fsanitize=address
endif
+ifdef MSAN
+ OBJDIR := $(OBJDIR)+MSan
+ CXX_EXTRA += -fsanitize=memory
+ LD_EXTRA += -fsanitize=memory
+endif
+
SB_OBJDIR := $(OBJDIR)+Sandboxed
$(info -----------------------------------------------)
« no previous file with comments | « no previous file | src/IceAssembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698