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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/IceAssembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # The following variables will likely need to be modified, depending on where 1 # The following variables will likely need to be modified, depending on where
2 # and how you built LLVM & Clang. They can be overridden in a command-line 2 # and how you built LLVM & Clang. They can be overridden in a command-line
3 # invocation of make, like: 3 # invocation of make, like:
4 # 4 #
5 # make LLVM_SRC_PATH=<path> LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> \ 5 # make LLVM_SRC_PATH=<path> LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> \
6 # PNACL_BIN_PATH=<path> ... 6 # PNACL_BIN_PATH=<path> ...
7 # 7 #
8 8
9 # LLVM_SRC_PATH is the path to the root of the checked out source code. This 9 # LLVM_SRC_PATH is the path to the root of the checked out source code. This
10 # directory should contain the configure script, the include/ and lib/ 10 # directory should contain the configure script, the include/ and lib/
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 SB_CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=1 89 SB_CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=1
90 CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=0 90 CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=0
91 91
92 ifdef NOASSERT 92 ifdef NOASSERT
93 ASSERTIONS = -DNDEBUG 93 ASSERTIONS = -DNDEBUG
94 else 94 else
95 ASSERTIONS = 95 ASSERTIONS =
96 OBJDIR := $(OBJDIR)+Asserts 96 OBJDIR := $(OBJDIR)+Asserts
97 endif 97 endif
98 98
99 ifdef UBSAN
100 OBJDIR := $(OBJDIR)+UBSan
101 CXX_EXTRA += -fsanitize=undefined -fno-sanitize=vptr -fno-sanitize=nonnull-att ribute
102 LD_EXTRA += -fsanitize=undefined
103 endif
104
105 ifdef UBSAN_TRAP
106 OBJDIR := $(OBJDIR)+UBSan_Trap
107 CXX_EXTRA += -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -fno -sanitize=vptr -fno-sanitize=nonnull-attribute
108 LD_EXTRA += -fsanitize=undefined-trap
109 endif
110
99 ifdef TSAN 111 ifdef TSAN
100 OBJDIR := $(OBJDIR)+TSan 112 OBJDIR := $(OBJDIR)+TSan
101 CXX_EXTRA += -fsanitize=thread 113 CXX_EXTRA += -fsanitize=thread
102 LD_EXTRA += -fsanitize=thread 114 LD_EXTRA += -fsanitize=thread
103 endif 115 endif
104 116
105 ifdef ASAN 117 ifdef ASAN
106 OBJDIR := $(OBJDIR)+ASan 118 OBJDIR := $(OBJDIR)+ASan
107 CXX_EXTRA += -fsanitize=address 119 CXX_EXTRA += -fsanitize=address
108 LD_EXTRA += -fsanitize=address 120 LD_EXTRA += -fsanitize=address
109 endif 121 endif
110 122
123 ifdef MSAN
124 OBJDIR := $(OBJDIR)+MSan
125 CXX_EXTRA += -fsanitize=memory
126 LD_EXTRA += -fsanitize=memory
127 endif
128
111 SB_OBJDIR := $(OBJDIR)+Sandboxed 129 SB_OBJDIR := $(OBJDIR)+Sandboxed
112 130
113 $(info -----------------------------------------------) 131 $(info -----------------------------------------------)
114 $(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH)) 132 $(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH))
115 $(info Using SB_LLVM_PATH = $(SB_LLVM_PATH)) 133 $(info Using SB_LLVM_PATH = $(SB_LLVM_PATH))
116 $(info Using NACL_ROOT = $(NACL_ROOT)) 134 $(info Using NACL_ROOT = $(NACL_ROOT))
117 $(info Using TOOLCHAIN_ROOT = $(TOOLCHAIN_ROOT)) 135 $(info Using TOOLCHAIN_ROOT = $(TOOLCHAIN_ROOT))
118 $(info Using PNACL_TOOLCHAIN_ROOT = $(PNACL_TOOLCHAIN_ROOT)) 136 $(info Using PNACL_TOOLCHAIN_ROOT = $(PNACL_TOOLCHAIN_ROOT))
119 $(info Using PNACL_BIN_PATH = $(PNACL_BIN_PATH)) 137 $(info Using PNACL_BIN_PATH = $(PNACL_BIN_PATH))
120 $(info Using CLANG_PATH = $(CLANG_PATH)) 138 $(info Using CLANG_PATH = $(CLANG_PATH))
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 416
399 docs: 417 docs:
400 doxygen Doxyfile 418 doxygen Doxyfile
401 @echo See file://`pwd`/docs/html/index.html 419 @echo See file://`pwd`/docs/html/index.html
402 420
403 clean: 421 clean:
404 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json 422 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json
405 423
406 clean-all: clean 424 clean-all: clean
407 rm -rf build/ docs/ 425 rm -rf build/ docs/
OLDNEW
« 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