OLD | NEW |
---|---|
1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 18 matching lines...) Expand all Loading... | |
29 | 29 |
30 { | 30 { |
31 # We need to include toolchain.gypi here for third-party sources that don't | 31 # We need to include toolchain.gypi here for third-party sources that don't |
32 # directly include it themselves. | 32 # directly include it themselves. |
33 'includes': ['toolchain.gypi'], | 33 'includes': ['toolchain.gypi'], |
34 'variables': { | 34 'variables': { |
35 'component%': 'static_library', | 35 'component%': 'static_library', |
36 'make_clang_dir%': '../third_party/llvm-build/Release+Asserts', | 36 'make_clang_dir%': '../third_party/llvm-build/Release+Asserts', |
37 'clang_xcode%': 0, | 37 'clang_xcode%': 0, |
38 'asan%': 0, | 38 'asan%': 0, |
39 'msan%': 0, | |
40 # Track where uninitialized memory originates from. From fastest to | |
41 # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2 | |
42 # - track the chain of stores leading from allocation site to use site. | |
43 'msan_track_origins%': 1, | |
39 'tsan%': 0, | 44 'tsan%': 0, |
40 'visibility%': 'hidden', | 45 'visibility%': 'hidden', |
41 'v8_enable_backtrace%': 0, | 46 'v8_enable_backtrace%': 0, |
42 'v8_enable_i18n_support%': 1, | 47 'v8_enable_i18n_support%': 1, |
43 'v8_deprecation_warnings': 1, | 48 'v8_deprecation_warnings': 1, |
44 'msvs_multi_core_compile%': '1', | 49 'msvs_multi_core_compile%': '1', |
45 'mac_deployment_target%': '10.5', | 50 'mac_deployment_target%': '10.5', |
46 'variables': { | 51 'variables': { |
47 'variables': { | 52 'variables': { |
48 'variables': { | 53 'variables': { |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 'VCCLCompilerTool': { | 197 'VCCLCompilerTool': { |
193 'WarnAsError': 'false', | 198 'WarnAsError': 'false', |
194 }, | 199 }, |
195 }, | 200 }, |
196 }], | 201 }], |
197 ], | 202 ], |
198 }], | 203 }], |
199 ], | 204 ], |
200 }, | 205 }, |
201 'conditions': [ | 206 'conditions': [ |
202 ['asan==1 and OS!="mac"', { | 207 ['(asan==1 or msan==1 or tsan==1) and OS!="mac"', { |
203 'target_defaults': { | 208 'target_defaults': { |
204 'cflags_cc+': [ | 209 'cflags_cc+': [ |
205 '-fno-omit-frame-pointer', | 210 '-fno-omit-frame-pointer', |
206 '-gline-tables-only', | 211 '-gline-tables-only', |
207 '-fsanitize=address', | |
208 '-w', # http://crbug.com/162783 | |
209 ], | 212 ], |
210 'cflags!': [ | 213 'cflags!': [ |
211 '-fomit-frame-pointer', | 214 '-fomit-frame-pointer', |
212 ], | 215 ], |
216 'ldflags!': [ | |
217 # Functions interposed by the sanitizers can make ld think | |
218 # that some libraries aren't needed when they actually are, | |
219 # http://crbug.com/234010. As workaround, disable --as-needed. | |
220 '-Wl,--as-needed', | |
221 ], | |
222 'dependencies': [ | |
223 # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of | |
224 # stdlibc++ as standard library. This is intended to use for instrumen ted | |
225 # builds. | |
226 '<(DEPTH)/buildtools/third_party/libc++/libc++.gyp:libcxx_proxy', | |
227 ], | |
228 }, | |
229 }], | |
230 ['asan==1 and OS!="mac"', { | |
231 'target_defaults': { | |
232 'cflags_cc+': [ | |
233 '-fsanitize=address', | |
234 ], | |
213 'ldflags': [ | 235 'ldflags': [ |
214 '-fsanitize=address', | 236 '-fsanitize=address', |
215 ], | 237 ], |
216 }, | 238 }, |
217 }], | 239 }], |
240 ['msan==1 and OS!="mac"', { | |
241 'target_defaults': { | |
242 'cflags_cc+': [ | |
243 '-fsanitize=memory', | |
244 '-fsanitize-memory-track-origins=<(msan_track_origins)', | |
245 ], | |
246 'ldflags': [ | |
247 '-fsanitize=memory', | |
248 ], | |
249 'defines': [ | |
250 'MEMORY_SANITIZER', | |
251 ], | |
252 }, | |
253 }], | |
218 ['tsan==1 and OS!="mac"', { | 254 ['tsan==1 and OS!="mac"', { |
219 'target_defaults': { | 255 'target_defaults': { |
220 'cflags+': [ | 256 'cflags+': [ |
221 '-fno-omit-frame-pointer', | |
jochen (gone - plz use gerrit)
2015/01/12 14:23:32
why these changes?
| |
222 '-gline-tables-only', | |
223 '-fsanitize=thread', | 257 '-fsanitize=thread', |
224 '-fPIC', | 258 '-fPIC', |
225 '-Wno-c++11-extensions', | 259 '-Wno-c++11-extensions', |
226 ], | 260 ], |
227 'cflags!': [ | |
228 '-fomit-frame-pointer', | |
229 ], | |
230 'ldflags': [ | 261 'ldflags': [ |
231 '-fsanitize=thread', | 262 '-fsanitize=thread', |
232 '-pie', | 263 '-pie', |
233 ], | 264 ], |
234 'defines': [ | 265 'defines': [ |
235 'THREAD_SANITIZER', | 266 'THREAD_SANITIZER', |
236 ], | 267 ], |
237 }, | 268 }, |
238 }], | 269 }], |
239 ['asan==1 and OS=="mac"', { | 270 ['asan==1 and OS=="mac"', { |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
472 ], | 503 ], |
473 }], | 504 }], |
474 ['clang==1 and OS=="win"', { | 505 ['clang==1 and OS=="win"', { |
475 'make_global_settings': [ | 506 'make_global_settings': [ |
476 # On Windows, gyp's ninja generator only looks at CC. | 507 # On Windows, gyp's ninja generator only looks at CC. |
477 ['CC', '<(make_clang_dir)/bin/clang-cl'], | 508 ['CC', '<(make_clang_dir)/bin/clang-cl'], |
478 ], | 509 ], |
479 }], | 510 }], |
480 ], | 511 ], |
481 } | 512 } |
OLD | NEW |