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

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: 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
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 "-rpath",
552 "@loader_path/../../../../../../..",
Dirk Pranke 2016/05/06 22:10:07 same question ...
Robert Sesek 2016/05/06 22:20:49 Commented.
553 ]
574 } 554 }
575 555
576 bundle_data("chrome_framework_locales") { 556 bundle_data("chrome_framework_locales") {
577 sources = [] 557 sources = []
578 public_deps = [ 558 public_deps = [
579 ":repack_locales_pack", 559 ":repack_locales_pack",
580 ] 560 ]
581 561
582 foreach(locale, locales_as_mac_outputs) { 562 foreach(locale, locales_as_mac_outputs) {
583 sources += [ "$root_gen_dir/repack/locales/$locale.pak" ] 563 sources += [ "$root_gen_dir/repack/locales/$locale.pak" ]
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 638
659 #"--breakpad_uploads=???", # TODO(rsesek): Breakpad uploads. 639 #"--breakpad_uploads=???", # TODO(rsesek): Breakpad uploads.
660 640
661 "--keystone=0", 641 "--keystone=0",
662 "--scm=1", 642 "--scm=1",
663 "--branding", 643 "--branding",
664 chrome_product_short_name, 644 chrome_product_short_name,
665 ] 645 ]
666 } 646 }
667 647
668 mac_framework_bundle("chrome_framework") { 648 # On Mac, speed up the component build by not re-bundling the framework
669 output_name = chrome_framework_name 649 # every time it changes. Instead, place all the sources and their deps in
670 650 # a library that the bundled framework links (and re-exports). That way
671 configs += [ "//build/config/compiler:wexit_time_destructors" ] 651 # only the library needs to be re-linked when it changes.
652 if (is_component_build) {
653 _dll_target_type = "shared_library"
654 } else {
655 _dll_target_type = "source_set"
656 }
657 target(_dll_target_type, "chrome_dll") {
658 visibility = [
659 ":chrome_framework",
660 ":chrome_framework_shared_library",
661 ]
672 662
673 sources = [ 663 sources = [
674 "app/chrome_command_ids.h", 664 "app/chrome_command_ids.h",
675 "app/chrome_crash_reporter_client.cc", 665 "app/chrome_crash_reporter_client.cc",
676 "app/chrome_crash_reporter_client.h", 666 "app/chrome_crash_reporter_client.h",
677 "app/chrome_crash_reporter_client_mac.mm", 667 "app/chrome_crash_reporter_client_mac.mm",
678 "app/chrome_dll_resource.h", 668 "app/chrome_dll_resource.h",
679 "app/chrome_main.cc", 669 "app/chrome_main.cc",
680 "app/chrome_main_delegate.cc", 670 "app/chrome_main_delegate.cc",
681 "app/chrome_main_delegate.h", 671 "app/chrome_main_delegate.h",
682 "app/chrome_main_mac.h", 672 "app/chrome_main_mac.h",
683 "app/chrome_main_mac.mm", 673 "app/chrome_main_mac.mm",
684 ] 674 ]
685 675
676 deps = [
677 ":browser_dependencies",
678 ":child_dependencies",
679 "//chrome/common:features",
680 "//components/crash/content/app",
681 "//components/policy",
682 "//content/public/app:both",
683 "//third_party/cld_2",
684 ]
685
686 if (is_component_build) {
687 libs = [ "Carbon.framework" ]
688 }
689
690 ldflags = [
691 "-Wl,-order_file",
692 "-Wl," + rebase_path("app/framework.order", root_build_dir),
693 "-ObjC",
694 ]
695
696 if (enable_plugins && enable_pdf) {
697 deps += [ "//pdf" ]
698 }
699
700 if (enable_package_mash_services) {
701 deps += [ "//chrome/app/mash" ]
702 }
703 }
704
705 mac_framework_bundle("chrome_framework") {
706 output_name = chrome_framework_name
707
708 configs += [ "//build/config/compiler:wexit_time_destructors" ]
709
686 info_plist_target = ":chrome_framework_plist" 710 info_plist_target = ":chrome_framework_plist"
687 extra_substitutions = [ 711 extra_substitutions = [
688 "CHROMIUM_BUNDLE_ID=$chrome_mac_bundle_id", 712 "CHROMIUM_BUNDLE_ID=$chrome_mac_bundle_id",
689 "CHROMIUM_SHORT_NAME=$chrome_product_short_name", 713 "CHROMIUM_SHORT_NAME=$chrome_product_short_name",
690 ] 714 ]
691 715
716 public_deps = [
717 ":chrome_dll",
718 ]
719
692 deps = [ 720 deps = [
693 ":browser_dependencies",
694 ":child_dependencies",
695 ":chrome_framework_helpers", 721 ":chrome_framework_helpers",
696 ":chrome_framework_locales", 722 ":chrome_framework_locales",
697 ":chrome_framework_resources", 723 ":chrome_framework_resources",
698 "//build/config/sanitizers:deps", 724 "//build/config/sanitizers:deps",
699 "//chrome/app/nibs:chrome_xibs", 725 "//chrome/app/nibs:chrome_xibs",
700 "//chrome/common:features",
701 "//components/crash/content/app",
702 "//components/policy",
703 "//content/public/app:both",
704 "//third_party/cld_2",
705 ] 726 ]
706 727
707 ldflags = [ 728 ldflags = [
708 "-Wl,-order_file",
709 "-Wl," + rebase_path("app/framework.order", root_build_dir),
710 "-install_name", 729 "-install_name",
711 "@executable_path/../Versions/$chrome_version_full/$chrome_framework_name. framework/$chrome_framework_name", 730 "@executable_path/../Versions/$chrome_version_full/$chrome_framework_name. framework/$chrome_framework_name",
712 "-compatibility_version", 731 "-compatibility_version",
713 chrome_dylib_version, 732 chrome_dylib_version,
714 "-current_version", 733 "-current_version",
715 chrome_dylib_version, 734 chrome_dylib_version,
716 ] 735 ]
717 736
718 if (enable_plugins && enable_pdf) { 737 if (is_component_build) {
719 deps += [ "//pdf" ] 738 ldflags += [
720 } 739 "-rpath",
721 740 "@loader_path/../../../../..",
722 if (enable_package_mash_services) { 741 "-Wl,-reexport_library,libchrome_dll.dylib",
723 deps += [ "//chrome/app/mash" ] 742 ]
724 } 743 }
725 } 744 }
726 } 745 }
727 746
728 # GYP version: chromium_browser_dependencies variable in chrome.gyp 747 # GYP version: chromium_browser_dependencies variable in chrome.gyp
729 group("browser_dependencies") { 748 group("browser_dependencies") {
730 public_deps = [ 749 public_deps = [
731 "//chrome/browser", 750 "//chrome/browser",
732 "//chrome/common", 751 "//chrome/common",
733 "//sync", 752 "//sync",
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 "//chrome/app/theme/$branding_path_component/product_logo_48.png", 1389 "//chrome/app/theme/$branding_path_component/product_logo_48.png",
1371 "//chrome/tools/build/linux/chrome-wrapper", 1390 "//chrome/tools/build/linux/chrome-wrapper",
1372 "//third_party/xdg-utils/scripts/xdg-mime", 1391 "//third_party/xdg-utils/scripts/xdg-mime",
1373 "//third_party/xdg-utils/scripts/xdg-settings", 1392 "//third_party/xdg-utils/scripts/xdg-settings",
1374 ] 1393 ]
1375 outputs = [ 1394 outputs = [
1376 "$root_out_dir/{{source_file_part}}", 1395 "$root_out_dir/{{source_file_part}}",
1377 ] 1396 ]
1378 } 1397 }
1379 } 1398 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698