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

Side by Side Diff: BUILD.gn

Issue 2838203003: gn: Address some TODO(GYP)s in the toplevel BUILD.gn (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | 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 # This is the root build file for GN. GN will start processing by loading this 5 # This is the root build file for GN. GN will start processing by loading this
6 # file, and recursively load all dependencies until all dependencies are either 6 # file, and recursively load all dependencies until all dependencies are either
7 # resolved or known not to exist (which will cause the build to fail). So if 7 # resolved or known not to exist (which will cause the build to fail). So if
8 # you add a new build file, there must be some path of dependencies from this 8 # you add a new build file, there must be some path of dependencies from this
9 # file to your new one or GN won't know about it. 9 # file to your new one or GN won't know about it.
10 10
(...skipping 20 matching lines...) Expand all
31 # in files. 31 # in files.
32 root_extra_deps = [] 32 root_extra_deps = []
33 } 33 }
34 34
35 if (is_official_build) { 35 if (is_official_build) {
36 # An official (maximally optimized!) component (optimized for build times) 36 # An official (maximally optimized!) component (optimized for build times)
37 # build doesn't make sense and usually doesn't work. 37 # build doesn't make sense and usually doesn't work.
38 assert(!is_component_build) 38 assert(!is_component_build)
39 } 39 }
40 40
41 # This file defines the following five main targets: 41 # This file defines the following three main targets:
42 #
43 # "both_gn_and_gyp" should list every root target (target that nothing else
Nico 2017/04/25 20:45:42 This target no longer exists.
44 # depends on) built by GN that is also built in the GYP build.
45 # 42 #
46 # "gn_all" should (transitively) cause everything to be built; if you run 43 # "gn_all" should (transitively) cause everything to be built; if you run
47 # 'ninja gn_all' and then 'ninja all', the second build should do no work. 44 # 'ninja gn_all' and then 'ninja all', the second build should do no work.
48 # 45 #
49 # "gn_only" should list every root target that is *not* intended to be built in
Nico 2017/04/25 20:45:42 Neither does this.
50 # a GYP build. Because GN has different rules for deciding what an 'all' build
51 # is, this may end up including targets that are actually defined in a GYP
52 # build but not dependencies of GYP's "all" (and so not actually built).
53 #
54 # "gn_visibility": targets that are normally not visible to top-level targets, 46 # "gn_visibility": targets that are normally not visible to top-level targets,
55 # but are built anyway by "all". Since we don't want any such targets, we have 47 # but are built anyway by "all". Since we don't want any such targets, we have
56 # this placeholder to make sure hidden targets that aren't otherwise depended 48 # this placeholder to make sure hidden targets that aren't otherwise depended
57 # on yet are accounted for. 49 # on yet are accounted for.
58 # 50 #
59 # "All" is an alias for "gn_all". It exists for bot compatibility w/ GYP for 51 # "All" is an alias for "gn_all". It exists for bot compatibility w/ GYP for
60 # the iOS bots and the official builders, but should not be generally used 52 # the iOS bots and the official builders, but should not be generally used
61 # during the GYP->GN migration. We cannot guarantee that GN's "All" builds the 53 # during the GYP->GN migration. We cannot guarantee that GN's "All" builds the
62 # same set of targets as GYP's "All" does, because GYP's "All" supports 54 # same set of targets as GYP's "All" does, because GYP's "All" supports
63 # wildcards. 55 # wildcards.
64 # 56 #
65 # Lastly, none of these targets are guaranteed to be the same as what ninja 57 # Lastly, none of these targets are guaranteed to be the same as what ninja
66 # will build with "all". For more on how "all" works and the differences in how 58 # will build with "all". For more on how "all" works and how GN determines
67 # GYP and GN determine "all", see crbug.com/503241. 59 # "all", see crbug.com/503241.
68 # 60 #
69 # TODO(GYP_GONE): crbug.com/481694. Make sure that the above is true and there 61 # TODO(GYP_GONE): crbug.com/481694. Make sure that the above is true and there
70 # are scripts run on the bots that enforce this. Once the GYP migration is 62 # are scripts run on the bots that enforce this. Once the GYP migration is
71 # over, we can collapse all of these targets as desired. 63 # over, we can collapse all of these targets as desired.
72 64
73 group("gn_all") { 65 group("gn_all") {
74 testonly = true 66 testonly = true
75 67
76 deps = [ 68 deps = [
77 ":gn_visibility", 69 ":gn_visibility",
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 "//tools/gn", 140 "//tools/gn",
149 "//tools/gn:gn_unittests", 141 "//tools/gn:gn_unittests",
150 "//tools/perf/clear_system_cache", 142 "//tools/perf/clear_system_cache",
151 "//tools/traffic_annotation/auditor:traffic_annotation_auditor", 143 "//tools/traffic_annotation/auditor:traffic_annotation_auditor",
152 "//ui/accessibility:accessibility_unittests", 144 "//ui/accessibility:accessibility_unittests",
153 "//ui/accessibility/extensions", 145 "//ui/accessibility/extensions",
154 ] 146 ]
155 } 147 }
156 148
157 if (!is_ios) { 149 if (!is_ios) {
158 # TODO(GYP): Figure out which of these should actually build on iOS,
159 # and whether there should be other targets that are iOS-only and missing.
Nico 2017/04/25 20:45:42 This list of non-iOS targets looks roughly correct
160 deps += [ 150 deps += [
161 "//cc:cc_unittests", 151 "//cc:cc_unittests",
162 "//chrome/test:telemetry_perf_unittests", 152 "//chrome/test:telemetry_perf_unittests",
163 "//chrome/test:unit_tests", 153 "//chrome/test:unit_tests",
164 "//components:components_browsertests", 154 "//components:components_browsertests",
165 "//components/policy:policy_templates", 155 "//components/policy:policy_templates",
166 "//content/shell:content_shell", 156 "//content/shell:content_shell",
167 "//content/test:content_browsertests", 157 "//content/test:content_browsertests",
168 "//content/test:content_perftests", 158 "//content/test:content_perftests",
169 "//content/test:content_unittests", 159 "//content/test:content_unittests",
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 "//sandbox/win:pocdll", 528 "//sandbox/win:pocdll",
539 "//sandbox/win:sandbox_poc", 529 "//sandbox/win:sandbox_poc",
540 "//sandbox/win:sbox_integration_tests", 530 "//sandbox/win:sbox_integration_tests",
541 "//sandbox/win:sbox_unittests", 531 "//sandbox/win:sbox_unittests",
542 "//sandbox/win:sbox_validation_tests", 532 "//sandbox/win:sbox_validation_tests",
543 "//testing/gtest:gtest_main", 533 "//testing/gtest:gtest_main",
544 "//third_party/pdfium/samples:pdfium_diff", 534 "//third_party/pdfium/samples:pdfium_diff",
545 "//third_party/tcmalloc:addr2line-pdb", 535 "//third_party/tcmalloc:addr2line-pdb",
546 "//tools/win/chromeexts:chromeexts", 536 "//tools/win/chromeexts:chromeexts",
547 ] 537 ]
548 deps -= [
549 "//crypto:crypto_unittests", # TODO(GYP)
550 "//net:net_unittests", # TODO(GYP)
Nico 2017/04/25 20:45:42 They both build fine on Windows.
551 ]
552 538
553 if (!(is_component_build && is_debug && target_cpu == "x86")) { 539 if (!(is_component_build && is_debug && target_cpu == "x86")) {
554 deps += 540 deps +=
555 [ "//chrome/installer/mini_installer:next_version_mini_installer" ] 541 [ "//chrome/installer/mini_installer:next_version_mini_installer" ]
556 } 542 }
557 } else if (!is_android && !is_ios) { 543 } else if (!is_android && !is_ios) {
558 deps += [ "//breakpad:symupload($host_toolchain)" ] 544 deps += [ "//breakpad:symupload($host_toolchain)" ]
559 } 545 }
560 546
561 if (is_chromecast) { 547 if (is_chromecast) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 600
615 if (use_ozone && is_chromeos) { 601 if (use_ozone && is_chromeos) {
616 deps += [ "//services/ui/display:display_service_unittests" ] 602 deps += [ "//services/ui/display:display_service_unittests" ]
617 } 603 }
618 } 604 }
619 605
620 if (is_linux && !is_chromeos && !is_chromecast) { 606 if (is_linux && !is_chromeos && !is_chromecast) {
621 # TODO(GYP): Figure out if any of these should be in gn_all 607 # TODO(GYP): Figure out if any of these should be in gn_all
622 # and figure out how cross-platform they are 608 # and figure out how cross-platform they are
623 deps += [ 609 deps += [
624 ":gn_mojo_targets",
625 "//chrome/installer/util:strings", 610 "//chrome/installer/util:strings",
626 "//chrome/tools/convert_dict", 611 "//chrome/tools/convert_dict",
627 "//components/constrained_window:unit_tests", 612 "//components/constrained_window:unit_tests",
628 "//components/filesystem:filesystem_service_unittests", 613 "//components/filesystem:filesystem_service_unittests",
629 "//components/leveldb:leveldb_service_unittests", 614 "//components/leveldb:leveldb_service_unittests",
630 "//components/metrics:serialization", 615 "//components/metrics:serialization",
631 "//components/password_manager/content/renderer:browser_tests", 616 "//components/password_manager/content/renderer:browser_tests",
632 "//components/rappor:unit_tests", 617 "//components/rappor:unit_tests",
633 "//components/sessions:unit_tests", 618 "//components/sessions:unit_tests",
634 "//media/blink:media_blink_unittests", 619 "//media/blink:media_blink_unittests",
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 "//sandbox/linux:chrome_sandbox", 802 "//sandbox/linux:chrome_sandbox",
818 "//sandbox/linux:sandbox_linux_unittests", 803 "//sandbox/linux:sandbox_linux_unittests",
819 804
820 # Blocked on https://github.com/catapult-project/catapult/issues/2297 805 # Blocked on https://github.com/catapult-project/catapult/issues/2297
821 #"//third_party/catapult/telemetry:bitmaptools", 806 #"//third_party/catapult/telemetry:bitmaptools",
822 "//tools/perf/clear_system_cache", 807 "//tools/perf/clear_system_cache",
823 ] 808 ]
824 } 809 }
825 } 810 }
826 811
827 group("gn_mojo_targets") {
828 testonly = true
829 if (is_linux && !is_chromeos) {
830 # TODO(GYP): Figure out if any of these should be in gn_all
831 # and figure out how cross-platform they are
832 deps = [
833 "//ipc:ipc_tests",
834 "//mojo:tests",
835 "//services:service_unittests",
Nico 2017/04/25 20:45:42 All these are depended on without this target alre
836 ]
837 }
838 }
839
840 group("gn_visibility") { 812 group("gn_visibility") {
841 deps = [ 813 deps = [
842 "//build/config/sanitizers:options_sources", 814 "//build/config/sanitizers:options_sources",
843 # "//third_party/pdfium:pdfium_embeddertests", # TODO(GYP): visibility? 815 # "//third_party/pdfium:pdfium_embeddertests", # TODO(GYP): visibility?
844 # "//third_party/pdfium:pdfium_unittests", # TODO(GYP): visibility? 816 # "//third_party/pdfium:pdfium_unittests", # TODO(GYP): visibility?
845 ] 817 ]
846 818
847 if (!is_ios) { 819 if (!is_ios) {
848 deps += [ 820 deps += [
849 "//v8:postmortem-metadata", 821 "//v8:postmortem-metadata",
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 assert(target_name != "") # Mark as used. 1064 assert(target_name != "") # Mark as used.
1093 sources = invoker.actual_sources 1065 sources = invoker.actual_sources
1094 assert( 1066 assert(
1095 sources == invoker.actual_sources, 1067 sources == invoker.actual_sources,
1096 "Do not use a platform name in your output directory (found \"$root_build_ dir\"). http://crbug.com/548283") 1068 "Do not use a platform name in your output directory (found \"$root_build_ dir\"). http://crbug.com/548283")
1097 } 1069 }
1098 1070
1099 assert_valid_out_dir("_unused") { 1071 assert_valid_out_dir("_unused") {
1100 actual_sources = [ "$root_build_dir/foo" ] 1072 actual_sources = [ "$root_build_dir/foo" ]
1101 } 1073 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698