| 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 # This file contains Chrome-feature-related build flags (see ui.gni for | 5 # This file contains Chrome-feature-related build flags (see ui.gni for |
| 6 # UI-related ones). These should theoretically be moved to the build files of | 6 # UI-related ones). These should theoretically be moved to the build files of |
| 7 # the features themselves. | 7 # the features themselves. |
| 8 # | 8 # |
| 9 # However, today we have many "bad" dependencies on some of these flags from, | 9 # However, today we have many "bad" dependencies on some of these flags from, |
| 10 # e.g. base, so they need to be global to match the GYP configuration. Also, | 10 # e.g. base, so they need to be global to match the GYP configuration. Also, |
| 11 # anything that needs a grit define must be in either this file or ui.gni. | 11 # anything that needs a grit define must be in either this file or ui.gni. |
| 12 # | 12 # |
| 13 # PLEASE TRY TO AVOID ADDING FLAGS TO THIS FILE in cases where grit isn't | 13 # PLEASE TRY TO AVOID ADDING FLAGS TO THIS FILE in cases where grit isn't |
| 14 # required. See the declare_args block of BUILDCONFIG.gn for advice on how | 14 # required. See the declare_args block of BUILDCONFIG.gn for advice on how |
| 15 # to set up feature flags. | 15 # to set up feature flags. |
| 16 | 16 |
| 17 import("//build/config/chrome_build.gni") | 17 import("//build/config/chrome_build.gni") |
| 18 if (is_android) { | 18 if (is_android) { |
| 19 import("//build/config/android/config.gni") | 19 import("//build/config/android/config.gni") |
| 20 } | 20 } |
| 21 | 21 |
| 22 declare_args() { | 22 declare_args() { |
| 23 # Multicast DNS. | 23 # Multicast DNS. |
| 24 enable_mdns = is_win || is_linux | 24 enable_mdns = is_win || is_linux |
| 25 | 25 |
| 26 enable_plugins = !is_android && !is_ios | 26 enable_plugins = !is_android && !is_ios |
| 27 | 27 |
| 28 # This indicates whether the chromeos interfaces and features should be |
| 29 # made available. Contrast with whether we are targetting the embedded |
| 30 # OS. That flag controls the linking, flags, filesystems, etc. we expect. |
| 31 use_cros_fe = is_chromeos |
| 32 |
| 28 # Enables Native Client support. | 33 # Enables Native Client support. |
| 29 # TODO(GYP): Get NaCl linking on other platforms. | 34 # TODO(GYP): Get NaCl linking on other platforms. |
| 30 # Also, see if we can always get rid of enable_nacl_untrusted and | 35 # Also, see if we can always get rid of enable_nacl_untrusted and |
| 31 # enable_pnacl and always build them if enable_nacl is true. | 36 # enable_pnacl and always build them if enable_nacl is true. |
| 32 # The "is_nacl" part of the condition is needed to ensure that | 37 # The "is_nacl" part of the condition is needed to ensure that |
| 33 # the untrusted code is built properly; arguably it should be | 38 # the untrusted code is built properly; arguably it should be |
| 34 # guarded by "is_nacl" directly rather than enable_nacl_untrusted, but | 39 # guarded by "is_nacl" directly rather than enable_nacl_untrusted, but |
| 35 # this will go away when Mac and Win are working and we can just use | 40 # this will go away when Mac and Win are working and we can just use |
| 36 # the commented out logic. | 41 # the commented out logic. |
| 37 # Eventually we want this to be: | 42 # Eventually we want this to be: |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 # Option controlling the use of GConf (the classic GNOME configuration | 207 # Option controlling the use of GConf (the classic GNOME configuration |
| 203 # system). | 208 # system). |
| 204 # TODO(GYP) also require !embedded to enable. | 209 # TODO(GYP) also require !embedded to enable. |
| 205 use_gconf = is_linux && !is_chromeos | 210 use_gconf = is_linux && !is_chromeos |
| 206 | 211 |
| 207 # Whether to back up data before sync. | 212 # Whether to back up data before sync. |
| 208 enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos) | 213 enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos) |
| 209 | 214 |
| 210 # WebVR support disabled until platform implementations have been added | 215 # WebVR support disabled until platform implementations have been added |
| 211 enable_webvr = false | 216 enable_webvr = false |
| 217 |
| 218 # |
| 219 # Maintain some sanity for refactoring build configs. |
| 220 # |
| 221 if (is_chromeos_os) { |
| 222 assert(use_cros_fe, "ChromeOS targetting requires ChromeOS UI") |
| 223 } |
| 224 |
| 225 if (use_cros_fe) { |
| 226 assert(!is_desktop_linux, "ChromeOS Frontend is not desktop linux") |
| 227 } |
| 228 |
| 229 assert(use_cros_fe == is_chromeos, |
| 230 "is_chromeos and use_cros_fe are expected to be aliases, " + |
| 231 "old and new, respectively") |
| OLD | NEW |