1fd4e5da5Sopenharmony_ci# Copyright 2018 Google Inc.
2fd4e5da5Sopenharmony_ci#
3fd4e5da5Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
4fd4e5da5Sopenharmony_ci# you may not use this file except in compliance with the License.
5fd4e5da5Sopenharmony_ci# You may obtain a copy of the License at
6fd4e5da5Sopenharmony_ci#
7fd4e5da5Sopenharmony_ci#     https://www.apache.org/licenses/LICENSE-2.0
8fd4e5da5Sopenharmony_ci#
9fd4e5da5Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
10fd4e5da5Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
11fd4e5da5Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12fd4e5da5Sopenharmony_ci# See the License for the specific language governing permissions and
13fd4e5da5Sopenharmony_ci# limitations under the License.
14fd4e5da5Sopenharmony_ci
15fd4e5da5Sopenharmony_ci# Variable that can be used to support multiple build scenarios, like having
16fd4e5da5Sopenharmony_ci# Chromium specific targets in a client project's GN file etc.
17fd4e5da5Sopenharmony_cibuild_with_chromium = false
18fd4e5da5Sopenharmony_ci
19fd4e5da5Sopenharmony_cideclare_args() {
20fd4e5da5Sopenharmony_ci  # Android 32-bit non-component, non-clang builds cannot have symbol_level=2
21fd4e5da5Sopenharmony_ci  # due to 4GiB file size limit, see https://crbug.com/648948.
22fd4e5da5Sopenharmony_ci  # Set this flag to true to skip the assertion.
23fd4e5da5Sopenharmony_ci  ignore_elf32_limitations = false
24fd4e5da5Sopenharmony_ci
25fd4e5da5Sopenharmony_ci  # Use the system install of Xcode for tools like ibtool, libtool, etc.
26fd4e5da5Sopenharmony_ci  # This does not affect the compiler. When this variable is false, targets will
27fd4e5da5Sopenharmony_ci  # instead use a hermetic install of Xcode. [The hermetic install can be
28fd4e5da5Sopenharmony_ci  # obtained with gclient sync after setting the environment variable
29fd4e5da5Sopenharmony_ci  # FORCE_MAC_TOOLCHAIN].
30fd4e5da5Sopenharmony_ci  use_system_xcode = ""
31fd4e5da5Sopenharmony_ci}
32fd4e5da5Sopenharmony_ci
33fd4e5da5Sopenharmony_ciif (use_system_xcode == "") {
34fd4e5da5Sopenharmony_ci  if (target_os == "mac") {
35fd4e5da5Sopenharmony_ci    _result = exec_script("//build/mac/should_use_hermetic_xcode.py",
36fd4e5da5Sopenharmony_ci                          [ target_os ],
37fd4e5da5Sopenharmony_ci                          "value")
38fd4e5da5Sopenharmony_ci    use_system_xcode = _result == 0
39fd4e5da5Sopenharmony_ci  }
40fd4e5da5Sopenharmony_ci  if (target_os == "ios") {
41fd4e5da5Sopenharmony_ci    use_system_xcode = true
42fd4e5da5Sopenharmony_ci  }
43fd4e5da5Sopenharmony_ci}
44