| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 'host_arch%': '<(host_arch)', | 69 'host_arch%': '<(host_arch)', |
| 70 'target_arch%': '<(host_arch)', | 70 'target_arch%': '<(host_arch)', |
| 71 }, | 71 }, |
| 72 'host_arch%': '<(host_arch)', | 72 'host_arch%': '<(host_arch)', |
| 73 'target_arch%': '<(target_arch)', | 73 'target_arch%': '<(target_arch)', |
| 74 'v8_target_arch%': '<(target_arch)', | 74 'v8_target_arch%': '<(target_arch)', |
| 75 'asan%': 0, | 75 'asan%': 0, |
| 76 'lsan%': 0, | 76 'lsan%': 0, |
| 77 'msan%': 0, | 77 'msan%': 0, |
| 78 'tsan%': 0, | 78 'tsan%': 0, |
| 79 # Enable coverage gathering instrumentation in sanitizer tools. This flag |
| 80 # also controls coverage granularity (1 for function-level, 2 for |
| 81 # block-level, 3 for edge-level). |
| 82 'sanitizer_coverage%': 0, |
| 79 | 83 |
| 80 # goma settings. | 84 # goma settings. |
| 81 # 1 to use goma. | 85 # 1 to use goma. |
| 82 # If no gomadir is set, it uses the default gomadir. | 86 # If no gomadir is set, it uses the default gomadir. |
| 83 'use_goma%': 0, | 87 'use_goma%': 0, |
| 84 'gomadir%': '', | 88 'gomadir%': '', |
| 85 'conditions': [ | 89 'conditions': [ |
| 86 # Set default gomadir. | 90 # Set default gomadir. |
| 87 ['OS=="win"', { | 91 ['OS=="win"', { |
| 88 'gomadir': 'c:\\goma\\goma-win', | 92 'gomadir': 'c:\\goma\\goma-win', |
| 89 }, { | 93 }, { |
| 90 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', | 94 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', |
| 91 }], | 95 }], |
| 92 ], | 96 ], |
| 93 }, | 97 }, |
| 94 'host_arch%': '<(host_arch)', | 98 'host_arch%': '<(host_arch)', |
| 95 'target_arch%': '<(target_arch)', | 99 'target_arch%': '<(target_arch)', |
| 96 'v8_target_arch%': '<(v8_target_arch)', | 100 'v8_target_arch%': '<(v8_target_arch)', |
| 97 'werror%': '-Werror', | 101 'werror%': '-Werror', |
| 98 'use_goma%': '<(use_goma)', | 102 'use_goma%': '<(use_goma)', |
| 99 'gomadir%': '<(gomadir)', | 103 'gomadir%': '<(gomadir)', |
| 100 'asan%': '<(asan)', | 104 'asan%': '<(asan)', |
| 101 'lsan%': '<(lsan)', | 105 'lsan%': '<(lsan)', |
| 102 'msan%': '<(msan)', | 106 'msan%': '<(msan)', |
| 103 'tsan%': '<(tsan)', | 107 'tsan%': '<(tsan)', |
| 108 'sanitizer_coverage%': '<(sanitizer_coverage)', |
| 104 | 109 |
| 105 # Add a simple extra solely for the purpose of the cctests | 110 # Add a simple extra solely for the purpose of the cctests |
| 106 'v8_extra_library_files': ['../test/cctest/test-extra.js'], | 111 'v8_extra_library_files': ['../test/cctest/test-extra.js'], |
| 107 | 112 |
| 108 # .gyp files or targets should set v8_code to 1 if they build V8 specific | 113 # .gyp files or targets should set v8_code to 1 if they build V8 specific |
| 109 # code, as opposed to external code. This variable is used to control such | 114 # code, as opposed to external code. This variable is used to control such |
| 110 # things as the set of warnings to enable, and whether warnings are treated | 115 # things as the set of warnings to enable, and whether warnings are treated |
| 111 # as errors. | 116 # as errors. |
| 112 'v8_code%': 0, | 117 'v8_code%': 0, |
| 113 | 118 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 ], | 319 ], |
| 315 'ldflags': [ | 320 'ldflags': [ |
| 316 '-fsanitize=address', | 321 '-fsanitize=address', |
| 317 ], | 322 ], |
| 318 'defines': [ | 323 'defines': [ |
| 319 'ADDRESS_SANITIZER', | 324 'ADDRESS_SANITIZER', |
| 320 ], | 325 ], |
| 321 }], | 326 }], |
| 322 ], | 327 ], |
| 323 }], | 328 }], |
| 324 # TODO(machenbach): Add sanitizer coverage. | |
| 325 ['lsan==1', { | 329 ['lsan==1', { |
| 326 'target_conditions': [ | 330 'target_conditions': [ |
| 327 ['_toolset=="target"', { | 331 ['_toolset=="target"', { |
| 328 'cflags': [ | 332 'cflags': [ |
| 329 '-fsanitize=leak', | 333 '-fsanitize=leak', |
| 330 ], | 334 ], |
| 331 'ldflags': [ | 335 'ldflags': [ |
| 332 '-fsanitize=leak', | 336 '-fsanitize=leak', |
| 333 ], | 337 ], |
| 334 'defines': [ | 338 'defines': [ |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 # TODO(machenbach): Share this between all *san configs like in | 374 # TODO(machenbach): Share this between all *san configs like in |
| 371 # common.gypi. | 375 # common.gypi. |
| 372 'dependencies': [ | 376 'dependencies': [ |
| 373 # Use libc++ (buildtools/third_party/libc++ and | 377 # Use libc++ (buildtools/third_party/libc++ and |
| 374 # buildtools/third_party/libc++abi) instead of stdlibc++ as | 378 # buildtools/third_party/libc++abi) instead of stdlibc++ as |
| 375 # standard library. This is intended to be used for for | 379 # standard library. This is intended to be used for for |
| 376 # instrumented builds. | 380 # instrumented builds. |
| 377 '<(DEPTH)/buildtools/third_party/libc++/libc++.gyp:libcxx_proxy', | 381 '<(DEPTH)/buildtools/third_party/libc++/libc++.gyp:libcxx_proxy', |
| 378 ], | 382 ], |
| 379 }], | 383 }], |
| 384 ['sanitizer_coverage!=0', { |
| 385 'target_conditions': [ |
| 386 ['_toolset=="target"', { |
| 387 'cflags': [ |
| 388 '-fsanitize-coverage=<(sanitizer_coverage)', |
| 389 ], |
| 390 'defines': [ |
| 391 'SANITIZER_COVERAGE', |
| 392 ], |
| 393 }], |
| 394 ], |
| 395 }], |
| 380 ], | 396 ], |
| 381 }, | 397 }, |
| 382 }], | 398 }], |
| 383 ['asan==1 and OS=="mac"', { | 399 ['OS=="mac"', { |
| 384 'target_defaults': { | 400 'target_defaults': { |
| 385 'xcode_settings': { | 401 'conditions': [ |
| 386 'OTHER_CFLAGS+': [ | 402 ['asan==1', { |
| 387 '-fno-omit-frame-pointer', | 403 'xcode_settings': { |
| 388 '-gline-tables-only', | 404 # FIXME(machenbach): This is outdated compared to common.gypi. |
| 389 '-fsanitize=address', | 405 'OTHER_CFLAGS+': [ |
| 390 '-w', # http://crbug.com/162783 | 406 '-fno-omit-frame-pointer', |
| 391 ], | 407 '-gline-tables-only', |
| 392 'OTHER_CFLAGS!': [ | 408 '-fsanitize=address', |
| 393 '-fomit-frame-pointer', | 409 '-w', # http://crbug.com/162783 |
| 394 ], | 410 ], |
| 395 'defines': [ | 411 'OTHER_CFLAGS!': [ |
| 396 'ADDRESS_SANITIZER', | 412 '-fomit-frame-pointer', |
| 397 ], | 413 ], |
| 398 }, | 414 'defines': [ |
| 399 'target_conditions': [ | 415 'ADDRESS_SANITIZER', |
| 400 ['_type!="static_library"', { | 416 ], |
| 401 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']}, | 417 }, |
| 418 'dependencies': [ |
| 419 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime', |
| 420 ], |
| 421 'target_conditions': [ |
| 422 ['_type!="static_library"', { |
| 423 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']}, |
| 424 }], |
| 425 ], |
| 426 }], |
| 427 ['sanitizer_coverage!=0', { |
| 428 'target_conditions': [ |
| 429 ['_toolset=="target"', { |
| 430 'cflags': [ |
| 431 '-fsanitize-coverage=<(sanitizer_coverage)', |
| 432 ], |
| 433 'defines': [ |
| 434 'SANITIZER_COVERAGE', |
| 435 ], |
| 436 }], |
| 437 ], |
| 402 }], | 438 }], |
| 403 ], | 439 ], |
| 404 'dependencies': [ | 440 }, # target_defaults |
| 405 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime', | 441 }], # OS=="mac" |
| 406 ], | |
| 407 }, | |
| 408 }], | |
| 409 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ | 442 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ |
| 410 or OS=="netbsd" or OS=="aix"', { | 443 or OS=="netbsd" or OS=="aix"', { |
| 411 'target_defaults': { | 444 'target_defaults': { |
| 412 'cflags': [ | 445 'cflags': [ |
| 413 '-Wall', | 446 '-Wall', |
| 414 '<(werror)', | 447 '<(werror)', |
| 415 '-Wno-unused-parameter', | 448 '-Wno-unused-parameter', |
| 416 '-Wno-long-long', | 449 '-Wno-long-long', |
| 417 '-pthread', | 450 '-pthread', |
| 418 '-pedantic', | 451 '-pedantic', |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { | 708 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
| 676 'make_global_settings': [ | 709 'make_global_settings': [ |
| 677 ['CC_wrapper', '<(gomadir)/gomacc'], | 710 ['CC_wrapper', '<(gomadir)/gomacc'], |
| 678 ['CXX_wrapper', '<(gomadir)/gomacc'], | 711 ['CXX_wrapper', '<(gomadir)/gomacc'], |
| 679 ['CC.host_wrapper', '<(gomadir)/gomacc'], | 712 ['CC.host_wrapper', '<(gomadir)/gomacc'], |
| 680 ['CXX.host_wrapper', '<(gomadir)/gomacc'], | 713 ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
| 681 ], | 714 ], |
| 682 }], | 715 }], |
| 683 ], | 716 ], |
| 684 } | 717 } |
| OLD | NEW |