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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 # This is here so that all files get recompiled after a clang roll and | 226 # This is here so that all files get recompiled after a clang roll and |
227 # when turning clang on or off. | 227 # when turning clang on or off. |
228 # (defines are passed via the command line, and build systems rebuild | 228 # (defines are passed via the command line, and build systems rebuild |
229 # things when their commandline changes). Nothing should ever read this | 229 # things when their commandline changes). Nothing should ever read this |
230 # define. | 230 # define. |
231 'defines': ['CR_CLANG_REVISION=<!(<(DEPTH)/tools/clang/scripts/update.sh --print-revision)'], | 231 'defines': ['CR_CLANG_REVISION=<!(<(DEPTH)/tools/clang/scripts/update.sh --print-revision)'], |
232 'cflags+': [ | 232 'cflags+': [ |
233 '-Wno-format-pedantic', | 233 '-Wno-format-pedantic', |
234 ], | 234 ], |
235 }], | 235 }], |
236 ['asan==1', { | |
237 'defines': [ | |
238 'ADDRESS_SANITIZER', | |
earthdok
2015/05/26 13:36:54
Could you put this in each platform-specific ASan
Michael Achenbach
2015/05/26 14:20:29
Done.
| |
239 ], | |
240 }], | |
236 ], | 241 ], |
237 'target_conditions': [ | 242 'target_conditions': [ |
238 ['v8_code == 0', { | 243 ['v8_code == 0', { |
239 'defines!': [ | 244 'defines!': [ |
240 'DEBUG', | 245 'DEBUG', |
241 ], | 246 ], |
242 'conditions': [ | 247 'conditions': [ |
243 ['os_posix == 1 and OS != "mac"', { | 248 ['os_posix == 1 and OS != "mac"', { |
244 # We don't want to get warnings from third-party code, | 249 # We don't want to get warnings from third-party code, |
245 # so remove any existing warning-enabling flags like -Wall. | 250 # so remove any existing warning-enabling flags like -Wall. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
281 'VCCLCompilerTool': { | 286 'VCCLCompilerTool': { |
282 'WarnAsError': 'false', | 287 'WarnAsError': 'false', |
283 }, | 288 }, |
284 }, | 289 }, |
285 }], | 290 }], |
286 ], | 291 ], |
287 }], | 292 }], |
288 ], | 293 ], |
289 }, | 294 }, |
290 'conditions': [ | 295 'conditions': [ |
291 ['asan==1 and OS!="mac"', { | 296 ['os_posix==1 and OS!="mac"', { |
292 'target_defaults': { | 297 'target_defaults': { |
293 'cflags_cc+': [ | 298 'conditions': [ |
294 '-fno-omit-frame-pointer', | 299 # Common options for AddressSanitizer, LeakSanitizer, |
295 '-gline-tables-only', | 300 # ThreadSanitizer and MemorySanitizer. |
296 '-fsanitize=address', | 301 ['asan==1 or lsan==1 or tsan==1 or msan==1', { |
297 '-w', # http://crbug.com/162783 | 302 'target_conditions': [ |
298 ], | 303 ['_toolset=="target"', { |
299 'cflags!': [ | 304 'cflags': [ |
300 '-fomit-frame-pointer', | 305 '-fno-omit-frame-pointer', |
301 ], | 306 '-gline-tables-only', |
302 'ldflags': [ | 307 ], |
303 '-fsanitize=address', | 308 'cflags!': [ |
309 '-fomit-frame-pointer', | |
310 ], | |
311 }], | |
312 ], | |
313 }], | |
314 ['asan==1', { | |
315 'target_conditions': [ | |
316 ['_toolset=="target"', { | |
317 'cflags': [ | |
318 '-fsanitize=address', | |
319 ], | |
320 'ldflags': [ | |
321 '-fsanitize=address', | |
322 ], | |
323 }], | |
324 ], | |
325 }], | |
326 # TODO(machenbach): Add sanitizer coverage. | |
327 ['lsan==1', { | |
328 'target_conditions': [ | |
329 ['_toolset=="target"', { | |
330 'cflags': [ | |
331 '-fsanitize=leak', | |
332 ], | |
333 'ldflags': [ | |
334 '-fsanitize=leak', | |
335 ], | |
336 'defines': [ | |
337 'LEAK_SANITIZER', | |
338 ], | |
339 }], | |
340 ], | |
341 }], | |
342 ['tsan==1', { | |
343 'target_conditions': [ | |
344 ['_toolset=="target"', { | |
345 'cflags': [ | |
346 '-fsanitize=thread', | |
347 ], | |
348 'ldflags': [ | |
349 '-fsanitize=thread', | |
350 ], | |
351 'defines': [ | |
352 'THREAD_SANITIZER', | |
353 ], | |
354 }], | |
355 ], | |
356 }], | |
357 ['msan==1', { | |
358 'target_conditions': [ | |
359 ['_toolset=="target"', { | |
360 'cflags': [ | |
361 '-fsanitize=memory', | |
362 '-fsanitize-memory-track-origins=<(msan_track_origins)', | |
363 ], | |
364 'ldflags': [ | |
365 '-fsanitize=memory', | |
366 ], | |
367 'defines': [ | |
368 'MEMORY_SANITIZER', | |
369 ], | |
370 }], | |
371 ], | |
372 # TODO(machenbach): Share this between all *san configs like in | |
373 # common.gypi. | |
374 'dependencies': [ | |
375 # Use libc++ (buildtools/third_party/libc++ and | |
376 # buildtools/third_party/libc++abi) instead of stdlibc++ as | |
377 # standard library. This is intended to be used for for | |
378 # instrumented builds. | |
379 '<(DEPTH)/buildtools/third_party/libc++/libc++.gyp:libcxx_proxy', | |
380 ], | |
381 }], | |
304 ], | 382 ], |
305 }, | 383 }, |
306 }], | 384 }], |
307 ['tsan==1 and OS!="mac"', { | |
308 'target_defaults': { | |
309 'cflags+': [ | |
310 '-fno-omit-frame-pointer', | |
311 '-gline-tables-only', | |
312 '-fsanitize=thread', | |
313 '-fPIC', | |
314 '-Wno-c++11-extensions', | |
315 ], | |
316 'cflags!': [ | |
317 '-fomit-frame-pointer', | |
318 ], | |
319 'ldflags': [ | |
320 '-fsanitize=thread', | |
321 '-pie', | |
322 ], | |
323 'defines': [ | |
324 'THREAD_SANITIZER', | |
325 ], | |
326 }, | |
327 }], | |
328 ['msan==1 and OS!="mac"', { | |
329 'target_defaults': { | |
330 'cflags_cc+': [ | |
331 '-fno-omit-frame-pointer', | |
332 '-gline-tables-only', | |
333 '-fsanitize=memory', | |
334 '-fsanitize-memory-track-origins=<(msan_track_origins)', | |
335 '-fPIC', | |
336 ], | |
337 'cflags+': [ | |
338 '-fPIC', | |
339 ], | |
340 'cflags!': [ | |
341 '-fomit-frame-pointer', | |
342 ], | |
343 'ldflags': [ | |
344 '-fsanitize=memory', | |
345 ], | |
346 'defines': [ | |
347 'MEMORY_SANITIZER', | |
348 ], | |
349 'dependencies': [ | |
350 # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of | |
351 # stdlibc++ as standard library. This is intended to use for instrumen ted | |
352 # builds. | |
353 '<(DEPTH)/buildtools/third_party/libc++/libc++.gyp:libcxx_proxy', | |
354 ], | |
355 }, | |
356 }], | |
357 ['asan==1 and OS=="mac"', { | 385 ['asan==1 and OS=="mac"', { |
358 'target_defaults': { | 386 'target_defaults': { |
359 'xcode_settings': { | 387 'xcode_settings': { |
360 'OTHER_CFLAGS+': [ | 388 'OTHER_CFLAGS+': [ |
361 '-fno-omit-frame-pointer', | 389 '-fno-omit-frame-pointer', |
362 '-gline-tables-only', | 390 '-gline-tables-only', |
363 '-fsanitize=address', | 391 '-fsanitize=address', |
364 '-w', # http://crbug.com/162783 | 392 '-w', # http://crbug.com/162783 |
365 ], | 393 ], |
366 'OTHER_CFLAGS!': [ | 394 'OTHER_CFLAGS!': [ |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
646 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { | 674 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
647 'make_global_settings': [ | 675 'make_global_settings': [ |
648 ['CC_wrapper', '<(gomadir)/gomacc'], | 676 ['CC_wrapper', '<(gomadir)/gomacc'], |
649 ['CXX_wrapper', '<(gomadir)/gomacc'], | 677 ['CXX_wrapper', '<(gomadir)/gomacc'], |
650 ['CC.host_wrapper', '<(gomadir)/gomacc'], | 678 ['CC.host_wrapper', '<(gomadir)/gomacc'], |
651 ['CXX.host_wrapper', '<(gomadir)/gomacc'], | 679 ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
652 ], | 680 ], |
653 }], | 681 }], |
654 ], | 682 ], |
655 } | 683 } |
OLD | NEW |