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

Side by Side Diff: chrome/BUILD.gn

Issue 1364103002: gn/win: Run reorder-imports.py on chrome.exe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 5 years, 3 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 | chrome/chrome_exe.gypi » ('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/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) {
18 # TODO(GYP) bug 512599: for Windows need to the the reorder-imports step 46 group("chrome") {
19 # which probably means adding another target and renaming this to 47 deps = [
20 # chrome_initial like in GYP. 48 ":chrome_initial",
21 executable("chrome") { 49 ]
50 if (is_win) {
51 deps += [ ":reorder_imports" ]
52 }
53 }
54
55 executable("chrome_initial") {
56 if (is_win) {
57 output_name = "initialexe/chrome"
58 } else {
59 output_name = "chrome"
60 }
61
22 # Because the sources list varies so significantly per-platform, generally 62 # Because the sources list varies so significantly per-platform, generally
23 # each platform lists its own files rather than relying on filtering or 63 # each platform lists its own files rather than relying on filtering or
24 # removing unused files. 64 # removing unused files.
25 sources = [ 65 sources = [
26 "app/chrome_exe_resource.h", 66 "app/chrome_exe_resource.h",
27 ] 67 ]
28 defines = [] 68 defines = []
29 public_deps = [] 69 public_deps = []
30 deps = [ 70 deps = [
31 "//build/config/sanitizers:deps", 71 "//build/config/sanitizers:deps",
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 "//crypto", 152 "//crypto",
113 "//sandbox", 153 "//sandbox",
114 "//ui/gfx", 154 "//ui/gfx",
115 ] 155 ]
116 data_deps = [ "//chrome/app/version_assembly:version_assembly_manifest" ] 156 data_deps = [ "//chrome/app/version_assembly:version_assembly_manifest" ]
117 157
118 libs = [ 158 libs = [
119 "wintrust.lib", 159 "wintrust.lib",
120 "crypt32.lib", 160 "crypt32.lib",
121 ] 161 ]
122 configs -= [ "//build/config/win:console" ] 162 if (!is_asan) {
123 configs += [ "//build/config/win:windowed" ] 163 # Set /SUBSYSTEM:WINDOWS for chrome.exe itself, except for the
164 # AddressSanitizer build where console output is important.
165 configs -= [ "//build/config/win:console" ]
166 configs += [ "//build/config/win:windowed" ]
167 }
124 } else if (use_aura) { 168 } else if (use_aura) {
125 # Non-Windows aura entrypoint. 169 # Non-Windows aura entrypoint.
126 sources += [ "app/chrome_exe_main_aura.cc" ] 170 sources += [ "app/chrome_exe_main_aura.cc" ]
127 } 171 }
128 172
129 if (is_linux) { 173 if (is_linux) {
130 sources += [ 174 sources += [
131 "app/chrome_dll_resource.h", 175 "app/chrome_dll_resource.h",
132 "app/chrome_main.cc", 176 "app/chrome_main.cc",
133 "app/chrome_main_delegate.cc", 177 "app/chrome_main_delegate.cc",
134 "app/chrome_main_delegate.h", 178 "app/chrome_main_delegate.h",
135 ] 179 ]
136 180
137 deps += [ 181 deps += [
138 # On Linux, link the dependencies (libraries) that make up actual 182 # On Linux, link the dependencies (libraries) that make up actual
139 # Chromium functionality directly into the executable. 183 # Chromium functionality directly into the executable.
140 ":browser_dependencies", 184 ":browser_dependencies",
141 ":child_dependencies", 185 ":child_dependencies",
142 ":manpage", 186 ":manpage",
143 "//base/allocator", 187 "//base/allocator",
144 188
145 # Needed to use the master_preferences functions 189 # Needed to use the master_preferences functions
146 "//chrome/installer/util", 190 "//chrome/installer/util",
147 "//content/public/app:both", 191 "//content/public/app:both",
148 ] 192 ]
193 if (enable_plugins) {
194 deps += [ "//pdf" ]
195 }
196
149 public_deps = [ 197 public_deps = [
150 ":xdg_mime", # Needs to be public for installer to consume files. 198 ":xdg_mime", # Needs to be public for installer to consume files.
151 ] 199 ]
152 200
153 # Needed for chrome_main.cc initialization of libraries. 201 # Needed for chrome_main.cc initialization of libraries.
154 configs += [ "//build/config/linux:pangocairo" ] 202 configs += [ "//build/config/linux:pangocairo" ]
155 203
156 # GYP has this in a 'profiling==0 and linux_disable_pie==0' condition. 204 # GYP has this in a 'profiling==0 and linux_disable_pie==0' condition.
157 # but GN doesn't have either of these flags. 205 # but GN doesn't have either of these flags.
158 ldflags = [ "-pie" ] 206 ldflags = [ "-pie" ]
(...skipping 19 matching lines...) Expand all
178 "//components/startup_metric_utils", 226 "//components/startup_metric_utils",
179 227
180 # Precompiled plugins that need to get copied to the output directory. 228 # Precompiled plugins that need to get copied to the output directory.
181 # On Mac, internal plugins go inside the framework, so these 229 # On Mac, internal plugins go inside the framework, so these
182 # dependencies are on chrome.dll. 230 # dependencies are on chrome.dll.
183 "//third_party/adobe/flash:flapper_binaries", 231 "//third_party/adobe/flash:flapper_binaries",
184 "//third_party/widevine/cdm:widevinecdmadapter", 232 "//third_party/widevine/cdm:widevinecdmadapter",
185 ] 233 ]
186 } 234 }
187 235
188 if (is_linux && enable_plugins) {
189 deps += [ "//pdf" ]
190 }
191
192 if (is_multi_dll_chrome) { 236 if (is_multi_dll_chrome) {
193 defines += [ "CHROME_MULTIPLE_DLL" ] 237 defines += [ "CHROME_MULTIPLE_DLL" ]
194 data_deps += [ ":chrome_child" ] 238 data_deps += [ ":chrome_child" ]
195 } 239 }
196 } 240 }
197 } # !is_android 241 } # !is_android
198 242
199 shared_library("main_dll") { 243 shared_library("main_dll") {
200 configs += [ "//build/config/compiler:wexit_time_destructors" ] 244 configs += [ "//build/config/compiler:wexit_time_destructors" ]
201 defines = [] 245 defines = []
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 "//chrome/app/theme/$branding_path_component/product_logo_48.png", 1012 "//chrome/app/theme/$branding_path_component/product_logo_48.png",
969 "//chrome/tools/build/linux/chrome-wrapper", 1013 "//chrome/tools/build/linux/chrome-wrapper",
970 "//third_party/xdg-utils/scripts/xdg-mime", 1014 "//third_party/xdg-utils/scripts/xdg-mime",
971 "//third_party/xdg-utils/scripts/xdg-settings", 1015 "//third_party/xdg-utils/scripts/xdg-settings",
972 ] 1016 ]
973 outputs = [ 1017 outputs = [
974 "$root_out_dir/{{source_file_part}}", 1018 "$root_out_dir/{{source_file_part}}",
975 ] 1019 ]
976 } 1020 }
977 } 1021 }
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_exe.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698