1# Copyright 2017 The ANGLE Project Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5declare_args() { 6 build_with_chromium = false 7 ignore_elf32_limitations = true 8 9 use_system_xcode = "" 10 11 # If true, it assumes that //third_party/abseil-cpp is an available 12 # dependency for googletest. 13 gtest_enable_absl_printers = false 14} 15 16if (host_os == "mac" && use_system_xcode == "") { 17 _result = exec_script("//build/mac/should_use_hermetic_xcode.py", 18 [ target_os ], 19 "value") 20 21 assert(_result != 2, 22 "Do not allow building targets with the default" + 23 "hermetic toolchain if the minimum OS version is not met.") 24 assert(_result != 3, 25 "iOS does not support building with a hermetic toolchain. " + 26 "Please install Xcode.") 27 28 use_system_xcode = _result != 1 29} 30 31enable_java_templates = true 32 33# Build with fewer Android dependencies 34limit_android_deps = true 35 36# Standalone ANGLE is used in places that are extremely performance sensitive, 37# such as the system graphics driver on Android. ANGLE validates arguments at 38# the API boundary and assumes that all bounds, et cetera are valid elsewhere 39# in internal code. 40# 41# Unfortunately, this means the compiler cannot optimize out the vast majority 42# of hardening checks. To ensure performance remains competitive, drop the 43# libc++ hardening checks, since ANGLE already makes no security guarantees in 44# these situations. 45if (is_win) { 46 # TODO(https://crbug.com/1418717): ANGLE uses Chromium's abseil-cpp directory. 47 # Since Abseil does not mark symbols as exported, Chromium uses an alternate 48 # approach to scrape the symbols that need to be exported and generates .def 49 # files that the ANGLE build reuses. 50 # 51 # However, these symbol names include libc++ types, and libc++ hardening 52 # affects ABI, so ANGLE and Chromium's libc++ hardening modes need to remain 53 # in sync on Windows. This is a bit of a hack but "OK" since the performance 54 # concerns for standalone ANGLE builds are not relevant on Windows. 55 enable_safe_libcxx = true 56} else if (is_linux) { 57 # https://anglebug.com/8040: turning off safe_libcxx breaks TSAN 58 enable_safe_libcxx = true 59} else { 60 enable_safe_libcxx = false 61} 62