| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import pipes | 5 import pipes |
| 6 | 6 |
| 7 from recipe_engine.config import config_item_context, ConfigGroup | 7 from recipe_engine.config import config_item_context, ConfigGroup |
| 8 from recipe_engine.config import Dict, List, Single, Static, Set, BadConf | 8 from recipe_engine.config import Dict, List, Single, Static, Set, BadConf |
| 9 from recipe_engine.config_types import Path | 9 from recipe_engine.config_types import Path |
| 10 | 10 |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 dcheck(c, optional=True) | 510 dcheck(c, optional=True) |
| 511 | 511 |
| 512 @config_ctx() | 512 @config_ctx() |
| 513 def gn_component_build(c): | 513 def gn_component_build(c): |
| 514 c.gn_args.append('is_component_build=true') | 514 c.gn_args.append('is_component_build=true') |
| 515 | 515 |
| 516 @config_ctx() | 516 @config_ctx() |
| 517 def gn_minimal_symbols(c): | 517 def gn_minimal_symbols(c): |
| 518 c.gn_args.append('symbol_level=1') | 518 c.gn_args.append('symbol_level=1') |
| 519 | 519 |
| 520 @config_ctx() |
| 521 def clang_tot(c): |
| 522 c.env.LLVM_FORCE_HEAD_REVISION = 'YES' |
| 523 # Plugin flags often need to be changed when using a plugin newer than |
| 524 # the latest Clang package, so disable plugins. |
| 525 # TODO(pcc): Investigate whether this should be consistent between Windows and |
| 526 # non-Windows. |
| 527 if c.TARGET_PLATFORM != 'win': |
| 528 c.gyp_env.GYP_DEFINES['clang_use_chrome_plugins'] = 0 |
| 529 |
| 520 #### 'Full' configurations | 530 #### 'Full' configurations |
| 521 @config_ctx(includes=['ninja', 'default_compiler']) | 531 @config_ctx(includes=['ninja', 'default_compiler']) |
| 522 def chromium_no_goma(c): | 532 def chromium_no_goma(c): |
| 523 c.compile_py.default_targets = ['All', 'chromium_builder_tests'] | 533 c.compile_py.default_targets = ['All', 'chromium_builder_tests'] |
| 524 | 534 |
| 525 @config_ctx(includes=['ninja', 'default_compiler', 'goma']) | 535 @config_ctx(includes=['ninja', 'default_compiler', 'goma']) |
| 526 def chromium(c): | 536 def chromium(c): |
| 527 c.compile_py.default_targets = ['All', 'chromium_builder_tests'] | 537 c.compile_py.default_targets = ['All', 'chromium_builder_tests'] |
| 528 c.cros_sdk.external = True | 538 c.cros_sdk.external = True |
| 529 | 539 |
| 530 @config_ctx(includes=['ninja', 'clang']) # Intentionally no goma yet. | 540 @config_ctx(includes=['ninja', 'clang']) # Intentionally no goma yet. |
| 531 def chromium_win_clang(c): | 541 def chromium_win_clang(c): |
| 532 fastbuild(c, final=False) # final=False so win_clang_asan can override it. | 542 fastbuild(c, final=False) # final=False so win_clang_asan can override it. |
| 533 | 543 |
| 534 @config_ctx(includes=['chromium_win_clang']) | 544 @config_ctx(includes=['chromium_win_clang', 'clang_tot']) |
| 535 def chromium_win_clang_tot(c): | 545 def chromium_win_clang_tot(c): |
| 536 c.env.LLVM_FORCE_HEAD_REVISION = 'YES' | 546 pass |
| 537 | 547 |
| 538 @config_ctx(includes=['chromium_win_clang', 'official']) | 548 @config_ctx(includes=['chromium_win_clang', 'official']) |
| 539 def chromium_win_clang_official(c): | 549 def chromium_win_clang_official(c): |
| 540 pass | 550 pass |
| 541 | 551 |
| 542 @config_ctx(includes=['chromium_win_clang', 'official']) | 552 @config_ctx(includes=['chromium_win_clang', 'official', 'clang_tot']) |
| 543 def chromium_win_clang_official_tot(c): | 553 def chromium_win_clang_official_tot(c): |
| 544 c.env.LLVM_FORCE_HEAD_REVISION = 'YES' | 554 pass |
| 545 | 555 |
| 546 @config_ctx(includes=['chromium_win_clang', 'asan', 'static_library']) | 556 @config_ctx(includes=['chromium_win_clang', 'asan', 'static_library']) |
| 547 def chromium_win_clang_asan(c): | 557 def chromium_win_clang_asan(c): |
| 548 # These are set on the lkgr bot, and the fyi bots should match the lkgr bot. | 558 # These are set on the lkgr bot, and the fyi bots should match the lkgr bot. |
| 549 # TODO(thakis): Once the lkgr bot uses recipes, the lkgr and the fyi bots | 559 # TODO(thakis): Once the lkgr bot uses recipes, the lkgr and the fyi bots |
| 550 # should use the same context to ensure they use the same gyp defines. | 560 # should use the same context to ensure they use the same gyp defines. |
| 551 c.gyp_env.GYP_DEFINES['enable_ipc_fuzzer'] = 1 | 561 c.gyp_env.GYP_DEFINES['enable_ipc_fuzzer'] = 1 |
| 552 c.gyp_env.GYP_DEFINES['v8_enable_verify_heap'] = 1 | 562 c.gyp_env.GYP_DEFINES['v8_enable_verify_heap'] = 1 |
| 553 | 563 |
| 554 @config_ctx(includes=['chromium_win_clang_asan']) | 564 @config_ctx(includes=['chromium_win_clang_asan', 'clang_tot']) |
| 555 def chromium_win_clang_asan_tot(c): | 565 def chromium_win_clang_asan_tot(c): |
| 556 c.env.LLVM_FORCE_HEAD_REVISION = 'YES' | 566 pass |
| 557 | 567 |
| 558 @config_ctx(includes=['chromium_win_clang_asan_tot', 'sanitizer_coverage']) | 568 @config_ctx(includes=['chromium_win_clang_asan_tot', 'sanitizer_coverage']) |
| 559 def chromium_win_clang_asan_tot_coverage(c): | 569 def chromium_win_clang_asan_tot_coverage(c): |
| 560 pass | 570 pass |
| 561 | 571 |
| 562 @config_ctx(includes=['chromium_win_clang', 'goma']) | 572 @config_ctx(includes=['chromium_win_clang', 'goma']) |
| 563 def chromium_win_clang_goma(c): | 573 def chromium_win_clang_goma(c): |
| 564 pass | 574 pass |
| 565 | 575 |
| 566 @config_ctx(includes=['ninja', 'clang']) # No goma. | 576 @config_ctx(includes=['ninja', 'clang', 'clang_tot']) # No goma. |
| 567 def clang_tot_linux(c): | 577 def clang_tot_linux(c): |
| 568 # Use ToT Clang. | 578 pass |
| 569 c.env.LLVM_FORCE_HEAD_REVISION = 'YES' | |
| 570 | 579 |
| 571 @config_ctx(includes=['ninja', 'clang']) # No goma. | 580 @config_ctx(includes=['ninja', 'clang', 'clang_tot']) # No goma. |
| 572 def clang_tot_mac(c): | 581 def clang_tot_mac(c): |
| 573 # Use ToT Clang and fastbuild. | |
| 574 c.env.LLVM_FORCE_HEAD_REVISION = 'YES' | |
| 575 c.gyp_env.GYP_DEFINES['fastbuild'] = 1 | 582 c.gyp_env.GYP_DEFINES['fastbuild'] = 1 |
| 576 | 583 |
| 577 @config_ctx() | 584 @config_ctx() |
| 578 def asan_test_batch(c): | 585 def asan_test_batch(c): |
| 579 c.runtests.test_args.append('--test-launcher-batch-limit=1') | 586 c.runtests.test_args.append('--test-launcher-batch-limit=1') |
| 580 | 587 |
| 581 @config_ctx(includes=['clang_tot_linux', 'asan', 'chromium_sanitizer', | 588 @config_ctx(includes=['clang_tot_linux', 'asan', 'chromium_sanitizer', |
| 582 'asan_test_batch']) | 589 'asan_test_batch']) |
| 583 def clang_tot_linux_asan(c): | 590 def clang_tot_linux_asan(c): |
| 584 # Like chromium_linux_asan, without goma. | 591 # Like chromium_linux_asan, without goma. |
| 585 pass | 592 pass |
| 586 | 593 |
| 587 @config_ctx(includes=['clang_tot_linux', 'ubsan_vptr', 'sanitizer_coverage']) | 594 @config_ctx(includes=['clang_tot_linux', 'ubsan_vptr', 'sanitizer_coverage']) |
| 588 def clang_tot_linux_ubsan_vptr(c): | 595 def clang_tot_linux_ubsan_vptr(c): |
| 589 pass | 596 pass |
| 590 | 597 |
| 591 @config_ctx(includes=['clang_tot_mac', 'asan', 'chromium_sanitizer', | 598 @config_ctx(includes=['clang_tot_mac', 'asan', 'chromium_sanitizer', |
| 592 'static_library']) | 599 'static_library']) |
| 593 def clang_tot_mac_asan(c): | 600 def clang_tot_mac_asan(c): |
| 594 # Like chromium_mac_asan, without goma. | 601 # Like chromium_mac_asan, without goma. |
| 595 # Clear lsan configuration for mac. | 602 # Clear lsan configuration for mac. |
| 596 del c.gyp_env.GYP_DEFINES['lsan'] | 603 del c.gyp_env.GYP_DEFINES['lsan'] |
| 597 | 604 |
| 598 @config_ctx(includes=['android_common', 'ninja', 'clang', 'asan']) | 605 @config_ctx(includes=['android_common', 'ninja', 'clang', 'asan', 'clang_tot']) |
| 599 def clang_tot_android_asan(c): | 606 def clang_tot_android_asan(c): |
| 600 # Like android_clang, minus goma, minus static_libarary, plus asan. | 607 # Like android_clang, minus goma, minus static_libarary, plus asan. |
| 601 # Use ToT Clang. | 608 pass |
| 602 c.env.LLVM_FORCE_HEAD_REVISION = 'YES' | |
| 603 | 609 |
| 604 # GYP_DEFINES must not include 'asan' or 'clang', else the tester bot will try | 610 # GYP_DEFINES must not include 'asan' or 'clang', else the tester bot will try |
| 605 # to compile clang. | 611 # to compile clang. |
| 606 @config_ctx(includes=['chromium_no_goma']) | 612 @config_ctx(includes=['chromium_no_goma']) |
| 607 def chromium_win_asan(c): | 613 def chromium_win_asan(c): |
| 608 c.runtests.run_asan_test = True | 614 c.runtests.run_asan_test = True |
| 609 | 615 |
| 610 @config_ctx() | 616 @config_ctx() |
| 611 def chromium_sanitizer(c): | 617 def chromium_sanitizer(c): |
| 612 c.runtests.test_args.append('--test-launcher-print-test-stdio=always') | 618 c.runtests.test_args.append('--test-launcher-print-test-stdio=always') |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 c.gyp_env.GYP_GENERATOR_FLAGS['xcode_project_version'] = '3.2' | 695 c.gyp_env.GYP_GENERATOR_FLAGS['xcode_project_version'] = '3.2' |
| 690 | 696 |
| 691 @config_ctx(includes=['ios', 'ninja']) | 697 @config_ctx(includes=['ios', 'ninja']) |
| 692 def chromium_ios_ninja(c): | 698 def chromium_ios_ninja(c): |
| 693 c.build_config_fs += '-iphoneos' | 699 c.build_config_fs += '-iphoneos' |
| 694 c.compile_py.default_targets = ['All'] | 700 c.compile_py.default_targets = ['All'] |
| 695 | 701 |
| 696 gyp_defs = c.gyp_env.GYP_DEFINES | 702 gyp_defs = c.gyp_env.GYP_DEFINES |
| 697 gyp_defs['clang_xcode'] = 0 | 703 gyp_defs['clang_xcode'] = 0 |
| 698 | 704 |
| 699 @config_ctx(includes=['chromium_ios_ninja']) | 705 @config_ctx(includes=['chromium_ios_ninja', 'clang_tot']) |
| 700 def clang_tot_ios(c): | 706 def clang_tot_ios(c): |
| 701 # Use ToT Clang. | 707 pass |
| 702 c.env.LLVM_FORCE_HEAD_REVISION = 'YES' | |
| 703 | 708 |
| 704 @config_ctx(includes=['chromium', 'official']) | 709 @config_ctx(includes=['chromium', 'official']) |
| 705 def chromium_official(c): | 710 def chromium_official(c): |
| 706 # TODO(phajdan.jr): Unify compile targets used by official builders. | 711 # TODO(phajdan.jr): Unify compile targets used by official builders. |
| 707 if c.TARGET_PLATFORM == 'win': | 712 if c.TARGET_PLATFORM == 'win': |
| 708 c.compile_py.default_targets = ['chrome_official_builder'] | 713 c.compile_py.default_targets = ['chrome_official_builder'] |
| 709 elif c.TARGET_PLATFORM in ['linux', 'mac']: | 714 elif c.TARGET_PLATFORM in ['linux', 'mac']: |
| 710 c.compile_py.default_targets = [] | 715 c.compile_py.default_targets = [] |
| 711 | 716 |
| 712 @config_ctx(includes=['chromium']) | 717 @config_ctx(includes=['chromium']) |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 c.compile_py.goma_dir = None | 818 c.compile_py.goma_dir = None |
| 814 c.gyp_env.GYP_DEFINES['use_goma'] = 0 | 819 c.gyp_env.GYP_DEFINES['use_goma'] = 0 |
| 815 | 820 |
| 816 @config_ctx() | 821 @config_ctx() |
| 817 def chromium_deterministic_build(c): | 822 def chromium_deterministic_build(c): |
| 818 c.gyp_env.GYP_DEFINES['dont_embed_build_metadata'] = 1 | 823 c.gyp_env.GYP_DEFINES['dont_embed_build_metadata'] = 1 |
| 819 | 824 |
| 820 @config_ctx(includes=['chromium_clang']) | 825 @config_ctx(includes=['chromium_clang']) |
| 821 def cast_linux(c): | 826 def cast_linux(c): |
| 822 c.gyp_env.GYP_DEFINES['chromecast'] = 1 | 827 c.gyp_env.GYP_DEFINES['chromecast'] = 1 |
| OLD | NEW |