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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 'VCCLCompilerTool': { | 281 'VCCLCompilerTool': { |
282 'WarnAsError': 'false', | 282 'WarnAsError': 'false', |
283 }, | 283 }, |
284 }, | 284 }, |
285 }], | 285 }], |
286 ], | 286 ], |
287 }], | 287 }], |
288 ], | 288 ], |
289 }, | 289 }, |
290 'conditions': [ | 290 'conditions': [ |
291 ['asan==1 and OS!="mac"', { | 291 ['os_posix==1 and OS!="mac"', { |
292 'target_defaults': { | 292 'target_defaults': { |
293 'cflags_cc+': [ | 293 'conditions': [ |
294 '-fno-omit-frame-pointer', | 294 # Common options for AddressSanitizer, LeakSanitizer, |
295 '-gline-tables-only', | 295 # ThreadSanitizer and MemorySanitizer. |
296 '-fsanitize=address', | 296 ['asan==1 or lsan==1 or tsan==1 or msan==1', { |
297 '-w', # http://crbug.com/162783 | 297 'target_conditions': [ |
298 ], | 298 ['_toolset=="target"', { |
299 'cflags!': [ | 299 'cflags': [ |
300 '-fomit-frame-pointer', | 300 '-fno-omit-frame-pointer', |
301 ], | 301 '-gline-tables-only', |
302 'ldflags': [ | 302 ], |
303 '-fsanitize=address', | 303 'cflags!': [ |
| 304 '-fomit-frame-pointer', |
| 305 ], |
| 306 }], |
| 307 ], |
| 308 }], |
| 309 ['asan==1', { |
| 310 'target_conditions': [ |
| 311 ['_toolset=="target"', { |
| 312 'cflags': [ |
| 313 '-fsanitize=address', |
| 314 ], |
| 315 'ldflags': [ |
| 316 '-fsanitize=address', |
| 317 ], |
| 318 'defines': [ |
| 319 'ADDRESS_SANITIZER', |
| 320 ], |
| 321 }], |
| 322 ], |
| 323 }], |
| 324 # TODO(machenbach): Add sanitizer coverage. |
| 325 ['lsan==1', { |
| 326 'target_conditions': [ |
| 327 ['_toolset=="target"', { |
| 328 'cflags': [ |
| 329 '-fsanitize=leak', |
| 330 ], |
| 331 'ldflags': [ |
| 332 '-fsanitize=leak', |
| 333 ], |
| 334 'defines': [ |
| 335 'LEAK_SANITIZER', |
| 336 ], |
| 337 }], |
| 338 ], |
| 339 }], |
| 340 ['tsan==1', { |
| 341 'target_conditions': [ |
| 342 ['_toolset=="target"', { |
| 343 'cflags': [ |
| 344 '-fsanitize=thread', |
| 345 ], |
| 346 'ldflags': [ |
| 347 '-fsanitize=thread', |
| 348 ], |
| 349 'defines': [ |
| 350 'THREAD_SANITIZER', |
| 351 ], |
| 352 }], |
| 353 ], |
| 354 }], |
| 355 ['msan==1', { |
| 356 'target_conditions': [ |
| 357 ['_toolset=="target"', { |
| 358 'cflags': [ |
| 359 '-fsanitize=memory', |
| 360 '-fsanitize-memory-track-origins=<(msan_track_origins)', |
| 361 ], |
| 362 'ldflags': [ |
| 363 '-fsanitize=memory', |
| 364 ], |
| 365 'defines': [ |
| 366 'MEMORY_SANITIZER', |
| 367 ], |
| 368 }], |
| 369 ], |
| 370 # TODO(machenbach): Share this between all *san configs like in |
| 371 # common.gypi. |
| 372 'dependencies': [ |
| 373 # Use libc++ (buildtools/third_party/libc++ and |
| 374 # buildtools/third_party/libc++abi) instead of stdlibc++ as |
| 375 # standard library. This is intended to be used for for |
| 376 # instrumented builds. |
| 377 '<(DEPTH)/buildtools/third_party/libc++/libc++.gyp:libcxx_proxy', |
| 378 ], |
| 379 }], |
304 ], | 380 ], |
305 }, | 381 }, |
306 }], | 382 }], |
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"', { | 383 ['asan==1 and OS=="mac"', { |
358 'target_defaults': { | 384 'target_defaults': { |
359 'xcode_settings': { | 385 'xcode_settings': { |
360 'OTHER_CFLAGS+': [ | 386 'OTHER_CFLAGS+': [ |
361 '-fno-omit-frame-pointer', | 387 '-fno-omit-frame-pointer', |
362 '-gline-tables-only', | 388 '-gline-tables-only', |
363 '-fsanitize=address', | 389 '-fsanitize=address', |
364 '-w', # http://crbug.com/162783 | 390 '-w', # http://crbug.com/162783 |
365 ], | 391 ], |
366 'OTHER_CFLAGS!': [ | 392 'OTHER_CFLAGS!': [ |
367 '-fomit-frame-pointer', | 393 '-fomit-frame-pointer', |
368 ], | 394 ], |
| 395 'defines': [ |
| 396 'ADDRESS_SANITIZER', |
| 397 ], |
369 }, | 398 }, |
370 'target_conditions': [ | 399 'target_conditions': [ |
371 ['_type!="static_library"', { | 400 ['_type!="static_library"', { |
372 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']}, | 401 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']}, |
373 }], | 402 }], |
374 ], | 403 ], |
375 'dependencies': [ | 404 'dependencies': [ |
376 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime', | 405 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime', |
377 ], | 406 ], |
378 }, | 407 }, |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { | 675 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
647 'make_global_settings': [ | 676 'make_global_settings': [ |
648 ['CC_wrapper', '<(gomadir)/gomacc'], | 677 ['CC_wrapper', '<(gomadir)/gomacc'], |
649 ['CXX_wrapper', '<(gomadir)/gomacc'], | 678 ['CXX_wrapper', '<(gomadir)/gomacc'], |
650 ['CC.host_wrapper', '<(gomadir)/gomacc'], | 679 ['CC.host_wrapper', '<(gomadir)/gomacc'], |
651 ['CXX.host_wrapper', '<(gomadir)/gomacc'], | 680 ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
652 ], | 681 ], |
653 }], | 682 }], |
654 ], | 683 ], |
655 } | 684 } |
OLD | NEW |