Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/config/chrome_build.gni") | 5 import("//build/config/chrome_build.gni") |
| 6 import("//build/config/features.gni") | 6 import("//build/config/features.gni") |
| 7 import("//build/config/locales.gni") | 7 import("//build/config/locales.gni") |
| 8 import("//build/config/sanitizers/sanitizers.gni") | |
| 8 import("//build/config/ui.gni") | 9 import("//build/config/ui.gni") |
| 9 import("//build/config/win/manifest.gni") | 10 import("//build/config/win/manifest.gni") |
| 10 import("//chrome/chrome_repack_locales.gni") | 11 import("//chrome/chrome_repack_locales.gni") |
| 11 import("//chrome/version.gni") | 12 import("//chrome/version.gni") |
| 12 | 13 |
| 13 if (is_android) { | 14 if (is_android) { |
| 14 import("//build/config/android/rules.gni") | 15 import("//build/config/android/rules.gni") |
| 15 } | 16 } |
| 16 | 17 |
| 18 if (is_win) { | |
| 19 action("reorder_imports") { | |
| 20 script = "//build/win/reorder-imports.py" | |
| 21 | |
| 22 # See comment in chrome_dll.gypi in the hardlink_to_output | |
| 23 # target for why this cannot be 'initial' like the DLL. | |
| 24 inputs = [ | |
| 25 "$root_out_dir/initialexe/chrome.exe", | |
| 26 ] | |
| 27 outputs = [ | |
| 28 "$root_out_dir/chrome.exe", | |
| 29 "$root_out_dir/chrome.exe.pdb", | |
| 30 ] | |
| 31 args = [ | |
| 32 "-i", | |
| 33 rebase_path("$root_out_dir/initialexe", root_build_dir), | |
| 34 "-o", | |
| 35 rebase_path("$root_out_dir", root_build_dir), | |
| 36 "-a", | |
| 37 target_cpu, | |
| 38 ] | |
| 39 deps = [ | |
| 40 ":chrome_initial", | |
| 41 ] | |
| 42 } | |
| 43 } | |
| 44 | |
| 17 if (!is_android) { | 45 if (!is_android) { |
| 46 group("chrome") { | |
| 47 deps = [ | |
| 48 ":chrome_initial", | |
| 49 ] | |
| 50 if (is_win) { | |
| 51 deps += [ ":reorder_imports" ] | |
| 52 } | |
| 53 } | |
| 54 | |
| 18 # TODO(GYP) bug 512599: for Windows need to the the reorder-imports step | 55 # TODO(GYP) bug 512599: for Windows need to the the reorder-imports step |
| 19 # which probably means adding another target and renaming this to | 56 # which probably means adding another target and renaming this to |
| 20 # chrome_initial like in GYP. | 57 # chrome_initial like in GYP. |
| 21 executable("chrome") { | 58 executable("chrome_initial") { |
| 59 if (is_win) { | |
| 60 output_name = "initialexe/chrome" | |
|
Nico
2015/09/24 04:15:19
who knew this was possible!
| |
| 61 } else { | |
| 62 output_name = "chrome" | |
| 63 } | |
| 64 | |
| 22 # Because the sources list varies so significantly per-platform, generally | 65 # Because the sources list varies so significantly per-platform, generally |
| 23 # each platform lists its own files rather than relying on filtering or | 66 # each platform lists its own files rather than relying on filtering or |
| 24 # removing unused files. | 67 # removing unused files. |
| 25 sources = [ | 68 sources = [ |
| 26 "app/chrome_exe_resource.h", | 69 "app/chrome_exe_resource.h", |
| 27 ] | 70 ] |
| 28 defines = [] | 71 defines = [] |
| 29 public_deps = [] | 72 public_deps = [] |
| 30 deps = [ | 73 deps = [ |
| 31 "//build/config/sanitizers:deps", | 74 "//build/config/sanitizers:deps", |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 "//crypto", | 155 "//crypto", |
| 113 "//sandbox", | 156 "//sandbox", |
| 114 "//ui/gfx", | 157 "//ui/gfx", |
| 115 ] | 158 ] |
| 116 data_deps = [ "//chrome/app/version_assembly:version_assembly_manifest" ] | 159 data_deps = [ "//chrome/app/version_assembly:version_assembly_manifest" ] |
| 117 | 160 |
| 118 libs = [ | 161 libs = [ |
| 119 "wintrust.lib", | 162 "wintrust.lib", |
| 120 "crypt32.lib", | 163 "crypt32.lib", |
| 121 ] | 164 ] |
| 122 configs -= [ "//build/config/win:console" ] | 165 if (!is_asan) { |
| 123 configs += [ "//build/config/win:windowed" ] | 166 configs -= [ "//build/config/win:console" ] |
| 167 configs += [ "//build/config/win:windowed" ] | |
| 168 } | |
| 124 } else if (use_aura) { | 169 } else if (use_aura) { |
| 125 # Non-Windows aura entrypoint. | 170 # Non-Windows aura entrypoint. |
| 126 sources += [ "app/chrome_exe_main_aura.cc" ] | 171 sources += [ "app/chrome_exe_main_aura.cc" ] |
| 127 } | 172 } |
| 128 | 173 |
| 129 if (is_linux) { | 174 if (is_linux) { |
| 130 sources += [ | 175 sources += [ |
| 131 "app/chrome_dll_resource.h", | 176 "app/chrome_dll_resource.h", |
| 132 "app/chrome_main.cc", | 177 "app/chrome_main.cc", |
| 133 "app/chrome_main_delegate.cc", | 178 "app/chrome_main_delegate.cc", |
| 134 "app/chrome_main_delegate.h", | 179 "app/chrome_main_delegate.h", |
| 135 ] | 180 ] |
| 136 | 181 |
| 137 deps += [ | 182 deps += [ |
| 138 # On Linux, link the dependencies (libraries) that make up actual | 183 # On Linux, link the dependencies (libraries) that make up actual |
| 139 # Chromium functionality directly into the executable. | 184 # Chromium functionality directly into the executable. |
| 140 ":browser_dependencies", | 185 ":browser_dependencies", |
| 141 ":child_dependencies", | 186 ":child_dependencies", |
| 142 ":manpage", | 187 ":manpage", |
| 143 "//base/allocator", | 188 "//base/allocator", |
| 144 | 189 |
| 145 # Needed to use the master_preferences functions | 190 # Needed to use the master_preferences functions |
| 146 "//chrome/installer/util", | 191 "//chrome/installer/util", |
| 147 "//content/public/app:both", | 192 "//content/public/app:both", |
| 148 ] | 193 ] |
| 194 if (enable_plugins) { | |
| 195 deps += [ "//pdf" ] | |
| 196 } | |
| 197 | |
| 149 public_deps = [ | 198 public_deps = [ |
| 150 ":xdg_mime", # Needs to be public for installer to consume files. | 199 ":xdg_mime", # Needs to be public for installer to consume files. |
| 151 ] | 200 ] |
| 152 | 201 |
| 153 # Needed for chrome_main.cc initialization of libraries. | 202 # Needed for chrome_main.cc initialization of libraries. |
| 154 configs += [ "//build/config/linux:pangocairo" ] | 203 configs += [ "//build/config/linux:pangocairo" ] |
| 155 | 204 |
| 156 # GYP has this in a 'profiling==0 and linux_disable_pie==0' condition. | 205 # GYP has this in a 'profiling==0 and linux_disable_pie==0' condition. |
| 157 # but GN doesn't have either of these flags. | 206 # but GN doesn't have either of these flags. |
| 158 ldflags = [ "-pie" ] | 207 ldflags = [ "-pie" ] |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 178 "//components/startup_metric_utils", | 227 "//components/startup_metric_utils", |
| 179 | 228 |
| 180 # Precompiled plugins that need to get copied to the output directory. | 229 # Precompiled plugins that need to get copied to the output directory. |
| 181 # On Mac, internal plugins go inside the framework, so these | 230 # On Mac, internal plugins go inside the framework, so these |
| 182 # dependencies are on chrome.dll. | 231 # dependencies are on chrome.dll. |
| 183 "//third_party/adobe/flash:flapper_binaries", | 232 "//third_party/adobe/flash:flapper_binaries", |
| 184 "//third_party/widevine/cdm:widevinecdmadapter", | 233 "//third_party/widevine/cdm:widevinecdmadapter", |
| 185 ] | 234 ] |
| 186 } | 235 } |
| 187 | 236 |
| 188 if (is_linux && enable_plugins) { | |
| 189 deps += [ "//pdf" ] | |
| 190 } | |
| 191 | |
| 192 if (is_multi_dll_chrome) { | 237 if (is_multi_dll_chrome) { |
| 193 defines += [ "CHROME_MULTIPLE_DLL" ] | 238 defines += [ "CHROME_MULTIPLE_DLL" ] |
| 194 data_deps += [ ":chrome_child" ] | 239 data_deps += [ ":chrome_child" ] |
| 195 } | 240 } |
| 196 } | 241 } |
| 197 } # !is_android | 242 } # !is_android |
| 198 | 243 |
| 199 shared_library("main_dll") { | 244 shared_library("main_dll") { |
| 200 configs += [ "//build/config/compiler:wexit_time_destructors" ] | 245 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| 201 defines = [] | 246 defines = [] |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 968 "//chrome/app/theme/$branding_path_component/product_logo_48.png", | 1013 "//chrome/app/theme/$branding_path_component/product_logo_48.png", |
| 969 "//chrome/tools/build/linux/chrome-wrapper", | 1014 "//chrome/tools/build/linux/chrome-wrapper", |
| 970 "//third_party/xdg-utils/scripts/xdg-mime", | 1015 "//third_party/xdg-utils/scripts/xdg-mime", |
| 971 "//third_party/xdg-utils/scripts/xdg-settings", | 1016 "//third_party/xdg-utils/scripts/xdg-settings", |
| 972 ] | 1017 ] |
| 973 outputs = [ | 1018 outputs = [ |
| 974 "$root_out_dir/{{source_file_part}}", | 1019 "$root_out_dir/{{source_file_part}}", |
| 975 ] | 1020 ] |
| 976 } | 1021 } |
| 977 } | 1022 } |
| OLD | NEW |