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

Side by Side Diff: chrome/BUILD.gn

Issue 1961473003: [Mac/GN] Set up the component build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment and rebase Created 4 years, 7 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 | « build/toolchain/mac/BUILD.gn ('k') | chrome/app_shim/BUILD.gn » ('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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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("//build/buildflag_header.gni") 5 import("//build/buildflag_header.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/compiler/compiler.gni") 7 import("//build/config/compiler/compiler.gni")
8 import("//build/config/features.gni") 8 import("//build/config/features.gni")
9 import("//build/config/locales.gni") 9 import("//build/config/locales.gni")
10 import("//build/config/sanitizers/sanitizers.gni") 10 import("//build/config/sanitizers/sanitizers.gni")
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 "//third_party/widevine/cdm:widevinecdmadapter", 224 "//third_party/widevine/cdm:widevinecdmadapter",
225 ] 225 ]
226 226
227 if (is_multi_dll_chrome) { 227 if (is_multi_dll_chrome) {
228 defines += [ "CHROME_MULTIPLE_DLL" ] 228 defines += [ "CHROME_MULTIPLE_DLL" ]
229 data_deps += [ ":chrome_child" ] 229 data_deps += [ ":chrome_child" ]
230 } 230 }
231 } 231 }
232 } # !is_android && !is_mac 232 } # !is_android && !is_mac
233 233
234 if (is_mac) {
235 if (is_component_build) {
236 # On Mac component builds, this target is the bundle, and the main dll is
237 # just another shared library. This speeds up incremental builds by
238 # not requiring re-doing the bundle every time main_dll changes.
239 # See https://codereview.chromium.org/11420019
240
241 # TODO(GYP) chrome_dll for Mac component build.
242 assert(false)
243 } else {
244 # On Mac non-component builds, this is a no-op forwarding target.
245 group("chrome_dll") {
246 public_deps = [
247 ":chrome_framework",
248 ]
249 }
250 }
251 }
252
253 if (is_win) { 234 if (is_win) {
254 # This target is a forwarding target to compile the necessary DLLs used 235 # This target is a forwarding target to compile the necessary DLLs used
255 # by Chrome. 236 # by Chrome.
256 group("chrome_dll") { 237 group("chrome_dll") {
257 # TODO(GYP) support incremental_chrome_dll on Windows for faster links in 238 # TODO(GYP) support incremental_chrome_dll on Windows for faster links in
258 # developer component builds. When that's supported, this target will need 239 # developer component builds. When that's supported, this target will need
259 # to become more complicated. 240 # to become more complicated.
260 data_deps = [ 241 data_deps = [
261 ":main_dll", 242 ":main_dll",
262 ] 243 ]
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 deps += [ "//pdf" ] 376 deps += [ "//pdf" ]
396 } 377 }
397 } 378 }
398 } 379 }
399 } else if (is_mac) { 380 } else if (is_mac) {
400 chrome_helper_name = chrome_product_full_name + " Helper" 381 chrome_helper_name = chrome_product_full_name + " Helper"
401 chrome_framework_name = chrome_product_full_name + " Framework" 382 chrome_framework_name = chrome_product_full_name + " Framework"
402 383
403 group("chrome") { 384 group("chrome") {
404 deps = [ 385 deps = [
405 ":chrome_initial",
406 ]
407 }
408
409 group("chrome_initial") {
410 deps = [
411 ":chrome_app", 386 ":chrome_app",
412 ] 387 ]
413 } 388 }
414 389
415 tweak_info_plist("chrome_app_plist") { 390 tweak_info_plist("chrome_app_plist") {
416 info_plist = "app/app-Info.plist" 391 info_plist = "app/app-Info.plist"
417 args = [ 392 args = [
418 "--breakpad=0", 393 "--breakpad=0",
419 394
420 #"--keystone=???", # TODO(rsesek): Keystone. 395 #"--keystone=???", # TODO(rsesek): Keystone.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 539
565 sources = [ 540 sources = [
566 "app/chrome_exe_main_mac.c", 541 "app/chrome_exe_main_mac.c",
567 ] 542 ]
568 543
569 defines = [ "HELPER_EXECUTABLE" ] 544 defines = [ "HELPER_EXECUTABLE" ]
570 545
571 deps = [ 546 deps = [
572 "//chrome/common:version_header", 547 "//chrome/common:version_header",
573 ] 548 ]
549
550 ldflags = [
551 # The helper is in Chromium.app/Contents/Versions/X/Chromium Helper.app/Co nents/MacOS/
552 # so set rpath up to the base.
553 "-rpath",
554 "@loader_path/../../../../../../..",
555 ]
574 } 556 }
575 557
576 bundle_data("chrome_framework_locales") { 558 bundle_data("chrome_framework_locales") {
577 sources = [] 559 sources = []
578 public_deps = [ 560 public_deps = [
579 ":repack_locales_pack", 561 ":repack_locales_pack",
580 ] 562 ]
581 563
582 foreach(locale, locales_as_mac_outputs) { 564 foreach(locale, locales_as_mac_outputs) {
583 sources += [ "$root_gen_dir/repack/locales/$locale.pak" ] 565 sources += [ "$root_gen_dir/repack/locales/$locale.pak" ]
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 640
659 #"--breakpad_uploads=???", # TODO(rsesek): Breakpad uploads. 641 #"--breakpad_uploads=???", # TODO(rsesek): Breakpad uploads.
660 642
661 "--keystone=0", 643 "--keystone=0",
662 "--scm=1", 644 "--scm=1",
663 "--branding", 645 "--branding",
664 chrome_product_short_name, 646 chrome_product_short_name,
665 ] 647 ]
666 } 648 }
667 649
668 mac_framework_bundle("chrome_framework") { 650 # On Mac, speed up the component build by not re-bundling the framework
669 output_name = chrome_framework_name 651 # every time it changes. Instead, place all the sources and their deps in
670 652 # a library that the bundled framework links (and re-exports). That way
671 configs += [ "//build/config/compiler:wexit_time_destructors" ] 653 # only the library needs to be re-linked when it changes.
654 if (is_component_build) {
655 _dll_target_type = "shared_library"
656 } else {
657 _dll_target_type = "source_set"
658 }
659 target(_dll_target_type, "chrome_dll") {
660 visibility = [
661 ":chrome_framework",
662 ":chrome_framework_shared_library",
663 ]
672 664
673 sources = [ 665 sources = [
674 "app/chrome_command_ids.h", 666 "app/chrome_command_ids.h",
675 "app/chrome_crash_reporter_client.cc", 667 "app/chrome_crash_reporter_client.cc",
676 "app/chrome_crash_reporter_client.h", 668 "app/chrome_crash_reporter_client.h",
677 "app/chrome_crash_reporter_client_mac.mm", 669 "app/chrome_crash_reporter_client_mac.mm",
678 "app/chrome_dll_resource.h", 670 "app/chrome_dll_resource.h",
679 "app/chrome_main.cc", 671 "app/chrome_main.cc",
680 "app/chrome_main_delegate.cc", 672 "app/chrome_main_delegate.cc",
681 "app/chrome_main_delegate.h", 673 "app/chrome_main_delegate.h",
682 "app/chrome_main_mac.h", 674 "app/chrome_main_mac.h",
683 "app/chrome_main_mac.mm", 675 "app/chrome_main_mac.mm",
684 ] 676 ]
685 677
686 info_plist_target = ":chrome_framework_plist"
687 extra_substitutions = [
688 "CHROMIUM_BUNDLE_ID=$chrome_mac_bundle_id",
689 "CHROMIUM_SHORT_NAME=$chrome_product_short_name",
690 ]
691
692 deps = [ 678 deps = [
693 ":browser_dependencies", 679 ":browser_dependencies",
694 ":child_dependencies", 680 ":child_dependencies",
695 ":chrome_framework_helpers",
696 ":chrome_framework_locales",
697 ":chrome_framework_resources",
698 "//build/config/sanitizers:deps",
699 "//chrome/app/nibs:chrome_xibs",
700 "//chrome/common:features", 681 "//chrome/common:features",
701 "//components/crash/content/app", 682 "//components/crash/content/app",
702 "//components/policy", 683 "//components/policy",
703 "//content/public/app:both", 684 "//content/public/app:both",
704 "//third_party/cld_2", 685 "//third_party/cld_2",
705 ] 686 ]
706 687
688 if (is_component_build) {
689 libs = [ "Carbon.framework" ]
690 }
691
707 ldflags = [ 692 ldflags = [
708 "-Wl,-order_file", 693 "-Wl,-order_file",
709 "-Wl," + rebase_path("app/framework.order", root_build_dir), 694 "-Wl," + rebase_path("app/framework.order", root_build_dir),
710 "-install_name", 695 "-ObjC",
711 "@executable_path/../Versions/$chrome_version_full/$chrome_framework_name. framework/$chrome_framework_name",
712 "-compatibility_version",
713 chrome_dylib_version,
714 "-current_version",
715 chrome_dylib_version,
716 ] 696 ]
717 697
718 if (enable_plugins && enable_pdf) { 698 if (enable_plugins && enable_pdf) {
719 deps += [ "//pdf" ] 699 deps += [ "//pdf" ]
720 } 700 }
721 701
722 if (enable_package_mash_services) { 702 if (enable_package_mash_services) {
723 deps += [ "//chrome/app/mash" ] 703 deps += [ "//chrome/app/mash" ]
724 } 704 }
725 } 705 }
706
707 mac_framework_bundle("chrome_framework") {
708 output_name = chrome_framework_name
709
710 configs += [ "//build/config/compiler:wexit_time_destructors" ]
711
712 info_plist_target = ":chrome_framework_plist"
713 extra_substitutions = [
714 "CHROMIUM_BUNDLE_ID=$chrome_mac_bundle_id",
715 "CHROMIUM_SHORT_NAME=$chrome_product_short_name",
716 ]
717
718 public_deps = [
719 ":chrome_dll",
720 ]
721
722 deps = [
723 ":chrome_framework_helpers",
724 ":chrome_framework_locales",
725 ":chrome_framework_resources",
726 "//build/config/sanitizers:deps",
727 "//chrome/app/nibs:chrome_xibs",
728 ]
729
730 ldflags = [
731 "-Wl,-install_name,@executable_path/../Versions/$chrome_version_full/$chro me_framework_name.framework/$chrome_framework_name",
732 "-compatibility_version",
733 chrome_dylib_version,
734 "-current_version",
735 chrome_dylib_version,
736 ]
737
738 if (is_component_build) {
739 ldflags += [
740 "-rpath",
741 "@loader_path/../../../../..",
742 "-Wl,-reexport_library,libchrome_dll.dylib",
743 ]
744 }
745 }
726 } 746 }
727 747
728 # GYP version: chromium_browser_dependencies variable in chrome.gyp 748 # GYP version: chromium_browser_dependencies variable in chrome.gyp
729 group("browser_dependencies") { 749 group("browser_dependencies") {
730 public_deps = [ 750 public_deps = [
731 "//chrome/browser", 751 "//chrome/browser",
732 "//chrome/common", 752 "//chrome/common",
733 "//sync", 753 "//sync",
734 ] 754 ]
735 if (enable_plugins) { 755 if (enable_plugins) {
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1368 "//chrome/app/theme/$branding_path_component/product_logo_48.png", 1388 "//chrome/app/theme/$branding_path_component/product_logo_48.png",
1369 "//chrome/tools/build/linux/chrome-wrapper", 1389 "//chrome/tools/build/linux/chrome-wrapper",
1370 "//third_party/xdg-utils/scripts/xdg-mime", 1390 "//third_party/xdg-utils/scripts/xdg-mime",
1371 "//third_party/xdg-utils/scripts/xdg-settings", 1391 "//third_party/xdg-utils/scripts/xdg-settings",
1372 ] 1392 ]
1373 outputs = [ 1393 outputs = [
1374 "$root_out_dir/{{source_file_part}}", 1394 "$root_out_dir/{{source_file_part}}",
1375 ] 1395 ]
1376 } 1396 }
1377 } 1397 }
OLDNEW
« no previous file with comments | « build/toolchain/mac/BUILD.gn ('k') | chrome/app_shim/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698