# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//build/config/features.gni") import("//build/config/ui.gni") import("//chrome/version.gni") # TODO(GYP) for Windows need to the the reorder-imports step which probably # means adding another target and renaming this to chrome_initial like in GYP. #executable("chrome") { # TODO(GYP) enable once this links. source_set("chrome") { # Because the sources list varies so significantly per-platform, generally # each platform lists its own files rather than relying on filtering or # removing unused files. sources = [ "app/chrome_exe_resource.h", ] deps = [] # TODO(GYP) mac_bundle_resources, xcode_settings # TODO(GYP) order_profiling, order_text_section if (is_win) { sources += [ "app/chrome_exe_main_win.cc", "app/client_util.cc", "app/client_util.h", "app/signature_validator_win.cc", "app/signature_validator_win.h", "//content/app/startup_helper_win.cc", ] deps += [ "//ui/gfx" ] } else if (use_aura) { # Non-Windows aura entrypoint. sources += [ "app/chrome_exe_main_aura.cc" ] } if (is_linux) { # TODO(GYP) manpage action sources += [ "app/chrome_dll_resource.h", "app/chrome_main.cc", "app/chrome_main_delegate.cc", "app/chrome_main_delegate.h", ] deps += [ # On Linux, link the dependencies (libraries) that make up actual # Chromium functionality directly into the executable. ":browser_dependencies", ":child_dependencies", "//base/allocator", # Needed to use the master_preferences functions "//chrome/installer/util", "//content/app:both", ] # Needed for chrome_main.cc initialization of libraries. configs += [ "//build/config/linux:pangocairo" ] # TODO(GYP) ['profiling==0 and linux_disable_pie==0', { # 'ldflags': [ # '-pie', # ], #}], if (use_x11) { configs += [ "//build/config/linux:x11", "//build/config/linux:xext", ] } } if (is_mac) { sources += [ "app/chrome_exe_main_mac.cc", ] } # TODO(GYP) is_mac } shared_library("main_dll") { configs += [ "//build/config/compiler:wexit_time_destructors" ] deps = [ ":browser_dependencies", "//base/allocator", ] if (is_win) { output_name = "chrome" sources = [ "app/chrome_command_ids.h", "app/chrome_dll.rc", "app/chrome_dll_resource.h", "app/chrome_main.cc", "app/chrome_main_delegate.cc", "app/chrome_main_delegate.h", "app/delay_load_hook_win.cc", "app/delay_load_hook_win.h", "//base/win/dllmain.cc", ] deps += [ # On Windows, link the dependencies (libraries) that make up actual # Chromium functionality into this .dll. #'chrome_version_resources', TODO(GYP) "//chrome/app/theme:chrome_unscaled_resources", "//content/app/resources", "//crypto", "//net:resources", "//third_party/wtl", "//ui/views", #'<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf' ] TODO(GYP) ] if (enable_configuration_policy) { deps += [ "//components/policy" ] } if (cpu_arch == "x86") { # Add a dependency to custom import library for user32 delay imports only # in x86 builds. #deps += [ 'chrome_user32_delay_imports' ] TODO(GYP) } # TODO(GYP) incremental linking flags in debug builds #'LinkIncremental': '<(msvs_large_module_debug_link_mode)', # TODO(GYP) Lots of VCLinkerTool stuff on Windows. # TODO(GYP) chrome_pgo_phase on Windows. } if (use_aura) { deps += [ "//ui/compositor" ] } #TODO(GYP) add chrome_multiple_dll support if (false) { #chrome_multiple_dll) { defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ] deps += [ "//content/app:browser", ] } else { deps += [ ":child_dependencies", "//content/app:both", ] } if (cld_version == 0 || cld_version == 2) { deps += [ "//third_party/cld_2", ] } if (is_mac) { #['OS=="mac" and component!="shared_library"', { TODO(GYP) # 'includes': [ 'chrome_dll_bundle.gypi' ], #}], # TODO(GYP) Lots of other stuff in the OS=="mac" block. } } # GYP version: chromium_browser_dependencies variable in chrome.gyp group("browser_dependencies") { deps = [ "//chrome/browser", "//chrome/common", "//sync", ] if (!is_ios) { deps += [ "//ppapi:ppapi_host", ] } if (printing_mode != 0) { deps += [ "//printing" ] if (printing_mode == 1) { deps += [ "//chrome/service" ] } } } # GYP version: chromium_child_dependencies variable in chrome.gyp group("child_dependencies") { deps = [ "//chrome/common", "//sync", ] if (!is_ios) { deps += [ "//chrome/browser/devtools", "//chrome/plugin", "//chrome/renderer", "//chrome/utility", "//content/gpu", "//content/ppapi_plugin", "//third_party/WebKit/public:blink_devtools_frontend_resources", ] } } if (is_win) { # TODO(brettw) this duplicates "//chrome/common:version" which applies to # Linux. process_version("version_header") { visibility = ":*" source = "version.h.in" # TODO(brettw) this should move to $target_gen_dir/version.h and # source files including it should reference it via "chrome/version.h" output = "$root_gen_dir/version.h" } } # GYP version: chrome/chrome_resources.gyp:chrome_resources group("resources") { deps = [ # Note: GYP lists some dependencies in addition to these actions. However, # these are just dependencies for the actions themselves, which our actions # list individually when needed. "//chrome/browser:resources", "//chrome/common:resources", "//chrome/renderer:resources", ] if (enable_extensions) { deps += [ "//chrome/common:extensions_api_resources" ] } } # GYP version: chrome/chrome_resources.gyp:chrome_extra_resources group("extra_resources") { deps = [ "//chrome/browser/resources:invalidations_resources", "//chrome/browser/resources:memory_internals_resources", "//chrome/browser/resources:net_internals_resources", "//chrome/browser/resources:password_manager_internals_resources", "//chrome/browser/resources:signin_internals_resources", "//chrome/browser/resources:sync_internals_resources", "//chrome/browser/resources:translate_internals_resources", ] if (!is_ios) { deps += [ "//chrome/browser/resources:component_extension_resources", "//chrome/browser/resources:options_resources", ] } if (enable_chromevox_next) { deps += [ #'browser/resources/chromeos/chromevox2/chromevox.gyp:chromevox2', TODO(GYP) ] } else { deps += [ #'browser/resources/chromeos/chromevox/chromevox.gyp:chromevox', TODO(GYP) ] } if (enable_extensions) { deps += [ "//chrome/browser/resources:quota_internals_resources", "//chrome/browser/resources:sync_file_system_internals_resources", ] } } # GYP version: chrome/chrome_resources.gyp:chrome_strings group("strings") { deps = [ "//chrome/app:chromium_strings", "//chrome/app:generated_resources", "//chrome/app:google_chrome_strings", "//chrome/app/resources:locale_settings", ] }