# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This points to the ICU version of this file in ICU, but can point to
# downstream-specific file when included as //third_party dependency.

if (defined(is_fuchsia_tree) && is_fuchsia_tree) {
  # This file is supposed to exist only in the Fuchsia build tree.
  import("//build/icu.gni")
} else {
  declare_args() {
    # Tells icu to load an external data file rather than rely on the icudata
    # being linked directly into the binary.
    icu_use_data_file = true

    # If true, then this creates a stub data file. This should be disabled if
    # a custom data file will be used instead, in order to avoid conflicting
    # symbols.
    icu_use_stub_data = true

    # If true, compile icu into a standalone static library. Currently this is
    # only useful on Chrome OS.
    icu_disable_thin_archive = false

    # If set to nonempty, this is the label of the directory to be used to pull
    # the ICU data files content.  The setting has effect only when building
    # inside the Fuchsia source tree.
    icu_fuchsia_override_data_dir = ""

    # If set, the ":icudata" target will copy the ICU data to $root_build_dir.
    icu_copy_icudata_to_root_build_dir = true

    # Fuchsia sometimes requires extra compilation flags for ICU to adapt it to
    # its current toolchain. Since it takes a while for ICU to roll through
    # Fuchsia, it can take a long time from an ICU commit to a fix rolling into
    # Fuchsia. This flag allows us to define the flag ahead of time in
    # //build/icu.gni, and remove the rollout issues.
    icu_fuchsia_extra_compile_flags = []

    # Similar to above, except it allows adding an entire `config` target.
    icu_fuchsia_extra_configs = []

    # Similar to above, except it allows removing an entire `config` target, if
    # it exists.
    icu_fuchsia_remove_configs = []
  }

  # Set to true if icu is being built from the Fuchsia tree.
  icu_is_in_fuchsia = defined(is_fuchsia_tree) && is_fuchsia_tree
}
