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!="mac"', { |
earthdok
2015/05/22 19:57:25
Following common.gypi, you should probably change
Michael Achenbach
2015/05/26 08:26:35
Done. But I'm not convinced that our posix variabl
earthdok
2015/05/26 13:36:54
Try flipping the values this variable receives. My
Michael Achenbach
2015/05/26 14:20:29
Indeed.
| |
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 'ldflags!': [ | |
307 # Functions interposed by the sanitizers can make ld think | |
308 # that some libraries aren't needed when they actually are, | |
309 # http://crbug.com/234010. As workaround, disable --as-needed. | |
310 '-Wl,--as-needed', | |
earthdok
2015/05/22 19:57:25
Do not add this unless the problem manifests in st
Michael Achenbach
2015/05/26 08:26:35
Done.
| |
311 ], | |
312 }], | |
earthdok
2015/05/22 19:57:25
Need to define the ADDRESS_SANITIZER symbol here,
Michael Achenbach
2015/05/26 08:26:35
Done. See above. Btw: codesearch links get outdate
earthdok
2015/05/26 13:36:54
It's not referenced in V8 code, so no. It would no
Michael Achenbach
2015/05/26 14:20:29
I'd add it as soon as someone wants to reference i
| |
313 ], | |
314 }], | |
315 ['asan==1', { | |
316 'target_conditions': [ | |
317 ['_toolset=="target"', { | |
318 'cflags': [ | |
319 '-fsanitize=address', | |
320 # TODO(earthdok): Re-enable. http://crbug.com/427202 | |
earthdok
2015/05/22 19:57:25
The referenced issue does not affect standalone V8
Michael Achenbach
2015/05/26 08:26:35
Removing these TODOs for now.
| |
321 #'-fsanitize-blacklist=<(asan_blacklist)', | |
322 ], | |
323 'ldflags': [ | |
324 '-fsanitize=address', | |
325 ], | |
326 }], | |
327 ], | |
328 }], | |
329 # TODO(machenbach): Add sanitizer coverage. | |
330 ['lsan==1', { | |
331 'target_conditions': [ | |
332 ['_toolset=="target"', { | |
333 'cflags': [ | |
334 '-fsanitize=leak', | |
335 ], | |
336 'ldflags': [ | |
337 '-fsanitize=leak', | |
338 ], | |
339 }], | |
earthdok
2015/05/22 19:57:25
define LEAK_SANITIZER?
Michael Achenbach
2015/05/26 08:26:35
Done.
| |
340 ], | |
341 }], | |
342 ['tsan==1', { | |
343 'target_conditions': [ | |
344 ['_toolset=="target"', { | |
345 'cflags': [ | |
346 '-fsanitize=thread', | |
347 # TODO(machenbach): Implement this for v8. | |
348 # '-fsanitize-blacklist=<(tsan_blacklist)', | |
349 ], | |
350 'ldflags': [ | |
351 '-fsanitize=thread', | |
352 ], | |
353 'defines': [ | |
354 'THREAD_SANITIZER', | |
355 ], | |
356 }], | |
357 ], | |
358 }], | |
359 ['msan==1', { | |
360 'target_conditions': [ | |
361 ['_toolset=="target"', { | |
362 'cflags': [ | |
363 '-fsanitize=memory', | |
364 '-fsanitize-memory-track-origins=<(msan_track_origins)', | |
365 # TODO(machenbach): Implement this for v8. | |
366 # '-fsanitize-blacklist=<(msan_blacklist)', | |
367 ], | |
368 'ldflags': [ | |
369 '-fsanitize=memory', | |
370 ], | |
371 'defines': [ | |
372 'MEMORY_SANITIZER', | |
373 ], | |
374 }], | |
375 ], | |
376 # Share this between all *san configs with like in common.gypi. | |
377 'dependencies': [ | |
378 # Use libc++ (third_party/libc++ and third_party/libc++abi) instea d of | |
earthdok
2015/05/22 19:57:25
Those pathnames are no longer correct after the mo
Michael Achenbach
2015/05/26 08:26:35
Done.
| |
379 # stdlibc++ as standard library. This is intended to use for instr umented | |
earthdok
2015/05/22 19:57:25
Please fix: "intended to be used for".
Michael Achenbach
2015/05/26 08:26:35
Done.
| |
380 # builds. | |
381 '<(DEPTH)/buildtools/third_party/libc++/libc++.gyp:libcxx_proxy', | |
382 ], | |
383 }], | |
304 ], | 384 ], |
305 }, | 385 }, |
306 }], | 386 }], |
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"', { | 387 ['asan==1 and OS=="mac"', { |
358 'target_defaults': { | 388 'target_defaults': { |
359 'xcode_settings': { | 389 'xcode_settings': { |
360 'OTHER_CFLAGS+': [ | 390 'OTHER_CFLAGS+': [ |
361 '-fno-omit-frame-pointer', | 391 '-fno-omit-frame-pointer', |
362 '-gline-tables-only', | 392 '-gline-tables-only', |
363 '-fsanitize=address', | 393 '-fsanitize=address', |
364 '-w', # http://crbug.com/162783 | 394 '-w', # http://crbug.com/162783 |
365 ], | 395 ], |
366 'OTHER_CFLAGS!': [ | 396 '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)', { | 676 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
647 'make_global_settings': [ | 677 'make_global_settings': [ |
648 ['CC_wrapper', '<(gomadir)/gomacc'], | 678 ['CC_wrapper', '<(gomadir)/gomacc'], |
649 ['CXX_wrapper', '<(gomadir)/gomacc'], | 679 ['CXX_wrapper', '<(gomadir)/gomacc'], |
650 ['CC.host_wrapper', '<(gomadir)/gomacc'], | 680 ['CC.host_wrapper', '<(gomadir)/gomacc'], |
651 ['CXX.host_wrapper', '<(gomadir)/gomacc'], | 681 ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
652 ], | 682 ], |
653 }], | 683 }], |
654 ], | 684 ], |
655 } | 685 } |
OLD | NEW |