xref: /aosp_15_r20/external/cronet/build/config/ui.gni (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1# Copyright 2014 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5# =============================================
6#   PLEASE DO NOT ADD MORE FLAGS TO THIS FILE
7# =============================================
8#
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).
13#
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.
19
20import("//build/config/cast.gni")
21import("//build/config/chromeos/args.gni")
22import("//build/config/chromeos/ui_mode.gni")
23import("//build/config/ozone.gni")
24
25declare_args() {
26  # Indicates if Aura is enabled. Aura is a low-level windowing library, sort
27  # of a replacement for GDI or GTK.
28  use_aura = is_win || is_linux || is_chromeos || is_fuchsia
29}
30
31declare_args() {
32  # True means the UI is built using the "views" framework.
33  toolkit_views = is_mac || is_win || is_linux || is_chromeos || is_fuchsia
34
35  use_glib =
36      is_linux && !is_castos &&
37      # Avoid the need for glib when Android is building things via secondary
38      # toolchains.
39      target_os != "android"
40}
41
42assert(!use_glib || (is_linux && !is_castos))
43
44use_atk = use_glib && current_toolchain == default_toolchain
45
46# Whether using Xvfb to provide a display server for a test might be
47# necessary.
48use_xvfb_in_this_config =
49    is_linux || (is_chromeos_lacros && !is_chromeos_device)
50#
51# =============================================
52#   PLEASE DO NOT ADD MORE FLAGS TO THIS FILE
53# =============================================
54#
55# See comment at the top.
56