Avi Drissman | 73a09d1 | 2022-09-08 20:33:38 | [diff] [blame] | 1 | # Copyright 2014 The Chromium Authors |
[email protected] | f38dc10 | 2014-02-12 11:34:25 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
3 | # found in the LICENSE file. | ||||
4 | |||||
brettw | 1d61ea7 | 2016-08-06 00:03:45 | [diff] [blame] | 5 | # ============================================= |
6 | # PLEASE DO NOT ADD MORE FLAGS TO THIS FILE | ||||
7 | # ============================================= | ||||
[email protected] | f38dc10 | 2014-02-12 11:34:25 | [diff] [blame] | 8 | # |
brettw | 1d61ea7 | 2016-08-06 00:03:45 | [diff] [blame] | 9 | # These flags are effectively global. Your feature flag should go near the |
10 | # code it controls. Most of these items are here now because they control | ||||
11 | # legacy global #defines passed to the compiler (now replaced with generated | ||||
12 | # buildflag headers -- see //build/buildflag_header.gni). | ||||
[email protected] | 3ad0946b | 2014-02-24 21:29:49 | [diff] [blame] | 13 | # |
brettw | 1d61ea7 | 2016-08-06 00:03:45 | [diff] [blame] | 14 | # These flags are ui-related so should eventually be moved to various places |
15 | # in //ui/*. | ||||
16 | # | ||||
17 | # There is more advice on where to put build flags in the "Build flag" section | ||||
18 | # of //build/config/BUILDCONFIG.gn. | ||||
[email protected] | f38dc10 | 2014-02-12 11:34:25 | [diff] [blame] | 19 | |
mark a. foltz | e185ab2fa | 2023-11-06 21:21:20 | [diff] [blame] | 20 | import("//build/config/cast.gni") |
Yuke Liao | 8f422858 | 2021-04-02 22:28:45 | [diff] [blame] | 21 | import("//build/config/chromeos/args.gni") |
Dirk Pranke | 79d065d | 2020-08-29 03:28:30 | [diff] [blame] | 22 | import("//build/config/chromeos/ui_mode.gni") |
Maksim Sisov | cecaf7e | 2021-09-01 08:01:45 | [diff] [blame] | 23 | import("//build/config/ozone.gni") |
slan | 77bdc2e6 | 2015-09-21 17:56:26 | [diff] [blame] | 24 | |
[email protected] | f38dc10 | 2014-02-12 11:34:25 | [diff] [blame] | 25 | declare_args() { |
[email protected] | c48ad0b | 2014-02-19 20:31:52 | [diff] [blame] | 26 | # Indicates if Aura is enabled. Aura is a low-level windowing library, sort |
27 | # of a replacement for GDI or GTK. | ||||
Sean McAllister | deaa740 | 2020-07-31 04:42:54 | [diff] [blame] | 28 | use_aura = is_win || is_linux || is_chromeos || is_fuchsia |
[email protected] | f38dc10 | 2014-02-12 11:34:25 | [diff] [blame] | 29 | } |
30 | |||||
dpranke | f6fd4d7 | 2016-11-22 19:43:13 | [diff] [blame] | 31 | declare_args() { |
32 | # True means the UI is built using the "views" framework. | ||||
Sean McAllister | deaa740 | 2020-07-31 04:42:54 | [diff] [blame] | 33 | toolkit_views = is_mac || is_win || is_linux || is_chromeos || is_fuchsia |
Nick Diego Yamane | 632978e0 | 2019-08-14 22:35:41 | [diff] [blame] | 34 | |
Andrew Grieve | 6a9a4d9 | 2021-12-21 16:03:22 | [diff] [blame] | 35 | use_glib = |
Ryan Keane | 3d77fa1 | 2022-06-16 01:52:48 | [diff] [blame] | 36 | is_linux && !is_castos && |
Andrew Grieve | 6a9a4d9 | 2021-12-21 16:03:22 | [diff] [blame] | 37 | # Avoid the need for glib when Android is building things via secondary |
38 | # toolchains. | ||||
39 | target_os != "android" | ||||
dpranke | f6fd4d7 | 2016-11-22 19:43:13 | [diff] [blame] | 40 | } |
41 | |||||
Ryan Keane | 3d77fa1 | 2022-06-16 01:52:48 | [diff] [blame] | 42 | assert(!use_glib || (is_linux && !is_castos)) |
dpranke | 9de1743 | 2015-06-09 19:04:57 | [diff] [blame] | 43 | |
Ryan Keane | 3d77fa1 | 2022-06-16 01:52:48 | [diff] [blame] | 44 | use_atk = use_glib && current_toolchain == default_toolchain |
Dirk Pranke | 79d065d | 2020-08-29 03:28:30 | [diff] [blame] | 45 | |
46 | # Whether using Xvfb to provide a display server for a test might be | ||||
47 | # necessary. | ||||
Georg Neis | a324c50 | 2025-03-03 06:04:54 | [diff] [blame] | 48 | use_xvfb_in_this_config = is_linux |
Dirk Pranke | 79d065d | 2020-08-29 03:28:30 | [diff] [blame] | 49 | # |
brettw | 1d61ea7 | 2016-08-06 00:03:45 | [diff] [blame] | 50 | # ============================================= |
51 | # PLEASE DO NOT ADD MORE FLAGS TO THIS FILE | ||||
52 | # ============================================= | ||||
53 | # | ||||
54 | # See comment at the top. |