xref: /aosp_15_r20/external/webrtc/build_overrides/build.gni (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS.  All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9# Some non-Chromium builds don't support building java targets.
10enable_java_templates = true
11
12# Don't set this variable to true when building stadalone WebRTC, it is
13# only needed to support both WebRTC standalone and Chromium builds.
14build_with_chromium = false
15
16# WebRTC checks out google_benchmark by default since it is always used.
17checkout_google_benchmark = true
18
19# Use our own suppressions files.
20asan_suppressions_file = "//build/sanitizers/asan_suppressions.cc"
21lsan_suppressions_file = "//tools_webrtc/sanitizers/lsan_suppressions_webrtc.cc"
22tsan_suppressions_file = "//tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc"
23msan_ignorelist_path =
24    rebase_path("//tools_webrtc/msan/suppressions.txt", root_build_dir)
25ubsan_ignorelist_path =
26    rebase_path("//tools_webrtc/ubsan/suppressions.txt", root_build_dir)
27ubsan_vptr_ignorelist_path =
28    rebase_path("//tools_webrtc/ubsan/vptr_suppressions.txt", root_build_dir)
29
30# For Chromium, Android 32-bit non-component, non-clang builds hit a 4GiB size
31# limit, making them requiring symbol_level=2. WebRTC doesn't hit that problem
32# so we just ignore that assert. See https://crbug.com/648948 for more info.
33ignore_elf32_limitations = true
34
35# Use bundled hermetic Xcode installation maintainted by Chromium,
36# except for local iOS builds where it's unsupported.
37# Allow for mac cross compile on linux machines.
38if (host_os == "mac" || host_os == "linux") {
39  _result = exec_script("//build/mac/should_use_hermetic_xcode.py",
40                        [ target_os ],
41                        "value")
42  assert(_result != 2,
43         "Do not allow building targets with the default " +
44             "hermetic toolchain if the minimum OS version is not met.")
45  use_system_xcode = _result == 0
46}
47
48declare_args() {
49  # WebRTC doesn't depend on //base from production code but only for testing
50  # purposes. In any case, it doesn't depend on //third_party/perfetto which
51  # is used for base tracing, so this feature is disabled.
52  enable_base_tracing = false
53  use_perfetto_client_library = false
54
55  # Limits the defined //third_party/android_deps targets to only "buildCompile"
56  # and "buildCompileNoDeps" targets. This is useful for third-party
57  # repositories which do not use JUnit tests. For instance,
58  # limit_android_deps == true removes "gn gen" requirement for
59  # //third_party/robolectric .
60  limit_android_deps = false
61
62  # If true, it assumes that //third_party/abseil-cpp is an available
63  # dependency for googletest.
64  gtest_enable_absl_printers = true
65}
66