OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # | 5 # |
6 # GNU Make based build file. For details on GNU Make see: | 6 # GNU Make based build file. For details on GNU Make see: |
7 # http://www.gnu.org/software/make/manual/make.html | 7 # http://www.gnu.org/software/make/manual/make.html |
8 # | 8 # |
9 | 9 |
10 ifdef ASAN | 10 ifdef ASAN |
11 CLANG = 1 | 11 CLANG = 1 |
12 endif | 12 endif |
13 | 13 |
14 ifdef TSAN | 14 ifdef TSAN |
15 CLANG = 1 | 15 CLANG = 1 |
16 endif | 16 endif |
17 | 17 |
| 18 ifdef MSAN |
| 19 CLANG = 1 |
| 20 endif |
| 21 |
18 # | 22 # |
19 # Macros for TOOLS | 23 # Macros for TOOLS |
20 # | 24 # |
21 # We use the C++ compiler for everything and then use the -Wl,-as-needed flag | 25 # We use the C++ compiler for everything and then use the -Wl,-as-needed flag |
22 # in the linker to drop libc++ unless it's actually needed. | 26 # in the linker to drop libc++ unless it's actually needed. |
23 # | 27 # |
24 ifdef CLANG | 28 ifdef CLANG |
25 CC = clang | 29 CC = clang |
26 CXX = clang++ | 30 CXX = clang++ |
27 endif | 31 endif |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 ifdef ASAN | 66 ifdef ASAN |
63 HOST_CFLAGS += -fsanitize=address | 67 HOST_CFLAGS += -fsanitize=address |
64 HOST_LDFLAGS += -pie -fsanitize=address | 68 HOST_LDFLAGS += -pie -fsanitize=address |
65 endif | 69 endif |
66 | 70 |
67 ifdef TSAN | 71 ifdef TSAN |
68 HOST_CFLAGS += -fsanitize=thread | 72 HOST_CFLAGS += -fsanitize=thread |
69 HOST_LDFLAGS += -pie -fsanitize=thread | 73 HOST_LDFLAGS += -pie -fsanitize=thread |
70 endif | 74 endif |
71 | 75 |
| 76 ifdef MSAN |
| 77 HOST_CFLAGS += -fsanitize=memory |
| 78 HOST_LDFLAGS += -pie -fsanitize=memory |
| 79 endif |
| 80 |
72 # | 81 # |
73 # Individual Macros | 82 # Individual Macros |
74 # | 83 # |
75 # $1 = Source name | 84 # $1 = Source name |
76 # $2 = Compile flags | 85 # $2 = Compile flags |
77 # | 86 # |
78 define C_COMPILER_RULE | 87 define C_COMPILER_RULE |
79 -include $(call SRC_TO_DEP,$(1)) | 88 -include $(call SRC_TO_DEP,$(1)) |
80 $(call SRC_TO_OBJ,$(1)): $(1) $(TOP_MAKE) | $(dir $(call SRC_TO_OBJ,$(1)))dir.st
amp | 89 $(call SRC_TO_OBJ,$(1)): $(1) $(TOP_MAKE) | $(dir $(call SRC_TO_OBJ,$(1)))dir.st
amp |
81 $(call LOG,CC ,$$@,$(CC) -o $$@ -c $$< $(POSIX_CFLAGS) $(HOST_CFLAGS) $
(CFLAGS) $(2)) | 90 $(call LOG,CC ,$$@,$(CC) -o $$@ -c $$< $(POSIX_CFLAGS) $(HOST_CFLAGS) $
(CFLAGS) $(2)) |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 endef | 200 endef |
192 | 201 |
193 | 202 |
194 # | 203 # |
195 # Run standalone builds (command line builds outside of chrome) | 204 # Run standalone builds (command line builds outside of chrome) |
196 # | 205 # |
197 ifdef STANDALONE | 206 ifdef STANDALONE |
198 run: all | 207 run: all |
199 $(RUN_UNDER) $(OUTDIR)/$(TARGET)$(HOST_EXT) $(EXE_ARGS) | 208 $(RUN_UNDER) $(OUTDIR)/$(TARGET)$(HOST_EXT) $(EXE_ARGS) |
200 endif | 209 endif |
OLD | NEW |