Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: build/config/BUILDCONFIG.gn

Issue 1265263002: Use new GN features in the build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/config/linux/pkg_config.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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 # ============================================================================= 5 # =============================================================================
6 # PLATFORM SELECTION 6 # PLATFORM SELECTION
7 # ============================================================================= 7 # =============================================================================
8 # 8 #
9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name 9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name
10 # of the GN thing that encodes combinations of these things. 10 # of the GN thing that encodes combinations of these things.
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 # on multiple platforms, but this whole block of code (how we define 597 # on multiple platforms, but this whole block of code (how we define
598 # host_toolchain) needs to be reworked regardless to key off of host_os 598 # host_toolchain) needs to be reworked regardless to key off of host_os
599 # and host_cpu rather than the is_* variables. 599 # and host_cpu rather than the is_* variables.
600 host_toolchain = "//build/toolchain/linux:clang_x64" 600 host_toolchain = "//build/toolchain/linux:clang_x64"
601 } 601 }
602 602
603 # ============================================================================== 603 # ==============================================================================
604 # COMPONENT SETUP 604 # COMPONENT SETUP
605 # ============================================================================== 605 # ==============================================================================
606 606
607 # TODO(brettw) erase this once the built-in "component" function is removed. 607 # TODO(brettw): Convert component_mode to being a non-exported variable
608 # ("_component_mode" instead) once ICU's BUILD.gn file is updated to use
609 # is_component_build instead.
608 if (is_component_build) { 610 if (is_component_build) {
609 component_mode = "shared_library" 611 component_mode = "shared_library"
610 } else { 612 } else {
611 component_mode = "source_set" 613 component_mode = "source_set"
612 } 614 }
613 615
614 template("component") { 616 template("component") {
615 if (is_component_build) { 617 target(component_mode, target_name) {
Peng 2015/08/05 18:45:38 Build error for mandoline at this line. ERROR at
616 shared_library(target_name) { 618 forward_variables_from(invoker, "*")
617 # Configs will always be defined since we set_defaults for a component
618 # above. We want to use those rather than whatever came with the nested
619 # shared/static library inside the component.
620 configs = [] # Prevent list overwriting warning.
621 configs = invoker.configs
622 619
623 # The sources assignment filter will have already been applied when the 620 # All shared libraries must have the sanitizer deps to properly link in
624 # code was originally executed. We don't want to apply it again, since 621 # asan mode (this target will be empty in other cases).
625 # the original target may have override it for some assignments. 622 if (!defined(deps)) {
626 set_sources_assignment_filter([]) 623 deps = []
627
628 if (defined(invoker.all_dependent_configs)) {
629 all_dependent_configs = invoker.all_dependent_configs
630 }
631 if (defined(invoker.allow_circular_includes_from)) {
632 allow_circular_includes_from = invoker.allow_circular_includes_from
633 }
634 if (defined(invoker.cflags)) {
635 cflags = invoker.cflags
636 }
637 if (defined(invoker.cflags_c)) {
638 cflags_c = invoker.cflags_c
639 }
640 if (defined(invoker.cflags_cc)) {
641 cflags_cc = invoker.cflags_cc
642 }
643 if (defined(invoker.cflags_objc)) {
644 cflags_objc = invoker.cflags_objc
645 }
646 if (defined(invoker.cflags_objcc)) {
647 cflags_objcc = invoker.cflags_objcc
648 }
649 if (defined(invoker.check_includes)) {
650 check_includes = invoker.check_includes
651 }
652 if (defined(invoker.data)) {
653 data = invoker.data
654 }
655 if (defined(invoker.data_deps)) {
656 data_deps = invoker.data_deps
657 }
658 if (defined(invoker.datadeps)) {
659 datadeps = invoker.datadeps
660 }
661 if (defined(invoker.defines)) {
662 defines = invoker.defines
663 }
664
665 # All shared libraries must have the sanitizer deps to properly link in
666 # asan mode (this target will be empty in other cases).
667 if (defined(invoker.deps)) {
668 deps = invoker.deps + [ "//build/config/sanitizers:deps" ]
669 } else {
670 deps = [
671 "//build/config/sanitizers:deps",
672 ]
673 }
674 if (defined(invoker.forward_dependent_configs_from)) {
675 forward_dependent_configs_from = invoker.forward_dependent_configs_from
676 }
677 if (defined(invoker.include_dirs)) {
678 include_dirs = invoker.include_dirs
679 }
680 if (defined(invoker.ldflags)) {
681 ldflags = invoker.ldflags
682 }
683 if (defined(invoker.lib_dirs)) {
684 lib_dirs = invoker.lib_dirs
685 }
686 if (defined(invoker.libs)) {
687 libs = invoker.libs
688 }
689 if (defined(invoker.output_extension)) {
690 output_extension = invoker.output_extension
691 }
692 if (defined(invoker.output_name)) {
693 output_name = invoker.output_name
694 }
695 if (defined(invoker.public)) {
696 public = invoker.public
697 }
698 if (defined(invoker.public_configs)) {
699 public_configs = invoker.public_configs
700 }
701 if (defined(invoker.public_deps)) {
702 public_deps = invoker.public_deps
703 }
704 if (defined(invoker.sources)) {
705 sources = invoker.sources
706 }
707 if (defined(invoker.testonly)) {
708 testonly = invoker.testonly
709 }
710 if (defined(invoker.visibility)) {
711 visibility = invoker.visibility
712 }
713 } 624 }
714 } else { 625 deps += [ "//build/config/sanitizers:deps" ]
715 source_set(target_name) {
716 # See above.
717 configs = [] # Prevent list overwriting warning.
718 configs = invoker.configs
719
720 # See above call.
721 set_sources_assignment_filter([])
722
723 if (defined(invoker.all_dependent_configs)) {
724 all_dependent_configs = invoker.all_dependent_configs
725 }
726 if (defined(invoker.allow_circular_includes_from)) {
727 allow_circular_includes_from = invoker.allow_circular_includes_from
728 }
729 if (defined(invoker.cflags)) {
730 cflags = invoker.cflags
731 }
732 if (defined(invoker.cflags_c)) {
733 cflags_c = invoker.cflags_c
734 }
735 if (defined(invoker.cflags_cc)) {
736 cflags_cc = invoker.cflags_cc
737 }
738 if (defined(invoker.cflags_objc)) {
739 cflags_objc = invoker.cflags_objc
740 }
741 if (defined(invoker.cflags_objcc)) {
742 cflags_objcc = invoker.cflags_objcc
743 }
744 if (defined(invoker.check_includes)) {
745 check_includes = invoker.check_includes
746 }
747 if (defined(invoker.data)) {
748 data = invoker.data
749 }
750 if (defined(invoker.data_deps)) {
751 data_deps = invoker.data_deps
752 }
753 if (defined(invoker.datadeps)) {
754 datadeps = invoker.datadeps
755 }
756 if (defined(invoker.defines)) {
757 defines = invoker.defines
758 }
759 if (defined(invoker.deps)) {
760 deps = invoker.deps
761 }
762 if (defined(invoker.forward_dependent_configs_from)) {
763 forward_dependent_configs_from = invoker.forward_dependent_configs_from
764 }
765 if (defined(invoker.include_dirs)) {
766 include_dirs = invoker.include_dirs
767 }
768 if (defined(invoker.ldflags)) {
769 ldflags = invoker.ldflags
770 }
771 if (defined(invoker.lib_dirs)) {
772 lib_dirs = invoker.lib_dirs
773 }
774 if (defined(invoker.libs)) {
775 libs = invoker.libs
776 }
777 if (defined(invoker.output_extension)) {
778 output_extension = invoker.output_extension
779 }
780 if (defined(invoker.output_name)) {
781 output_name = invoker.output_name
782 }
783 if (defined(invoker.public)) {
784 public = invoker.public
785 }
786 if (defined(invoker.public_configs)) {
787 public_configs = invoker.public_configs
788 }
789 if (defined(invoker.public_deps)) {
790 public_deps = invoker.public_deps
791 }
792 if (defined(invoker.sources)) {
793 sources = invoker.sources
794 }
795 if (defined(invoker.testonly)) {
796 testonly = invoker.testonly
797 }
798 if (defined(invoker.visibility)) {
799 visibility = invoker.visibility
800 }
801 }
802 } 626 }
803 } 627 }
OLDNEW
« no previous file with comments | « no previous file | build/config/linux/pkg_config.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698