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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 'VCCLCompilerTool': { | 199 'VCCLCompilerTool': { |
195 'WarnAsError': 'false', | 200 'WarnAsError': 'false', |
196 }, | 201 }, |
197 }, | 202 }, |
198 }], | 203 }], |
199 ], | 204 ], |
200 }], | 205 }], |
201 ], | 206 ], |
202 }, | 207 }, |
203 'conditions': [ | 208 'conditions': [ |
204 ['asan==1', { | 209 ['asan==1 or msan==1 or tsan==1', { |
205 'target_defaults': { | 210 'target_defaults': { |
206 'cflags_cc+': [ | 211 'cflags_cc+': [ |
207 '-fno-omit-frame-pointer', | 212 '-fno-omit-frame-pointer', |
208 '-gline-tables-only', | 213 '-gline-tables-only', |
209 '-fsanitize=address', | |
210 '-w', # http://crbug.com/162783 | |
211 ], | 214 ], |
212 'cflags_cc!': [ | 215 'cflags_cc!': [ |
213 '-fomit-frame-pointer', | 216 '-fomit-frame-pointer', |
214 ], | 217 ], |
215 'ldflags': [ | 218 'ldflags': [ |
219 # Functions interposed by the sanitizers can make ld think | |
220 # that some libraries aren't needed when they actually are, | |
221 # http://crbug.com/234010. As workaround, disable --as-needed. | |
222 '-Wl,--as-needed', | |
earthdok
2014/12/19 15:54:02
this should be in "ldflags!", not "ldflags"
| |
223 ], | |
224 'dependencies': [ | |
225 # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of | |
226 # stdlibc++ as standard library. This is intended to use for instrumen ted | |
227 # builds. | |
228 '<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy', | |
229 ], | |
230 }, | |
231 }], | |
232 ['asan==1', { | |
233 'target_defaults': { | |
234 'cflags_cc+': [ | |
235 '-fsanitize=address', | |
236 ], | |
237 'ldflags': [ | |
216 '-fsanitize=address', | 238 '-fsanitize=address', |
217 ], | 239 ], |
218 }, | 240 }, |
219 }], | 241 }], |
242 ['msan==1', { | |
243 'target_defaults': { | |
244 'cflags_cc+': [ | |
245 '-fsanitize=memory', | |
246 '-fsanitize-memory-track-origins=<(msan_track_origins)', | |
247 ], | |
248 'ldflags': [ | |
249 '-fsanitize=memory', | |
250 ], | |
251 'defines': [ | |
252 'MEMORY_SANITIZER', | |
253 ], | |
254 }, | |
255 }], | |
220 ['tsan==1', { | 256 ['tsan==1', { |
221 'target_defaults': { | 257 'target_defaults': { |
222 'cflags+': [ | 258 'cflags+': [ |
223 '-fno-omit-frame-pointer', | |
224 '-gline-tables-only', | |
225 '-fsanitize=thread', | 259 '-fsanitize=thread', |
226 '-fPIC', | 260 '-fPIC', |
227 '-Wno-c++11-extensions', | 261 '-Wno-c++11-extensions', |
228 ], | 262 ], |
229 'cflags!': [ | |
230 '-fomit-frame-pointer', | |
231 ], | |
232 'ldflags': [ | 263 'ldflags': [ |
233 '-fsanitize=thread', | 264 '-fsanitize=thread', |
234 '-pie', | 265 '-pie', |
235 ], | 266 ], |
236 'defines': [ | 267 'defines': [ |
237 'THREAD_SANITIZER', | 268 'THREAD_SANITIZER', |
238 ], | 269 ], |
239 }, | 270 }, |
240 }], | 271 }], |
241 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ | 272 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
451 ], | 482 ], |
452 }], | 483 }], |
453 ['clang==1 and OS=="win"', { | 484 ['clang==1 and OS=="win"', { |
454 'make_global_settings': [ | 485 'make_global_settings': [ |
455 # On Windows, gyp's ninja generator only looks at CC. | 486 # On Windows, gyp's ninja generator only looks at CC. |
456 ['CC', '<(make_clang_dir)/bin/clang-cl'], | 487 ['CC', '<(make_clang_dir)/bin/clang-cl'], |
457 ], | 488 ], |
458 }], | 489 }], |
459 ], | 490 ], |
460 } | 491 } |
OLD | NEW |