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

Side by Side Diff: build/config/BUILD.gn

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/compiled_action.gni ('k') | build/config/BUILDCONFIG.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 (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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/allocator.gni") 5 import("//build/config/allocator.gni")
6 import("//build/config/crypto.gni") 6 import("//build/config/crypto.gni")
7 import("//build/config/features.gni") 7 import("//build/config/features.gni")
8 import("//build/config/ui.gni") 8 import("//build/config/ui.gni")
9 9
10 declare_args() { 10 declare_args() {
(...skipping 12 matching lines...) Expand all
23 # TODO(brettw) Most of these should be removed. Instead of global feature 23 # TODO(brettw) Most of these should be removed. Instead of global feature
24 # flags, we should have more modular flags that apply only to a target and its 24 # flags, we should have more modular flags that apply only to a target and its
25 # dependents. For example, depending on the "x11" meta-target should define 25 # dependents. For example, depending on the "x11" meta-target should define
26 # USE_X11 for all dependents so that everything that could use X11 gets the 26 # USE_X11 for all dependents so that everything that could use X11 gets the
27 # define, but anything that doesn't depend on X11 doesn't see it. 27 # define, but anything that doesn't depend on X11 doesn't see it.
28 # 28 #
29 # For now we define these globally to match the current GYP build. 29 # For now we define these globally to match the current GYP build.
30 config("feature_flags") { 30 config("feature_flags") {
31 # TODO(brettw) most of these need to be parameterized. 31 # TODO(brettw) most of these need to be parameterized.
32 defines = [ 32 defines = [
33 "CHROMIUM_BUILD", 33 "CHROMIUM_BUILD",
34 "V8_DEPRECATION_WARNINGS", # Don't use deprecated V8 APIs anywhere. 34 "V8_DEPRECATION_WARNINGS", # Don't use deprecated V8 APIs anywhere.
35 ] 35 ]
36 36
37 if (cld_version > 0) { 37 if (cld_version > 0) {
38 defines += [ "CLD_VERSION=$cld_version" ] 38 defines += [ "CLD_VERSION=$cld_version" ]
39 } 39 }
40 if (enable_mdns) { 40 if (enable_mdns) {
41 defines += [ "ENABLE_MDNS=1" ] 41 defines += [ "ENABLE_MDNS=1" ]
42 } 42 }
43 if (enable_notifications) { 43 if (enable_notifications) {
44 defines += [ "ENABLE_NOTIFICATIONS" ] 44 defines += [ "ENABLE_NOTIFICATIONS" ]
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 if (enable_plugin_installation) { 165 if (enable_plugin_installation) {
166 defines += [ "ENABLE_PLUGIN_INSTALLATION=1" ] 166 defines += [ "ENABLE_PLUGIN_INSTALLATION=1" ]
167 } 167 }
168 if (enable_app_list) { 168 if (enable_app_list) {
169 defines += [ "ENABLE_APP_LIST=1" ] 169 defines += [ "ENABLE_APP_LIST=1" ]
170 } 170 }
171 if (enable_settings_app) { 171 if (enable_settings_app) {
172 defines += [ "ENABLE_SETTINGS_APP=1" ] 172 defines += [ "ENABLE_SETTINGS_APP=1" ]
173 } 173 }
174 if (enable_managed_users) { 174 if (enable_supervised_users) {
175 defines += [ "ENABLE_MANAGED_USERS=1" ] 175 defines += [ "ENABLE_SUPERVISED_USERS=1" ]
176 } 176 }
177 if (enable_service_discovery) { 177 if (enable_service_discovery) {
178 defines += [ "ENABLE_SERVICE_DISCOVERY=1" ] 178 defines += [ "ENABLE_SERVICE_DISCOVERY=1" ]
179 } 179 }
180 if (enable_autofill_dialog) { 180 if (enable_autofill_dialog) {
181 defines += [ "ENABLE_AUTOFILL_DIALOG=1" ] 181 defines += [ "ENABLE_AUTOFILL_DIALOG=1" ]
182 } 182 }
183 if (enable_wifi_bootstrapping) { 183 if (enable_wifi_bootstrapping) {
184 defines += [ "ENABLE_WIFI_BOOTSTRAPPING=1" ] 184 defines += [ "ENABLE_WIFI_BOOTSTRAPPING=1" ]
185 } 185 }
(...skipping 11 matching lines...) Expand all
197 } 197 }
198 if (use_athena) { 198 if (use_athena) {
199 defines += [ "USE_ATHENA=1" ] 199 defines += [ "USE_ATHENA=1" ]
200 } 200 }
201 if (enable_hidpi) { 201 if (enable_hidpi) {
202 defines += [ "ENABLE_HIDPI=1" ] 202 defines += [ "ENABLE_HIDPI=1" ]
203 } 203 }
204 if (proprietary_codecs) { 204 if (proprietary_codecs) {
205 defines += [ "USE_PROPRIETARY_CODECS" ] 205 defines += [ "USE_PROPRIETARY_CODECS" ]
206 } 206 }
207 if (enable_hangout_services_extension) {
208 defines += [ "ENABLE_HANGOUT_SERVICES_EXTENSION=1" ]
209 }
207 } 210 }
208 211
209 # Debug/release ---------------------------------------------------------------- 212 # Debug/release ----------------------------------------------------------------
210 213
211 config("debug") { 214 config("debug") {
212 defines = [ 215 defines = [
213 "_DEBUG", 216 "_DEBUG",
214 "DYNAMIC_ANNOTATIONS_ENABLED=1", 217 "DYNAMIC_ANNOTATIONS_ENABLED=1",
215 "WTF_USE_DYNAMIC_ANNOTATIONS=1", 218 "WTF_USE_DYNAMIC_ANNOTATIONS=1",
216 ] 219 ]
217 220
218 if (is_win) { 221 if (is_win) {
219 if (disable_iterator_debugging) { 222 if (disable_iterator_debugging) {
220 # Iterator debugging is enabled by the compiler on debug builds, and we 223 # Iterator debugging is enabled by the compiler on debug builds, and we
221 # have to tell it to turn it off. 224 # have to tell it to turn it off.
222 defines += [ "_HAS_ITERATOR_DEBUGGING=0" ] 225 defines += [ "_HAS_ITERATOR_DEBUGGING=0" ]
223 } 226 }
224 } else if (is_linux && !is_android && cpu_arch == "x64" && 227 } else if (is_linux && !is_android && cpu_arch == "x64" &&
225 !disable_iterator_debugging) { 228 !disable_iterator_debugging) {
226 # Enable libstdc++ debugging facilities to help catch problems early, see 229 # Enable libstdc++ debugging facilities to help catch problems early, see
227 # http://crbug.com/65151 . 230 # http://crbug.com/65151 .
228 # TODO(phajdan.jr): Should we enable this for all of POSIX? 231 # TODO(phajdan.jr): Should we enable this for all of POSIX?
229 defines += [ "_GLIBCXX_DEBUG=1" ] 232 defines += [ "_GLIBCXX_DEBUG=1" ]
230 } 233 }
231 } 234 }
232 235
233 config("release") { 236 config("release") {
234 defines = [ 237 defines = [ "NDEBUG" ]
235 "NDEBUG",
236 ]
237 } 238 }
238 239
239 # Default libraries ------------------------------------------------------------ 240 # Default libraries ------------------------------------------------------------
240 241
241 # This config defines the default libraries applied to all targets. 242 # This config defines the default libraries applied to all targets.
242 config("default_libs") { 243 config("default_libs") {
243 if (is_win) { 244 if (is_win) {
244 # TODO(brettw) this list of defaults should probably be smaller, and 245 # TODO(brettw) this list of defaults should probably be smaller, and
245 # instead the targets that use the less common ones (e.g. wininet or 246 # instead the targets that use the less common ones (e.g. wininet or
246 # winspool) should include those explicitly. 247 # winspool) should include those explicitly.
(...skipping 14 matching lines...) Expand all
261 "shell32.lib", 262 "shell32.lib",
262 "shlwapi.lib", 263 "shlwapi.lib",
263 "user32.lib", 264 "user32.lib",
264 "usp10.lib", 265 "usp10.lib",
265 "uuid.lib", 266 "uuid.lib",
266 "version.lib", 267 "version.lib",
267 "wininet.lib", 268 "wininet.lib",
268 "winmm.lib", 269 "winmm.lib",
269 "winspool.lib", 270 "winspool.lib",
270 "ws2_32.lib", 271 "ws2_32.lib",
272
271 # Please don't add more stuff here. We should actually be making this 273 # Please don't add more stuff here. We should actually be making this
272 # list smaller, since all common things should be covered. If you need 274 # list smaller, since all common things should be covered. If you need
273 # some extra libraries, please just add a libs = [ "foo.lib" ] to your 275 # some extra libraries, please just add a libs = [ "foo.lib" ] to your
274 # target that needs it. 276 # target that needs it.
275 ] 277 ]
276 } else if (is_android) { 278 } else if (is_android) {
277 # Android uses -nostdlib so we need to add even libc here. 279 # Android uses -nostdlib so we need to add even libc here.
278 libs = [ 280 libs = [
279 # TODO(brettw) write a version of this, hopefully we can express this 281 # TODO(brettw) write a version of this, hopefully we can express this
280 # without forking out to GCC just to get the library name. The android 282 # without forking out to GCC just to get the library name. The android
281 # toolchain directory should probably be extracted into a .gni file that 283 # toolchain directory should probably be extracted into a .gni file that
282 # this file and the android toolchain .gn file can share. 284 # this file and the android toolchain .gn file can share.
283 # # Manually link the libgcc.a that the cross compiler uses. 285 # # Manually link the libgcc.a that the cross compiler uses.
284 # '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', 286 # '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
285 "c", 287 "c",
286 "dl", 288 "dl",
287 "m" 289 "m",
288 ] 290 ]
289 } else if (is_mac) { 291 } else if (is_mac) {
290 libs = [ 292 libs = [
291 "AppKit.framework", 293 "AppKit.framework",
292 "ApplicationServices.framework", 294 "ApplicationServices.framework",
293 "Carbon.framework", 295 "Carbon.framework",
294 "CoreFoundation.framework", 296 "CoreFoundation.framework",
295 "Foundation.framework", 297 "Foundation.framework",
296 "IOKit.framework", 298 "IOKit.framework",
297 "Security.framework", 299 "Security.framework",
298 ] 300 ]
299 } else if (is_ios) { 301 } else if (is_ios) {
300 libs = [ 302 libs = [
301 "CoreFoundation.framework", 303 "CoreFoundation.framework",
302 "CoreGraphics.framework", 304 "CoreGraphics.framework",
303 "CoreText.framework", 305 "CoreText.framework",
304 "Foundation.framework", 306 "Foundation.framework",
305 "UIKit.framework", 307 "UIKit.framework",
306 ] 308 ]
307 } else if (is_linux) { 309 } else if (is_linux) {
308 libs = [ 310 libs = [ "dl" ]
309 "dl",
310 ]
311 } 311 }
312 } 312 }
OLDNEW
« no previous file with comments | « build/compiled_action.gni ('k') | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698