2019-01-28 17:55:20 +03:00
|
|
|
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
|
2014-06-23 23:13:02 +04:00
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
2015-05-26 18:32:58 +03:00
|
|
|
# import the use_x11 variable
|
2017-08-29 05:53:24 +03:00
|
|
|
import("gni/angle.gni")
|
2019-10-04 22:17:49 +03:00
|
|
|
if (angle_has_build) {
|
|
|
|
import("//build/config/linux/pkg_config.gni")
|
|
|
|
import("//build/config/ui.gni")
|
|
|
|
import("//testing/libfuzzer/fuzzer_test.gni")
|
|
|
|
|
|
|
|
if (is_android) {
|
|
|
|
# android/rules.gni can only be imported for Android targets
|
|
|
|
import("//build/config/android/config.gni")
|
|
|
|
import("//build/config/android/rules.gni")
|
|
|
|
import("android/angle_apk.gni")
|
|
|
|
}
|
2018-04-13 02:06:48 +03:00
|
|
|
}
|
2015-05-26 18:32:58 +03:00
|
|
|
|
2017-03-20 20:06:19 +03:00
|
|
|
declare_args() {
|
|
|
|
# Use the PCI lib to collect GPU information on Linux.
|
|
|
|
use_libpci = is_linux && (!is_chromecast || is_cast_desktop_build) &&
|
2019-11-15 20:26:39 +03:00
|
|
|
(angle_use_x11 || use_ozone)
|
2017-12-12 07:58:53 +03:00
|
|
|
|
|
|
|
# Link in system libGL, to work with apitrace. See doc/DebuggingTips.md.
|
|
|
|
angle_link_glx = false
|
2019-07-31 00:22:17 +03:00
|
|
|
|
|
|
|
# Defaults to capture building to $root_out_dir/angle_libs/with_capture.
|
|
|
|
# Switch on to build capture to $root_out_dir.
|
|
|
|
angle_with_capture_by_default = false
|
2019-09-19 00:46:23 +03:00
|
|
|
|
|
|
|
# Don't build extra (test, samples etc) for Windows UWP. We don't have
|
|
|
|
# infrastructure (e.g. windowing helper functions) in place to run them.
|
2019-12-03 22:08:36 +03:00
|
|
|
angle_build_all = !build_with_chromium && !angle_is_winuwp && angle_has_build
|
2020-03-06 17:32:18 +03:00
|
|
|
|
|
|
|
# Enable generating current commit information using git
|
|
|
|
angle_enable_commit_id = true
|
2017-03-20 20:06:19 +03:00
|
|
|
}
|
|
|
|
|
2019-12-03 22:08:36 +03:00
|
|
|
if (angle_build_all) {
|
2017-08-29 05:53:24 +03:00
|
|
|
group("all") {
|
|
|
|
testonly = true
|
|
|
|
deps = [
|
2019-12-03 22:08:36 +03:00
|
|
|
":angle",
|
2017-08-29 05:53:24 +03:00
|
|
|
":angle_shader_translator",
|
|
|
|
":translator_fuzzer",
|
2019-02-07 17:09:41 +03:00
|
|
|
":xxhash_fuzzer",
|
2019-12-03 22:08:36 +03:00
|
|
|
"$angle_root/samples:angle_samples",
|
|
|
|
"$angle_root/src/tests:angle_tests",
|
2017-08-29 05:53:24 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-07 20:17:47 +03:00
|
|
|
if (ozone_platform_gbm) {
|
2016-06-28 00:08:28 +03:00
|
|
|
pkg_config("libdrm") {
|
|
|
|
packages = [ "libdrm" ]
|
|
|
|
}
|
2016-06-13 23:39:01 +03:00
|
|
|
}
|
|
|
|
|
Revert "Enhance ANGLE for Android Developer Options"
This reverts commit fdbdb2b247ffa4cf66bc2cd3a5bb45a056bd88a3.
Reason for revert:
I didn't mean to land this quite yet, since we are still working on the Android side of things. It seems doing CQ+2 merges it while I was trying for just a dry run while replying to Jamie's comments with updates (after checking with Boulder folks, I want CQ+1 next time).
Once the Android changes are ready, I'll work on getting this landed again.
Original change's description:
> Enhance ANGLE for Android Developer Options
>
> Update ANGLE Developer Options
>
> Update ANGLE developer options to allow selecting the OpenGL driver
> (default, ANGLE, native) for each app as well as forcing ANGLE for all
> apps.
>
> Bug: angleproject:2962
> Test: Verify the default/ANGLE/native values are saved and applied and
> used by the loader.
>
> Change-Id: I6041e7e49ca5cc65f90fc8ae6f1b084e4639d769
> Reviewed-on: https://chromium-review.googlesource.com/c/1330315
> Commit-Queue: Tim Van Patten <timvp@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org,cnorthrop@google.com,tobine@google.com,courtneygo@google.com,ianelliott@google.com,timvp@google.com
Change-Id: If3a4e917973c56b858244a0ca7f1b164143524f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2962
Reviewed-on: https://chromium-review.googlesource.com/c/1354099
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
2018-11-28 19:08:11 +03:00
|
|
|
import("src/compiler.gni")
|
2018-11-02 02:47:10 +03:00
|
|
|
import("src/libGLESv2.gni")
|
2014-07-17 01:19:18 +04:00
|
|
|
|
2014-07-23 04:00:17 +04:00
|
|
|
# This config is exported to dependent targets (and also applied to internal
|
|
|
|
# ones).
|
|
|
|
config("external_config") {
|
2016-01-04 19:25:00 +03:00
|
|
|
include_dirs = [ "include" ]
|
2014-07-23 04:00:17 +04:00
|
|
|
}
|
|
|
|
|
2018-12-17 21:13:49 +03:00
|
|
|
# Prevent the GL headers from redeclaring ANGLE entry points.
|
|
|
|
config("no_gl_prototypes") {
|
|
|
|
defines = [
|
|
|
|
"GL_GLES_PROTOTYPES=0",
|
|
|
|
"EGL_EGL_PROTOTYPES=0",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
config("gl_prototypes") {
|
|
|
|
defines = [
|
|
|
|
"GL_GLES_PROTOTYPES=1",
|
|
|
|
"EGL_EGL_PROTOTYPES=1",
|
|
|
|
"GL_GLEXT_PROTOTYPES",
|
|
|
|
"EGL_EGLEXT_PROTOTYPES",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2014-06-23 23:13:02 +04:00
|
|
|
# This config is applied to internal Angle targets (not pushed to dependents).
|
|
|
|
config("internal_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"include",
|
|
|
|
"src",
|
|
|
|
]
|
2017-01-03 19:03:23 +03:00
|
|
|
|
2018-12-17 21:13:49 +03:00
|
|
|
defines = []
|
2017-04-12 16:53:01 +03:00
|
|
|
|
2018-05-19 01:48:50 +03:00
|
|
|
if (angle_64bit_current_cpu) {
|
2017-10-26 00:02:29 +03:00
|
|
|
defines += [ "ANGLE_IS_64_BIT_CPU" ]
|
2018-05-19 01:48:50 +03:00
|
|
|
} else {
|
|
|
|
defines += [ "ANGLE_IS_32_BIT_CPU" ]
|
2017-04-12 16:53:01 +03:00
|
|
|
}
|
2018-08-21 16:48:01 +03:00
|
|
|
|
2018-05-03 20:10:44 +03:00
|
|
|
if (angle_enable_trace) {
|
|
|
|
defines += [ "ANGLE_ENABLE_DEBUG_TRACE=1" ]
|
|
|
|
}
|
2019-10-17 17:18:16 +03:00
|
|
|
|
|
|
|
if (is_chromeos) {
|
|
|
|
defines += [ "ANGLE_PLATFORM_CHROMEOS" ]
|
|
|
|
}
|
2020-01-25 06:41:35 +03:00
|
|
|
|
|
|
|
if (is_ggp) {
|
|
|
|
defines += [ "__ggp__" ]
|
|
|
|
}
|
2014-06-23 23:13:02 +04:00
|
|
|
}
|
|
|
|
|
2019-10-21 15:39:14 +03:00
|
|
|
config("constructor_and_destructor_warnings") {
|
|
|
|
if (is_clang) {
|
|
|
|
cflags = [
|
|
|
|
"-Wexit-time-destructors",
|
|
|
|
"-Wglobal-constructors",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-18 17:10:29 +03:00
|
|
|
config("extra_warnings") {
|
2017-10-11 06:53:20 +03:00
|
|
|
cflags = []
|
2017-08-29 05:53:24 +03:00
|
|
|
|
2016-07-18 17:10:29 +03:00
|
|
|
# Enable more default warnings on Windows.
|
|
|
|
if (is_win) {
|
2017-10-11 06:53:20 +03:00
|
|
|
cflags += [
|
2016-07-18 17:10:29 +03:00
|
|
|
"/we4244", # Conversion: possible loss of data.
|
|
|
|
"/we4456", # Variable shadowing.
|
2016-09-22 20:53:47 +03:00
|
|
|
"/we4458", # declaration hides class member.
|
2019-04-12 21:10:17 +03:00
|
|
|
"/we4715", # not all control paths return a value
|
2017-11-28 21:26:34 +03:00
|
|
|
"/we4800", # forcing value to bool.
|
|
|
|
"/we4838", # narrowing conversion.
|
2016-07-18 17:10:29 +03:00
|
|
|
]
|
|
|
|
}
|
2017-10-11 06:53:20 +03:00
|
|
|
if (is_clang) {
|
2019-01-22 02:09:15 +03:00
|
|
|
cflags += [
|
2019-10-24 19:55:11 +03:00
|
|
|
"-Wconditional-uninitialized",
|
2019-09-02 20:55:59 +03:00
|
|
|
"-Wextra-semi-stmt",
|
2019-07-23 00:26:17 +03:00
|
|
|
"-Wfloat-conversion",
|
2019-10-24 19:55:11 +03:00
|
|
|
"-Winconsistent-missing-destructor-override",
|
2019-10-24 19:55:09 +03:00
|
|
|
"-Wmissing-field-initializers",
|
2020-06-16 19:29:16 +03:00
|
|
|
"-Wnewline-eof",
|
2018-05-09 16:41:39 +03:00
|
|
|
"-Wnon-virtual-dtor",
|
2019-10-24 19:55:09 +03:00
|
|
|
"-Wredundant-parens",
|
2019-10-24 19:55:08 +03:00
|
|
|
"-Wshadow-field",
|
2019-10-24 19:55:07 +03:00
|
|
|
"-Wtautological-type-limit-compare",
|
2019-10-24 19:55:10 +03:00
|
|
|
"-Wundefined-reinterpret-cast",
|
2019-02-01 22:16:32 +03:00
|
|
|
"-Wunneeded-internal-declaration",
|
2019-08-08 03:05:35 +03:00
|
|
|
|
|
|
|
# The below warnings are used by WebKit. We enable them to make rolling
|
|
|
|
# ANGLE in WebKit easier.
|
|
|
|
"-Wparentheses",
|
|
|
|
"-Wrange-loop-analysis",
|
|
|
|
"-Wstrict-prototypes",
|
|
|
|
"-Wunreachable-code",
|
2019-08-07 03:17:19 +03:00
|
|
|
"-Wshorten-64-to-32",
|
2018-01-31 18:47:14 +03:00
|
|
|
]
|
2017-10-11 06:53:20 +03:00
|
|
|
}
|
2019-09-19 00:46:23 +03:00
|
|
|
|
|
|
|
if (angle_is_winuwp) {
|
|
|
|
cflags += [ "/wd4447" ] # 'main' signature found without threading model.
|
|
|
|
}
|
2016-07-18 17:10:29 +03:00
|
|
|
}
|
|
|
|
|
2018-05-15 22:35:15 +03:00
|
|
|
# This config adds build-ids to the associated library.
|
|
|
|
# -Wl is a special option that indicates that clang should pass the associated
|
|
|
|
# option --build-id to the linker. This will cause a build-id section to be added
|
|
|
|
# to the associated library. The build-id makes it possible for a debugger to
|
|
|
|
# find the right symbol file to use.
|
|
|
|
config("build_id_config") {
|
|
|
|
ldflags = [ "-Wl,--build-id" ]
|
|
|
|
}
|
|
|
|
|
2019-06-03 22:21:47 +03:00
|
|
|
# Useful for more informative stack traces.
|
|
|
|
config("better_linux_stack_traces") {
|
|
|
|
if (angle_better_stack_traces) {
|
|
|
|
ldflags = [ "-Wl,--export-dynamic" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-04 22:17:49 +03:00
|
|
|
_use_copy_compiler_dll = angle_has_build && is_win && target_cpu != "arm64"
|
|
|
|
|
2018-12-01 04:01:01 +03:00
|
|
|
# Windows ARM64 is available since 10.0.16299 so no need to copy
|
|
|
|
# d3dcompiler_47.dll because this file is available as inbox.
|
2019-10-04 22:17:49 +03:00
|
|
|
if (_use_copy_compiler_dll) {
|
2019-02-22 18:24:44 +03:00
|
|
|
# We also ship an older DLL for compatiblity with Windows 7 machines without
|
|
|
|
# the UCRT. This DLL isn't available in the standard SDK distribution.
|
|
|
|
_old_compiler = "$windows_sdk_path/Redist/D3D/$target_cpu/d3dcompiler_old.dll"
|
|
|
|
_has_old_compiler =
|
|
|
|
exec_script("scripts/file_exists.py", [ _old_compiler ], "value")
|
|
|
|
|
2015-02-25 16:34:49 +03:00
|
|
|
copy("copy_compiler_dll") {
|
2020-02-05 08:31:47 +03:00
|
|
|
sources = [ "$windows_sdk_path/Redist/D3D/$target_cpu/d3dcompiler_47.dll" ]
|
2019-02-22 18:24:44 +03:00
|
|
|
|
|
|
|
if (_has_old_compiler) {
|
|
|
|
sources += [ _old_compiler ]
|
|
|
|
}
|
|
|
|
|
2020-02-05 08:31:47 +03:00
|
|
|
outputs = [ "$root_out_dir/{{source_file_part}}" ]
|
2015-02-25 16:34:49 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-05 18:07:41 +03:00
|
|
|
# Holds the shared includes so we only need to list them once.
|
2019-02-07 23:26:10 +03:00
|
|
|
config("includes_config") {
|
|
|
|
include_dirs = [ "include" ]
|
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_source_set("includes") {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources = libangle_includes
|
2019-02-07 23:26:10 +03:00
|
|
|
public_configs = [ ":includes_config" ]
|
2014-06-23 23:13:02 +04:00
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_static_library("preprocessor") {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources = angle_preprocessor_sources
|
2014-06-23 23:13:02 +04:00
|
|
|
|
2016-09-21 00:15:59 +03:00
|
|
|
public_deps = [
|
|
|
|
":angle_common",
|
2019-10-03 23:22:52 +03:00
|
|
|
":angle_translator_headers",
|
2016-09-21 00:15:59 +03:00
|
|
|
]
|
2014-06-23 23:13:02 +04:00
|
|
|
}
|
|
|
|
|
2019-01-17 20:25:54 +03:00
|
|
|
config("angle_disable_pool_alloc") {
|
|
|
|
defines = [ "ANGLE_DISABLE_POOL_ALLOC" ]
|
2014-08-07 20:31:38 +04:00
|
|
|
}
|
|
|
|
|
2015-06-17 01:03:14 +03:00
|
|
|
config("debug_annotations_config") {
|
2019-03-06 19:32:40 +03:00
|
|
|
if (is_debug) {
|
2016-01-04 19:25:00 +03:00
|
|
|
defines = [ "ANGLE_ENABLE_DEBUG_ANNOTATIONS" ]
|
2015-06-17 01:03:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-27 15:35:36 +03:00
|
|
|
config("angle_release_asserts_config") {
|
|
|
|
if (dcheck_always_on) {
|
|
|
|
defines = [ "ANGLE_ENABLE_RELEASE_ASSERTS" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-06-02 20:04:10 +03:00
|
|
|
config("angle_common_config") {
|
2017-06-07 21:59:51 +03:00
|
|
|
include_dirs = [ "src/common/third_party/base" ]
|
2018-01-28 02:27:07 +03:00
|
|
|
if (is_android) {
|
|
|
|
libs = [ "log" ]
|
|
|
|
}
|
2016-06-02 20:04:10 +03:00
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_source_set("angle_system_utils") {
|
2018-12-17 21:13:49 +03:00
|
|
|
sources = angle_system_utils_sources
|
|
|
|
}
|
2018-12-16 22:53:23 +03:00
|
|
|
|
2019-02-01 22:16:32 +03:00
|
|
|
angle_source_set("xxhash") {
|
|
|
|
sources = xxhash_sources
|
|
|
|
}
|
|
|
|
|
2019-10-04 22:17:49 +03:00
|
|
|
if (angle_has_build) {
|
|
|
|
fuzzer_test("xxhash_fuzzer") {
|
2020-02-05 08:31:47 +03:00
|
|
|
sources = [ "src/common/third_party/xxhash/xxhash_fuzzer.cpp" ]
|
|
|
|
deps = [ ":xxhash" ]
|
2019-10-04 22:17:49 +03:00
|
|
|
}
|
2019-02-07 17:09:41 +03:00
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_static_library("angle_common") {
|
2018-12-17 21:13:49 +03:00
|
|
|
sources = libangle_common_sources
|
2018-12-16 22:53:23 +03:00
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
configs += [
|
2016-06-02 20:04:10 +03:00
|
|
|
":angle_common_config",
|
2015-06-17 01:03:14 +03:00
|
|
|
":debug_annotations_config",
|
2015-01-14 22:31:02 +03:00
|
|
|
]
|
2016-04-06 23:39:52 +03:00
|
|
|
|
2020-02-05 08:31:47 +03:00
|
|
|
deps = [ ":xxhash" ]
|
2019-02-01 22:16:32 +03:00
|
|
|
|
2016-05-20 00:59:55 +03:00
|
|
|
public_deps = [
|
2018-12-17 21:13:49 +03:00
|
|
|
":angle_system_utils",
|
|
|
|
":angle_version",
|
2018-02-21 16:28:01 +03:00
|
|
|
":includes",
|
2016-05-20 00:59:55 +03:00
|
|
|
]
|
2019-01-16 02:33:42 +03:00
|
|
|
public_configs += [ ":angle_common_config" ]
|
2019-10-04 22:17:49 +03:00
|
|
|
if (angle_has_build && use_fuzzing_engine) {
|
2019-10-17 14:56:53 +03:00
|
|
|
all_dependent_configs = [ ":angle_disable_pool_alloc" ]
|
2019-01-17 20:25:54 +03:00
|
|
|
}
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
|
|
|
|
2016-06-13 22:06:31 +03:00
|
|
|
config("angle_image_util_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"include",
|
|
|
|
"src",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-10-03 23:22:52 +03:00
|
|
|
angle_source_set("angle_image_util_headers") {
|
|
|
|
sources = libangle_image_util_headers
|
2020-02-05 08:31:47 +03:00
|
|
|
public_deps = [ ":angle_common" ]
|
2019-10-03 23:22:52 +03:00
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_static_library("angle_image_util") {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources = libangle_image_util_sources
|
2019-01-16 02:33:42 +03:00
|
|
|
public_configs += [ ":angle_image_util_config" ]
|
2020-02-05 08:31:47 +03:00
|
|
|
public_deps = [ ":angle_image_util_headers" ]
|
2016-06-13 22:06:31 +03:00
|
|
|
}
|
|
|
|
|
2018-10-09 04:25:19 +03:00
|
|
|
config("angle_gl_visibility_config") {
|
|
|
|
if (is_win) {
|
|
|
|
defines = [
|
|
|
|
"GL_APICALL=",
|
|
|
|
"GL_API=",
|
|
|
|
]
|
|
|
|
} else {
|
|
|
|
defines = [
|
|
|
|
"GL_APICALL=__attribute__((visibility(\"default\")))",
|
|
|
|
"GL_API=__attribute__((visibility(\"default\")))",
|
|
|
|
]
|
2018-10-09 01:43:43 +03:00
|
|
|
}
|
2018-08-30 02:04:15 +03:00
|
|
|
}
|
|
|
|
|
2017-02-08 18:43:47 +03:00
|
|
|
config("angle_gpu_info_util_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"include",
|
|
|
|
"src",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_static_library("angle_gpu_info_util") {
|
2019-04-25 17:49:05 +03:00
|
|
|
public_configs += [
|
|
|
|
":angle_gpu_info_util_config",
|
|
|
|
":angle_backend_config",
|
|
|
|
]
|
2020-02-05 08:31:47 +03:00
|
|
|
public_deps = [ ":angle_common" ]
|
2018-08-30 00:31:27 +03:00
|
|
|
sources = libangle_gpu_info_util_sources
|
2017-02-08 18:43:47 +03:00
|
|
|
deps = []
|
|
|
|
libs = []
|
|
|
|
defines = []
|
|
|
|
|
2020-01-25 01:27:01 +03:00
|
|
|
if (is_android || is_fuchsia) {
|
|
|
|
sources += libangle_gpu_info_util_vulkan_sources
|
2020-04-07 19:59:23 +03:00
|
|
|
deps += [ "$angle_root/third_party/vulkan-headers/src:vulkan_headers" ]
|
2020-01-25 01:27:01 +03:00
|
|
|
}
|
|
|
|
|
2018-06-23 00:42:09 +03:00
|
|
|
if (is_android) {
|
2020-01-25 01:27:01 +03:00
|
|
|
sources += libangle_gpu_info_util_android_sources
|
|
|
|
}
|
|
|
|
|
|
|
|
if (is_fuchsia) {
|
|
|
|
sources += libangle_gpu_info_util_fuchsia_sources
|
2020-06-16 21:27:04 +03:00
|
|
|
deps += [ "$angle_root/src/common/vulkan:angle_vulkan_entry_points" ]
|
2018-06-23 00:42:09 +03:00
|
|
|
}
|
|
|
|
|
2017-03-24 21:58:59 +03:00
|
|
|
if (is_win) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_gpu_info_util_win_sources
|
2019-09-19 00:46:23 +03:00
|
|
|
if (!angle_is_winuwp) {
|
|
|
|
libs += [ "setupapi.lib" ]
|
|
|
|
}
|
2019-04-25 17:49:05 +03:00
|
|
|
libs += [ "dxgi.lib" ]
|
2017-03-24 21:58:59 +03:00
|
|
|
}
|
|
|
|
|
2020-01-25 01:27:01 +03:00
|
|
|
if (is_linux) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_gpu_info_util_linux_sources
|
2017-02-08 18:43:47 +03:00
|
|
|
|
2019-11-15 20:26:39 +03:00
|
|
|
if (angle_use_x11) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_gpu_info_util_x11_sources
|
2017-02-08 18:43:47 +03:00
|
|
|
deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ]
|
|
|
|
defines += [ "GPU_INFO_USE_X11" ]
|
|
|
|
libs += [
|
|
|
|
"X11",
|
|
|
|
"Xi",
|
|
|
|
"Xext",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (use_libpci) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_gpu_info_util_libpci_sources
|
2017-02-08 18:43:47 +03:00
|
|
|
defines += [ "GPU_INFO_USE_LIBPCI" ]
|
|
|
|
libs += [ "pci" ]
|
|
|
|
}
|
2017-02-16 18:58:46 +03:00
|
|
|
|
|
|
|
if (is_mac) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_gpu_info_util_mac_sources
|
2017-02-16 18:58:46 +03:00
|
|
|
libs += [
|
|
|
|
"IOKit.framework",
|
|
|
|
"CoreFoundation.framework",
|
2017-10-11 18:38:55 +03:00
|
|
|
"CoreGraphics.framework",
|
Reland "Make Mac SystemInfo reflect the currently active GPU on dual GPU machines"
This reverts commit 58940f67acd5b89f1c338b134a596864595fcdca.
Reason for revert: pixel test failures have been triaged in Gold. Relanding.
Original change's description:
> Revert "Make Mac SystemInfo reflect the currently active GPU on dual GPU machines"
>
> This reverts commit 720a8bab0eca86e5b9b8c07c200a217fb2c65755.
>
> Reason for revert: pixel test failures per http://crbug.com/984780#c13
>
> Original change's description:
> > Make Mac SystemInfo reflect the currently active GPU on dual GPU machines
> >
> > Currently, the GetSystemInfo() function (in gpu_info_util/SystemInfo_mac.mm)
> > on dual GPU Macs always updates the active GPU field of the SystemInfo
> > instance to the first non-Intel GPU it finds. This change overrides the
> > activeGPUIndex field of the SystemInfo instance to reflect the current GPU
> > instead of the non-intel GPU.
> >
> > Bug: 985486, 984780, angleproject:3701
> > Change-Id: Ia93f38f4a2f7728c05e99c83a940722bd3808766
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1752334
> > Commit-Queue: Kenneth Russell <kbr@chromium.org>
> > Reviewed-by: Zhenyao Mo <zmo@chromium.org>
> > Reviewed-by: Kenneth Russell <kbr@chromium.org>
>
> TBR=zmo@chromium.org,geofflang@chromium.org,kbr@chromium.org,dakshidnani@google.com
>
> Change-Id: Iacf4b8433ac1aa4d30c51f08ddfc6489af440cc4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 985486, 984780, angleproject:3701
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1757373
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Bug: 985486, 984780, angleproject:3701
Change-Id: I8f2f26f68329a2826a92742c46471b8c092b36ed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1765963
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2019-08-23 00:12:08 +03:00
|
|
|
"OpenGL.framework",
|
2017-02-16 18:58:46 +03:00
|
|
|
]
|
|
|
|
}
|
2017-02-08 18:43:47 +03:00
|
|
|
}
|
|
|
|
|
2019-10-03 23:22:52 +03:00
|
|
|
angle_source_set("angle_translator_headers") {
|
|
|
|
sources = angle_translator_exported_headers
|
2020-02-05 08:31:47 +03:00
|
|
|
public_deps = [ ":includes" ]
|
2019-10-03 23:22:52 +03:00
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_static_library("translator") {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources = angle_translator_sources
|
2015-12-11 20:30:15 +03:00
|
|
|
defines = []
|
|
|
|
|
2017-10-10 02:14:06 +03:00
|
|
|
if (angle_enable_essl || use_fuzzing_engine) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += angle_translator_essl_sources
|
2015-12-11 20:30:15 +03:00
|
|
|
defines += [ "ANGLE_ENABLE_ESSL" ]
|
|
|
|
}
|
|
|
|
|
2017-10-10 02:14:06 +03:00
|
|
|
if (angle_enable_glsl || use_fuzzing_engine) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += angle_translator_glsl_sources
|
2015-12-11 20:30:15 +03:00
|
|
|
defines += [ "ANGLE_ENABLE_GLSL" ]
|
|
|
|
}
|
2014-06-23 23:13:02 +04:00
|
|
|
|
2017-10-10 02:14:06 +03:00
|
|
|
if (angle_enable_hlsl || use_fuzzing_engine) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += angle_translator_hlsl_sources
|
2015-12-11 20:30:15 +03:00
|
|
|
defines += [ "ANGLE_ENABLE_HLSL" ]
|
2015-02-25 16:34:49 +03:00
|
|
|
}
|
2017-01-14 01:29:51 +03:00
|
|
|
|
2019-10-09 19:44:01 +03:00
|
|
|
if (angle_enable_vulkan || use_fuzzing_engine || angle_enable_metal) {
|
|
|
|
# This translator is needed by metal backend also.
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += angle_translator_lib_vulkan_sources
|
2019-10-09 19:44:01 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
if (angle_enable_vulkan || use_fuzzing_engine) {
|
2017-01-14 01:29:51 +03:00
|
|
|
defines += [ "ANGLE_ENABLE_VULKAN" ]
|
|
|
|
}
|
|
|
|
|
2019-10-09 19:44:01 +03:00
|
|
|
if (angle_enable_metal) {
|
|
|
|
sources += angle_translator_lib_metal_sources
|
|
|
|
defines += [ "ANGLE_ENABLE_METAL" ]
|
|
|
|
}
|
|
|
|
|
2019-10-25 19:53:40 +03:00
|
|
|
if (angle_enable_swiftshader) {
|
|
|
|
defines += [ "ANGLE_ENABLE_SWIFTSHADER" ]
|
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
public_configs += [ ":external_config" ]
|
2014-06-23 23:13:02 +04:00
|
|
|
|
|
|
|
deps = [
|
|
|
|
":includes",
|
|
|
|
":preprocessor",
|
|
|
|
]
|
2015-01-14 22:31:02 +03:00
|
|
|
|
|
|
|
public_deps = [
|
|
|
|
":angle_common",
|
2019-10-03 23:22:52 +03:00
|
|
|
":angle_translator_headers",
|
2015-01-14 22:31:02 +03:00
|
|
|
]
|
2016-07-18 20:47:12 +03:00
|
|
|
|
|
|
|
if (is_win) {
|
|
|
|
# Necessary to suppress some system header xtree warnigns in Release.
|
|
|
|
# For some reason this warning doesn't get triggered in Chromium
|
|
|
|
cflags = [ "/wd4718" ]
|
|
|
|
}
|
2014-06-23 23:13:02 +04:00
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_source_set("translator_fuzzer") {
|
2020-02-05 08:31:47 +03:00
|
|
|
sources = [ "src/compiler/fuzz/translator_fuzzer.cpp" ]
|
2016-06-16 17:24:50 +03:00
|
|
|
|
|
|
|
include_dirs = [
|
|
|
|
"include",
|
|
|
|
"src",
|
|
|
|
]
|
|
|
|
|
2020-02-05 08:31:47 +03:00
|
|
|
deps = [ ":translator" ]
|
2016-06-16 17:24:50 +03:00
|
|
|
}
|
|
|
|
|
2014-06-23 23:13:02 +04:00
|
|
|
config("commit_id_config") {
|
|
|
|
include_dirs = [ "$root_gen_dir/angle" ]
|
2018-12-17 22:04:10 +03:00
|
|
|
visibility = [ ":commit_id" ]
|
|
|
|
}
|
|
|
|
|
2020-02-24 22:13:40 +03:00
|
|
|
commit_id_output_file = "$root_gen_dir/angle/commit.h"
|
|
|
|
action("commit_id") {
|
|
|
|
script = "src/commit_id.py"
|
|
|
|
outputs = [ commit_id_output_file ]
|
2014-06-23 23:13:02 +04:00
|
|
|
|
2020-02-24 22:13:40 +03:00
|
|
|
# Add git as a dependency if it is available.
|
2020-03-06 19:02:31 +03:00
|
|
|
if (angle_enable_commit_id &&
|
|
|
|
exec_script("src/commit_id.py", [ "check" ], "value") == 1) {
|
2020-03-02 17:41:22 +03:00
|
|
|
# commit id should depend on angle's HEAD revision
|
|
|
|
inputs = [ ".git/HEAD" ]
|
2020-02-26 03:33:21 +03:00
|
|
|
}
|
2020-02-24 22:13:40 +03:00
|
|
|
|
|
|
|
args = [
|
|
|
|
"gen",
|
|
|
|
rebase_path(commit_id_output_file, root_build_dir),
|
|
|
|
]
|
|
|
|
|
|
|
|
public_configs = [ ":commit_id_config" ]
|
2014-06-23 23:13:02 +04:00
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_source_set("angle_version") {
|
2020-02-05 08:31:47 +03:00
|
|
|
sources = [ "src/common/version.h" ]
|
|
|
|
public_deps = [ ":commit_id" ]
|
2018-12-17 21:13:49 +03:00
|
|
|
}
|
|
|
|
|
2019-04-25 17:49:05 +03:00
|
|
|
config("angle_backend_config") {
|
2015-01-14 22:31:02 +03:00
|
|
|
defines = []
|
2019-04-25 17:49:05 +03:00
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
if (angle_enable_d3d9) {
|
|
|
|
defines += [ "ANGLE_ENABLE_D3D9" ]
|
|
|
|
}
|
|
|
|
if (angle_enable_d3d11) {
|
|
|
|
defines += [ "ANGLE_ENABLE_D3D11" ]
|
2014-11-19 22:20:15 +03:00
|
|
|
}
|
2015-02-13 23:41:41 +03:00
|
|
|
if (angle_enable_gl) {
|
|
|
|
defines += [ "ANGLE_ENABLE_OPENGL" ]
|
2017-10-22 05:19:40 +03:00
|
|
|
if (angle_enable_gl_null) {
|
|
|
|
defines += [ "ANGLE_ENABLE_OPENGL_NULL" ]
|
|
|
|
}
|
2015-05-26 18:32:58 +03:00
|
|
|
}
|
2016-09-23 22:56:30 +03:00
|
|
|
if (angle_enable_null) {
|
|
|
|
defines += [ "ANGLE_ENABLE_NULL" ]
|
|
|
|
}
|
2020-06-05 02:53:36 +03:00
|
|
|
if (angle_delegate_workers) {
|
|
|
|
defines += [ "ANGLE_DELEGATE_WORKERS" ]
|
|
|
|
}
|
2019-10-03 23:22:52 +03:00
|
|
|
|
2019-10-25 19:53:40 +03:00
|
|
|
configs = []
|
|
|
|
|
2019-10-09 19:44:01 +03:00
|
|
|
if (angle_enable_metal) {
|
2019-10-25 19:53:40 +03:00
|
|
|
configs += [ "src/libANGLE/renderer/metal:angle_metal_backend_config" ]
|
2019-10-09 19:44:01 +03:00
|
|
|
}
|
|
|
|
|
2019-10-03 23:22:52 +03:00
|
|
|
if (angle_enable_vulkan) {
|
2019-10-25 19:53:40 +03:00
|
|
|
configs += [ "src/libANGLE/renderer/vulkan:angle_vulkan_backend_config" ]
|
2019-10-03 23:22:52 +03:00
|
|
|
}
|
2019-04-25 17:49:05 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
config("libANGLE_config") {
|
|
|
|
cflags = []
|
|
|
|
defines = []
|
|
|
|
libs = []
|
|
|
|
ldflags = []
|
|
|
|
if (angle_enable_d3d9) {
|
|
|
|
ldflags += [ "/DELAYLOAD:d3d9.dll" ]
|
|
|
|
}
|
2017-01-03 19:03:23 +03:00
|
|
|
defines += [ "LIBANGLE_IMPLEMENTATION" ]
|
2015-09-02 17:30:55 +03:00
|
|
|
|
2015-02-12 21:39:56 +03:00
|
|
|
if (is_win) {
|
2020-02-05 08:31:47 +03:00
|
|
|
cflags += [ "/wd4530" ] # C++ exception handler used, but unwind semantics
|
|
|
|
# are not enabled.
|
2015-02-12 21:39:56 +03:00
|
|
|
}
|
2018-11-28 18:09:39 +03:00
|
|
|
|
|
|
|
if (is_android && (angle_enable_gl || angle_enable_vulkan)) {
|
2019-02-12 20:41:01 +03:00
|
|
|
# In API level 26 ANativeWindow APIs were moved from libandroid.so
|
|
|
|
# into a separate library, libnativewindow.so
|
|
|
|
if (ndk_api_level_at_least_26) {
|
2018-11-28 18:09:39 +03:00
|
|
|
libs += [ "nativewindow" ]
|
|
|
|
} else {
|
|
|
|
libs += [ "android" ]
|
|
|
|
}
|
|
|
|
}
|
2019-08-22 03:03:49 +03:00
|
|
|
|
2019-11-15 20:26:39 +03:00
|
|
|
if (angle_use_x11) {
|
2019-08-22 03:03:49 +03:00
|
|
|
defines += [ "ANGLE_USE_X11" ]
|
|
|
|
}
|
2020-01-28 18:05:36 +03:00
|
|
|
|
|
|
|
if (angle_enable_overlay) {
|
|
|
|
defines += [ "ANGLE_ENABLE_OVERLAY=1" ]
|
|
|
|
}
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
2014-11-19 22:20:15 +03:00
|
|
|
|
2019-10-03 23:22:52 +03:00
|
|
|
angle_source_set("libANGLE_headers") {
|
|
|
|
sources = libangle_headers
|
|
|
|
public_deps = [
|
|
|
|
":angle_common",
|
|
|
|
":angle_translator_headers",
|
|
|
|
]
|
2020-01-28 18:05:36 +03:00
|
|
|
public_configs += [ ":libANGLE_config" ]
|
2018-02-06 17:54:02 +03:00
|
|
|
}
|
|
|
|
|
2019-10-28 18:48:46 +03:00
|
|
|
# Don't even try to build glslang if Metal and Vulkan are disabled.
|
|
|
|
if (angle_enable_vulkan || angle_enable_metal) {
|
|
|
|
angle_source_set("angle_glslang_wrapper") {
|
|
|
|
sources = [
|
|
|
|
"src/libANGLE/renderer/glslang_wrapper_utils.cpp",
|
|
|
|
"src/libANGLE/renderer/glslang_wrapper_utils.h",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":libANGLE_headers",
|
|
|
|
"${angle_glslang_dir}:glslang_default_resource_limits_sources",
|
|
|
|
"${angle_glslang_dir}:glslang_sources",
|
2020-01-14 22:12:31 +03:00
|
|
|
"${angle_spirv_headers_dir}:spv_headers",
|
|
|
|
"${angle_spirv_tools_dir}:spvtools_headers",
|
2019-10-28 18:48:46 +03:00
|
|
|
]
|
|
|
|
}
|
2019-10-14 09:49:49 +03:00
|
|
|
}
|
|
|
|
|
2019-07-31 00:22:17 +03:00
|
|
|
angle_source_set("libANGLE_base") {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources = libangle_sources
|
2015-01-14 22:31:02 +03:00
|
|
|
|
2017-06-07 21:59:51 +03:00
|
|
|
include_dirs = []
|
2015-01-14 22:31:02 +03:00
|
|
|
libs = []
|
2016-11-11 16:25:44 +03:00
|
|
|
defines = []
|
2017-12-12 07:58:53 +03:00
|
|
|
if (angle_link_glx) {
|
|
|
|
libs += [ "GL" ]
|
|
|
|
defines += [ "ANGLE_LINK_GLX" ]
|
|
|
|
}
|
2016-06-02 20:04:10 +03:00
|
|
|
public_deps = [
|
2016-03-01 00:37:04 +03:00
|
|
|
":angle_common",
|
2018-12-17 22:04:10 +03:00
|
|
|
":angle_gpu_info_util",
|
2018-12-17 21:13:49 +03:00
|
|
|
":angle_version",
|
2019-10-03 23:22:52 +03:00
|
|
|
":libANGLE_headers",
|
2018-12-17 22:04:10 +03:00
|
|
|
":translator",
|
2016-06-02 20:04:10 +03:00
|
|
|
]
|
|
|
|
deps = [
|
2020-06-03 03:01:24 +03:00
|
|
|
":angle_compression",
|
2017-02-15 21:57:16 +03:00
|
|
|
":angle_image_util",
|
2016-03-01 00:37:04 +03:00
|
|
|
":includes",
|
|
|
|
]
|
|
|
|
|
2019-10-24 19:55:12 +03:00
|
|
|
if (is_win) {
|
2019-11-20 09:50:36 +03:00
|
|
|
if (angle_enable_d3d9) {
|
|
|
|
libs += [ "delayimp.lib" ]
|
|
|
|
}
|
2019-10-24 19:55:12 +03:00
|
|
|
libs += [
|
|
|
|
"gdi32.lib",
|
|
|
|
"user32.lib",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-10-03 23:22:52 +03:00
|
|
|
if (angle_enable_vulkan) {
|
|
|
|
public_deps += [ "src/libANGLE/renderer/vulkan:angle_vulkan_backend" ]
|
|
|
|
}
|
|
|
|
|
2019-10-09 19:44:01 +03:00
|
|
|
if (angle_enable_metal) {
|
|
|
|
public_deps += [ "src/libANGLE/renderer/metal:angle_metal_backend" ]
|
|
|
|
}
|
|
|
|
|
2019-01-16 03:06:47 +03:00
|
|
|
# Enable extra Chromium style warnings for libANGLE.
|
2019-10-24 16:29:18 +03:00
|
|
|
if (is_clang && angle_has_build) {
|
2019-01-16 03:06:47 +03:00
|
|
|
suppressed_configs -= [ "//build/config/clang:find_bad_constructs" ]
|
|
|
|
}
|
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
# Shared D3D sources.
|
|
|
|
if (angle_enable_d3d9 || angle_enable_d3d11) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_d3d_shared_sources
|
2014-06-23 23:13:02 +04:00
|
|
|
|
2016-01-04 19:25:00 +03:00
|
|
|
defines += [ "ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ " + "\"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" ]
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
2014-11-19 22:20:15 +03:00
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
if (angle_enable_d3d9) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_d3d9_sources
|
2015-01-14 22:31:02 +03:00
|
|
|
libs += [ "d3d9.lib" ]
|
2015-01-09 19:51:16 +03:00
|
|
|
}
|
2015-01-07 21:22:02 +03:00
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
if (angle_enable_d3d11) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_d3d11_sources
|
2019-09-19 00:46:23 +03:00
|
|
|
|
|
|
|
if (angle_is_winuwp) {
|
|
|
|
sources += libangle_d3d11_winuwp_sources
|
|
|
|
} else {
|
|
|
|
sources += libangle_d3d11_win32_sources
|
|
|
|
}
|
|
|
|
|
2016-08-23 19:29:22 +03:00
|
|
|
libs += [ "dxguid.lib" ]
|
2018-10-10 19:07:12 +03:00
|
|
|
import("src/libANGLE/renderer/d3d/d3d11/d3d11_blit_shaders_autogen.gni")
|
|
|
|
sources += libangle_d3d11_blit_shaders
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
2015-01-07 21:22:02 +03:00
|
|
|
|
2015-02-13 23:41:41 +03:00
|
|
|
if (angle_enable_gl) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_gl_sources
|
2015-02-13 23:41:41 +03:00
|
|
|
include_dirs += [ "src/third_party/khronos" ]
|
|
|
|
|
2017-10-22 05:19:40 +03:00
|
|
|
if (angle_enable_gl_null) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_gl_null_sources
|
2017-10-22 05:19:40 +03:00
|
|
|
}
|
2015-02-13 23:41:41 +03:00
|
|
|
if (is_win) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_gl_wgl_sources
|
2015-02-13 23:41:41 +03:00
|
|
|
}
|
2019-11-15 20:26:39 +03:00
|
|
|
if (angle_use_x11) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_gl_glx_sources
|
2016-05-20 00:59:55 +03:00
|
|
|
deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ]
|
2016-03-01 00:37:04 +03:00
|
|
|
libs += [
|
|
|
|
"X11",
|
|
|
|
"Xi",
|
|
|
|
"Xext",
|
|
|
|
]
|
2015-05-14 17:54:18 +03:00
|
|
|
}
|
2016-05-14 00:27:57 +03:00
|
|
|
if (is_mac) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_gl_cgl_sources
|
2016-05-14 00:27:57 +03:00
|
|
|
libs += [
|
|
|
|
"Cocoa.framework",
|
|
|
|
"IOSurface.framework",
|
|
|
|
"OpenGL.framework",
|
|
|
|
"QuartzCore.framework",
|
|
|
|
]
|
|
|
|
}
|
2016-06-03 07:18:38 +03:00
|
|
|
if (is_android) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_gl_egl_sources
|
|
|
|
sources += libangle_gl_egl_dl_sources
|
|
|
|
sources += libangle_gl_egl_android_sources
|
2016-06-03 07:18:38 +03:00
|
|
|
}
|
2020-02-05 08:31:47 +03:00
|
|
|
if (is_linux) {
|
|
|
|
sources += libangle_gl_egl_sources
|
|
|
|
sources += libangle_gl_egl_dl_sources
|
|
|
|
}
|
2016-07-07 20:17:47 +03:00
|
|
|
if (ozone_platform_gbm) {
|
2016-06-13 23:39:01 +03:00
|
|
|
configs += [ ":libdrm" ]
|
2020-05-21 13:17:21 +03:00
|
|
|
defines += [ "ANGLE_USE_GBM" ]
|
2016-06-13 23:39:01 +03:00
|
|
|
deps += [ "//third_party/minigbm" ]
|
2020-05-21 13:17:21 +03:00
|
|
|
sources += libangle_gl_gbm_sources
|
2016-06-13 23:39:01 +03:00
|
|
|
}
|
2015-02-13 23:41:41 +03:00
|
|
|
}
|
|
|
|
|
2016-09-23 22:56:30 +03:00
|
|
|
if (angle_enable_null) {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources += libangle_null_sources
|
2016-09-23 22:56:30 +03:00
|
|
|
}
|
|
|
|
|
2019-07-09 22:39:39 +03:00
|
|
|
if (is_mac) {
|
|
|
|
sources += libangle_mac_sources
|
|
|
|
}
|
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
if (is_debug) {
|
2016-01-04 19:25:00 +03:00
|
|
|
defines += [ "ANGLE_GENERATE_SHADER_DEBUG_INFO" ]
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
2015-01-07 21:22:02 +03:00
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
configs += [ ":debug_annotations_config" ]
|
2019-04-25 17:49:05 +03:00
|
|
|
public_configs += [
|
|
|
|
":libANGLE_config",
|
|
|
|
":angle_backend_config",
|
|
|
|
]
|
2017-01-03 19:03:23 +03:00
|
|
|
|
2018-12-01 04:01:01 +03:00
|
|
|
# Windows ARM64 is available since 10.0.16299 so no need to copy
|
|
|
|
# d3dcompiler_47.dll because this file is available as inbox.
|
2019-10-04 22:17:49 +03:00
|
|
|
if (_use_copy_compiler_dll) {
|
2020-02-05 08:31:47 +03:00
|
|
|
data_deps = [ ":copy_compiler_dll" ]
|
2015-01-14 01:52:17 +03:00
|
|
|
}
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
2015-01-13 19:13:56 +03:00
|
|
|
|
2019-07-31 00:22:17 +03:00
|
|
|
config("angle_frame_capture_disabled") {
|
|
|
|
defines = [ "ANGLE_CAPTURE_ENABLED=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
config("angle_frame_capture_enabled") {
|
|
|
|
defines = [ "ANGLE_CAPTURE_ENABLED=1" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
angle_source_set("libANGLE") {
|
2020-02-05 08:31:47 +03:00
|
|
|
public_deps = [ ":libANGLE_base" ]
|
2019-07-31 00:22:17 +03:00
|
|
|
public_configs = [ ":angle_frame_capture_disabled" ]
|
2020-02-05 08:31:47 +03:00
|
|
|
sources = [ "src/libANGLE/FrameCapture_mock.cpp" ]
|
2019-08-09 19:03:24 +03:00
|
|
|
|
|
|
|
# gl_enum_utils defaults included in with_capture build
|
2019-10-28 19:12:53 +03:00
|
|
|
deps = []
|
2019-08-09 19:03:24 +03:00
|
|
|
if (angle_enable_trace || is_debug) {
|
2019-10-28 19:12:53 +03:00
|
|
|
deps += [ ":angle_gl_enum_utils" ]
|
2019-08-09 19:03:24 +03:00
|
|
|
}
|
2019-07-31 00:22:17 +03:00
|
|
|
}
|
|
|
|
|
2019-10-28 19:12:53 +03:00
|
|
|
angle_source_set("angle_gl_enum_utils") {
|
2020-02-05 08:31:47 +03:00
|
|
|
public_deps = [ ":libANGLE_base" ]
|
2019-10-28 19:12:53 +03:00
|
|
|
sources = [
|
|
|
|
"src/libANGLE/gl_enum_utils.cpp",
|
|
|
|
"src/libANGLE/gl_enum_utils_autogen.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2020-03-16 05:11:03 +03:00
|
|
|
config("angle_compression_config") {
|
|
|
|
include_dirs = [ "//third_party/zlib/google" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
group("angle_compression") {
|
|
|
|
public_configs = [
|
|
|
|
":angle_compression_config",
|
|
|
|
"//third_party/zlib:zlib_config",
|
|
|
|
]
|
|
|
|
public_deps = [ "//third_party/zlib/google:compression_utils_portable" ]
|
|
|
|
}
|
|
|
|
|
2019-07-05 18:13:30 +03:00
|
|
|
angle_source_set("libANGLE_with_capture") {
|
2020-02-05 08:31:47 +03:00
|
|
|
public_deps = [ ":libANGLE_base" ]
|
2020-03-16 05:11:03 +03:00
|
|
|
deps = [ ":angle_compression" ]
|
2019-07-31 00:22:17 +03:00
|
|
|
public_configs = [ ":angle_frame_capture_enabled" ]
|
2019-07-05 18:13:30 +03:00
|
|
|
sources = libangle_capture_sources
|
|
|
|
}
|
|
|
|
|
2016-06-21 18:47:03 +03:00
|
|
|
config("shared_library_public_config") {
|
|
|
|
if (is_mac && !is_component_build) {
|
|
|
|
# Executable targets that depend on the shared libraries below need to have
|
|
|
|
# the rpath setup in non-component build configurations.
|
2016-07-18 20:47:12 +03:00
|
|
|
ldflags = [
|
|
|
|
"-rpath",
|
|
|
|
"@executable_path/",
|
|
|
|
]
|
2020-03-05 21:48:47 +03:00
|
|
|
if (build_with_chromium) {
|
|
|
|
ldflags += [
|
|
|
|
# Path for loading shared libraries for unbundled binaries.
|
|
|
|
# From //build/config/mac/BUILD.gn, this is only added for
|
|
|
|
# component builds. However, since ANGLE always dynamically
|
|
|
|
# links to libvulkan, it should be re-added for non-component
|
|
|
|
# builds. (anglebug.com/4455)
|
|
|
|
"-Wl,-rpath,@loader_path/.",
|
|
|
|
]
|
|
|
|
}
|
2016-06-21 18:47:03 +03:00
|
|
|
}
|
2019-11-29 21:59:03 +03:00
|
|
|
|
|
|
|
if (angle_is_winuwp) {
|
|
|
|
ldflags = [
|
|
|
|
"/APPCONTAINER",
|
|
|
|
|
|
|
|
# Disable warning about invalid subsystem number.
|
|
|
|
# A default appropriate subsystem is selected automatically.
|
|
|
|
"/IGNORE:4010",
|
|
|
|
]
|
|
|
|
}
|
2016-06-21 18:47:03 +03:00
|
|
|
}
|
|
|
|
|
2018-12-17 21:13:49 +03:00
|
|
|
config("library_name_config") {
|
2020-02-27 03:09:31 +03:00
|
|
|
if (is_component_build && is_android) {
|
|
|
|
defines = [
|
|
|
|
"ANGLE_EGL_LIBRARY_NAME=\"libEGL${angle_libs_suffix}.cr\"",
|
|
|
|
"ANGLE_GLESV2_LIBRARY_NAME=\"libGLESv2${angle_libs_suffix}.cr\"",
|
|
|
|
]
|
|
|
|
} else {
|
|
|
|
defines = [
|
|
|
|
"ANGLE_EGL_LIBRARY_NAME=\"libEGL${angle_libs_suffix}\"",
|
|
|
|
"ANGLE_GLESV2_LIBRARY_NAME=\"libGLESv2${angle_libs_suffix}\"",
|
|
|
|
]
|
|
|
|
}
|
2018-12-17 21:13:49 +03:00
|
|
|
}
|
|
|
|
|
2017-01-03 19:03:23 +03:00
|
|
|
# This config controls export definitions on ANGLE API calls.
|
|
|
|
config("angle_static") {
|
|
|
|
defines = [
|
|
|
|
"ANGLE_EXPORT=",
|
2018-12-29 18:29:33 +03:00
|
|
|
"ANGLE_UTIL_EXPORT=",
|
2017-01-03 19:03:23 +03:00
|
|
|
"EGLAPI=",
|
|
|
|
"GL_APICALL=",
|
2018-01-13 01:17:27 +03:00
|
|
|
"GL_API=",
|
2017-01-03 19:03:23 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-07-31 00:22:17 +03:00
|
|
|
set_defaults("angle_libGLESv2") {
|
|
|
|
sources = []
|
|
|
|
output_name = "libGLESv2"
|
|
|
|
}
|
|
|
|
|
2019-07-05 18:13:30 +03:00
|
|
|
template("angle_libGLESv2") {
|
|
|
|
angle_shared_library(target_name) {
|
2019-07-31 00:22:17 +03:00
|
|
|
sources = libglesv2_sources + invoker.sources
|
2015-01-13 19:13:56 +03:00
|
|
|
|
2019-07-05 18:13:30 +03:00
|
|
|
if (is_win) {
|
2019-07-31 00:22:17 +03:00
|
|
|
sources += [ "src/libGLESv2/${invoker.output_name}_autogen.def" ]
|
2019-07-05 18:13:30 +03:00
|
|
|
}
|
2015-01-13 19:13:56 +03:00
|
|
|
|
2019-07-31 00:22:17 +03:00
|
|
|
output_name = "${invoker.output_name}${angle_libs_suffix}"
|
|
|
|
|
2019-07-05 18:13:30 +03:00
|
|
|
configs += [
|
|
|
|
":angle_gl_visibility_config",
|
|
|
|
":debug_annotations_config",
|
|
|
|
":gl_prototypes",
|
|
|
|
]
|
2015-01-13 19:13:56 +03:00
|
|
|
|
2019-07-31 00:22:17 +03:00
|
|
|
defines = [ "LIBGLESV2_IMPLEMENTATION" ]
|
2017-01-03 19:03:23 +03:00
|
|
|
|
2019-07-31 00:22:17 +03:00
|
|
|
deps = invoker.deps + [ ":includes" ]
|
2018-12-17 22:04:10 +03:00
|
|
|
|
2020-02-05 08:31:47 +03:00
|
|
|
public_deps = [ ":angle_version" ]
|
2019-07-05 18:13:30 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
angle_libGLESv2("libGLESv2") {
|
2019-07-31 00:22:17 +03:00
|
|
|
if (angle_with_capture_by_default) {
|
2020-02-05 08:31:47 +03:00
|
|
|
deps = [ ":libANGLE_with_capture" ]
|
2019-08-12 19:11:53 +03:00
|
|
|
} else {
|
2020-02-05 08:31:47 +03:00
|
|
|
deps = [ ":libANGLE" ]
|
2019-07-31 00:22:17 +03:00
|
|
|
}
|
2019-07-05 18:13:30 +03:00
|
|
|
}
|
|
|
|
|
2019-08-12 19:11:53 +03:00
|
|
|
# Output capture lib when `angle_with_capture_by_default` disabled, vice versa.
|
|
|
|
angle_libGLESv2("libGLESv2_capture_complement") {
|
|
|
|
if (angle_with_capture_by_default) {
|
2020-02-05 08:31:47 +03:00
|
|
|
deps = [ ":libANGLE" ]
|
2019-08-12 19:11:53 +03:00
|
|
|
output_name += "_no_capture"
|
|
|
|
} else {
|
2020-02-05 08:31:47 +03:00
|
|
|
deps = [ ":libANGLE_with_capture" ]
|
2019-08-12 19:11:53 +03:00
|
|
|
output_name += "_with_capture"
|
2019-07-31 00:22:17 +03:00
|
|
|
}
|
2017-01-03 19:03:23 +03:00
|
|
|
}
|
|
|
|
|
2019-09-19 00:46:23 +03:00
|
|
|
if (is_win && !angle_is_winuwp) {
|
2019-07-04 23:05:25 +03:00
|
|
|
angle_shared_library("libGL") {
|
|
|
|
sources = libgl_sources
|
2019-07-11 19:37:35 +03:00
|
|
|
|
2019-07-16 20:41:59 +03:00
|
|
|
output_name = "openGL32"
|
|
|
|
output_dir = "$root_out_dir/angle_libs"
|
2019-06-18 20:02:03 +03:00
|
|
|
|
|
|
|
configs += [
|
|
|
|
":angle_gl_visibility_config",
|
|
|
|
":debug_annotations_config",
|
|
|
|
":gl_prototypes",
|
|
|
|
]
|
|
|
|
|
2019-07-05 18:13:30 +03:00
|
|
|
defines = [
|
|
|
|
"ANGLE_CAPTURE_ENABLED=0",
|
2019-07-04 23:05:25 +03:00
|
|
|
"LIBGL_IMPLEMENTATION",
|
2019-07-05 18:13:30 +03:00
|
|
|
]
|
2019-06-18 20:02:03 +03:00
|
|
|
|
|
|
|
deps = [
|
|
|
|
":includes",
|
|
|
|
":libANGLE",
|
|
|
|
]
|
|
|
|
|
2020-02-05 08:31:47 +03:00
|
|
|
public_deps = [ ":angle_version" ]
|
2019-06-18 20:02:03 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_static_library("libGLESv2_static") {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources = libglesv2_sources
|
2019-01-16 02:33:42 +03:00
|
|
|
configs += [ ":debug_annotations_config" ]
|
|
|
|
public_configs += [ ":angle_static" ]
|
2020-02-05 08:31:47 +03:00
|
|
|
deps = [ ":includes" ]
|
|
|
|
public_deps = [ ":libANGLE" ]
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
|
|
|
|
2019-06-28 18:24:27 +03:00
|
|
|
angle_shared_library("libGLESv1_CM") {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources = libglesv1_cm_sources
|
2019-06-28 18:24:27 +03:00
|
|
|
output_name = "libGLESv1_CM${angle_libs_suffix}"
|
2018-01-13 01:17:27 +03:00
|
|
|
|
|
|
|
configs += [
|
2018-10-09 04:25:19 +03:00
|
|
|
":angle_gl_visibility_config",
|
2018-01-13 01:17:27 +03:00
|
|
|
":debug_annotations_config",
|
2018-12-29 18:29:33 +03:00
|
|
|
":gl_prototypes",
|
2018-01-13 01:17:27 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
defines = []
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":includes",
|
2019-06-28 18:24:27 +03:00
|
|
|
":libGLESv2",
|
2018-01-13 01:17:27 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_static_library("libGLESv1_CM_static") {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources = libglesv1_cm_sources
|
2019-01-16 02:33:42 +03:00
|
|
|
configs += [ ":debug_annotations_config" ]
|
|
|
|
public_configs += [ ":angle_static" ]
|
2018-01-13 01:17:27 +03:00
|
|
|
deps = [
|
|
|
|
":includes",
|
|
|
|
":libGLESv2_static",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2018-12-17 21:13:49 +03:00
|
|
|
config("libEGL_egl_loader_config") {
|
|
|
|
defines = [ "ANGLE_USE_EGL_LOADER" ]
|
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_source_set("libEGL_egl_loader") {
|
2018-12-17 21:13:49 +03:00
|
|
|
sources = [
|
|
|
|
"src/libEGL/egl_loader_autogen.cpp",
|
|
|
|
"src/libEGL/egl_loader_autogen.h",
|
|
|
|
]
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
public_configs += [
|
2018-12-17 21:13:49 +03:00
|
|
|
":libEGL_egl_loader_config",
|
|
|
|
":gl_prototypes",
|
|
|
|
]
|
|
|
|
|
2020-02-05 08:31:47 +03:00
|
|
|
deps = [ ":includes" ]
|
2018-12-17 21:13:49 +03:00
|
|
|
}
|
|
|
|
|
2019-06-28 18:24:27 +03:00
|
|
|
angle_shared_library("libEGL") {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources = libegl_sources
|
2019-06-28 18:24:27 +03:00
|
|
|
output_name = "libEGL${angle_libs_suffix}"
|
2015-01-14 22:31:02 +03:00
|
|
|
|
2017-01-03 19:03:23 +03:00
|
|
|
configs += [
|
|
|
|
":debug_annotations_config",
|
2018-12-17 21:13:49 +03:00
|
|
|
":library_name_config",
|
2017-01-03 19:03:23 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
defines = [ "LIBEGL_IMPLEMENTATION" ]
|
|
|
|
if (is_win) {
|
|
|
|
defines += [ "EGLAPI=" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "EGLAPI=__attribute__((visibility(\"default\")))" ]
|
|
|
|
}
|
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
if (is_win) {
|
2019-01-04 22:47:27 +03:00
|
|
|
sources += [ "src/libEGL/libEGL.def" ]
|
2015-01-14 01:52:17 +03:00
|
|
|
}
|
2015-01-14 22:31:02 +03:00
|
|
|
|
2017-01-03 19:03:23 +03:00
|
|
|
deps = [
|
2019-08-06 20:10:52 +03:00
|
|
|
":angle_common",
|
2018-12-17 21:13:49 +03:00
|
|
|
":angle_system_utils",
|
|
|
|
":angle_version",
|
|
|
|
":libEGL_egl_loader",
|
2017-01-03 19:03:23 +03:00
|
|
|
]
|
2018-12-17 22:04:10 +03:00
|
|
|
|
2020-02-05 08:31:47 +03:00
|
|
|
public_deps = [ ":includes" ]
|
2018-12-17 21:13:49 +03:00
|
|
|
|
2020-02-05 08:31:47 +03:00
|
|
|
data_deps = [ ":libGLESv2" ]
|
2017-01-03 19:03:23 +03:00
|
|
|
}
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_static_library("libEGL_static") {
|
2018-08-30 00:31:27 +03:00
|
|
|
sources = libegl_sources
|
2017-01-03 19:03:23 +03:00
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
configs += [
|
2015-09-02 17:30:55 +03:00
|
|
|
":debug_annotations_config",
|
2018-12-17 21:13:49 +03:00
|
|
|
":library_name_config",
|
2015-01-14 22:31:02 +03:00
|
|
|
]
|
|
|
|
|
2019-01-16 02:33:42 +03:00
|
|
|
public_configs += [ ":angle_static" ]
|
2015-01-14 22:31:02 +03:00
|
|
|
|
|
|
|
deps = [
|
|
|
|
":includes",
|
2017-01-03 19:03:23 +03:00
|
|
|
":libGLESv2_static",
|
2015-01-14 22:31:02 +03:00
|
|
|
]
|
|
|
|
}
|
2015-09-02 17:30:55 +03:00
|
|
|
|
2017-06-29 00:01:15 +03:00
|
|
|
# Convenience targets for some of the samples so they can be built
|
|
|
|
# with Chromium's toolchain.
|
2019-01-16 02:33:42 +03:00
|
|
|
angle_executable("angle_shader_translator") {
|
2017-06-29 00:01:15 +03:00
|
|
|
testonly = true
|
|
|
|
|
2020-02-05 08:31:47 +03:00
|
|
|
sources = [ "samples/shader_translator/shader_translator.cpp" ]
|
2017-06-29 00:01:15 +03:00
|
|
|
|
2020-02-05 08:31:47 +03:00
|
|
|
deps = [ ":translator" ]
|
2017-06-29 00:01:15 +03:00
|
|
|
}
|
2018-04-13 02:06:48 +03:00
|
|
|
|
2019-10-04 22:17:49 +03:00
|
|
|
if (angle_has_build) {
|
|
|
|
config("angle_feature_support_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"include",
|
|
|
|
"src",
|
|
|
|
]
|
|
|
|
defines = [ "LIBFEATURE_SUPPORT_IMPLEMENTATION" ]
|
|
|
|
if (is_debug) {
|
|
|
|
defines += [ "ANGLE_FEATURE_UTIL_LOG_VERBOSE" ]
|
|
|
|
}
|
2018-10-09 04:25:19 +03:00
|
|
|
}
|
2019-06-28 18:24:27 +03:00
|
|
|
|
2019-10-04 22:17:49 +03:00
|
|
|
angle_shared_library("libfeature_support") {
|
|
|
|
output_name = "libfeature_support${angle_libs_suffix}"
|
2018-10-09 04:25:19 +03:00
|
|
|
|
2019-10-04 22:17:49 +03:00
|
|
|
if (is_android) {
|
|
|
|
libs = [ "log" ]
|
|
|
|
}
|
2018-11-28 21:44:48 +03:00
|
|
|
|
2019-10-04 22:17:49 +03:00
|
|
|
public_configs += [
|
|
|
|
":angle_feature_support_config",
|
|
|
|
"${angle_jsoncpp_dir}:jsoncpp_config",
|
2019-02-01 12:53:44 +03:00
|
|
|
]
|
|
|
|
|
2019-10-04 22:17:49 +03:00
|
|
|
if (is_mac && !is_component_build) {
|
|
|
|
ldflags = [
|
|
|
|
"-install_name",
|
|
|
|
"@rpath/${target_name}.dylib",
|
|
|
|
]
|
|
|
|
}
|
2019-01-16 02:33:42 +03:00
|
|
|
|
2019-10-04 22:17:49 +03:00
|
|
|
sources = [
|
|
|
|
"src/feature_support_util/feature_support_util.cpp",
|
|
|
|
"src/feature_support_util/feature_support_util.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":angle_gpu_info_util",
|
|
|
|
"${angle_jsoncpp_dir}:jsoncpp",
|
|
|
|
]
|
|
|
|
}
|
2018-11-28 21:44:48 +03:00
|
|
|
}
|
|
|
|
|
2019-01-03 23:24:22 +03:00
|
|
|
if (!is_component_build && is_android && symbol_level != 0) {
|
|
|
|
action_foreach("compressed_symbols") {
|
2019-01-03 22:40:13 +03:00
|
|
|
sources = []
|
|
|
|
foreach(_library, angle_libraries) {
|
2019-06-28 18:24:27 +03:00
|
|
|
sources += [ "$root_out_dir/${_library}${angle_libs_suffix}.so" ]
|
2019-01-03 22:40:13 +03:00
|
|
|
}
|
|
|
|
if (angle_enable_vulkan_validation_layers) {
|
|
|
|
foreach(_layer, vulkan_validation_layers) {
|
2019-06-28 18:24:27 +03:00
|
|
|
sources += [ "$root_out_dir/lib${_layer}.so" ]
|
2019-01-03 22:40:13 +03:00
|
|
|
}
|
|
|
|
}
|
2019-01-03 23:24:22 +03:00
|
|
|
|
|
|
|
script = rebase_path("${root_build_dir}/android/compress_symbols.py",
|
|
|
|
root_build_dir)
|
|
|
|
|
2019-01-03 22:40:13 +03:00
|
|
|
deps = []
|
|
|
|
foreach(_library, angle_libraries) {
|
2019-06-28 18:24:27 +03:00
|
|
|
deps += [ ":$_library" ]
|
2019-01-03 22:40:13 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
if (angle_enable_vulkan_validation_layers) {
|
|
|
|
foreach(_layer, vulkan_validation_layers) {
|
Reland "Vulkan: Use VK repos' internal BUILD.gn files"
This is a reland of 552f5fcb0d8fcc615856ce3b678190e1cbdd38e6
There was a missing build dependence causing a build no-op
issue which has now been fixed in the upstream Vulkan Validation
Layer repo.
Primary workaround that need to be re-visted and fixed are:
1. Disabled validation layers on 32-bit Windows
2. Disabled validation layers on 32-bit Android
3. Disabled DebugUtils on Android, using DebugReport instead
4. Using custom VK Loader branch to avoid WDK dependence
Original change's description:
> Vulkan: Use VK repos' internal BUILD.gn files
>
> This retires custom BUILD.gn files for the Vulkan Headers, Tools,
> Validation-Layers, and Loader repos. They now have integrated BUILD.gn
> files so switched ANGLE to use those by default.
> Also Validation Layer, Loader, and Tools repos no longer uses codegen
> so this speeds up the build overall.
> Switched over from old VK_LAYER_LUNARG_standard_validation meta-layer
> to VK_LAYER_KHRONOS_validation unified layer.
>
> This changes includes a temporary workaround to the Vulkan-Loader repo
> to remove its Window's build dependence on WDK. There are plans to
> remove that depenedence in Loader master, but until then we can use
> our custom branch workaround.
> It also includes a custom branch for validation layers that includes
> some build fixes for ANGLE.
> Finally, the layers were crashing on Android when attempting to use
> DebugUtils extension so forcing DebugReport on Android for now.
>
> Bug: angleproject:2449
> Bug: angleproject:3320
> Bug: angleproject:3852
> Bug: angleproject:3924
> Bug: angleproject:3925
> Bug: angleproject:3946
> Bug: chromium:997009
> Bug: chromium:997016
> Change-Id: I48b36acefcc7f2bc930eb72d6fdbc87bca24f833
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610438
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Tobin Ehlis <tobine@google.com>
Bug: angleproject:2449, angleproject:3320, angleproject:3852
Change-Id: I373ada091a1329db5e304874079428d01ba21d52
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1778302
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
2019-07-19 00:10:49 +03:00
|
|
|
deps += [
|
|
|
|
"${angle_root}/third_party/vulkan-validation-layers/src:${_layer}",
|
|
|
|
]
|
2019-01-03 22:40:13 +03:00
|
|
|
}
|
|
|
|
}
|
2019-01-03 23:24:22 +03:00
|
|
|
|
2020-02-05 08:31:47 +03:00
|
|
|
outputs = [ "$root_out_dir/lib.compressed/{{source_file_part}}" ]
|
2019-01-03 23:24:22 +03:00
|
|
|
|
|
|
|
android_nm = "${android_tool_prefix}nm"
|
2019-05-14 19:42:25 +03:00
|
|
|
android_strip = "${android_tool_prefix}strip"
|
2019-01-03 23:24:22 +03:00
|
|
|
|
|
|
|
args = [
|
|
|
|
"--objcopy",
|
|
|
|
rebase_path(android_objcopy, root_build_dir),
|
|
|
|
"--nm",
|
|
|
|
rebase_path(android_nm, root_build_dir),
|
2019-05-14 19:42:25 +03:00
|
|
|
"--strip",
|
|
|
|
rebase_path(android_strip, root_build_dir),
|
2019-01-03 23:24:22 +03:00
|
|
|
"--unstrippedsofile",
|
|
|
|
"{{source_dir}}/lib.unstripped/{{source_file_part}}",
|
|
|
|
"--output",
|
|
|
|
"{{source_dir}}/lib.compressed/{{source_file_part}}",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-17 21:36:41 +03:00
|
|
|
if (build_with_chromium && !is_component_build && is_android &&
|
2018-12-13 03:06:47 +03:00
|
|
|
current_toolchain == default_toolchain) {
|
2019-04-23 22:25:20 +03:00
|
|
|
# Package ANGLE libraries
|
|
|
|
angle_apk("angle_chromium_apk") {
|
|
|
|
package_name = "com.chromium.angle"
|
Reland "Create Container ANGLE APK"
This reverts commit 902ceed3998617e97aad25d6b632f9e34dff2644.
Reason for revert:
Re-landing this since the Chromium build fix has landed:
https://bugs.chromium.org/p/chromium/issues/detail?id=933783#c29
Comment 29 by gbeaty@chromium.org, Today (13 minutes ago)
Tim, you should be able to re-land your change now.
Original change's description:
> Revert "Create Container ANGLE APK"
>
> This reverts commit e82c857d38549da44de2c055e9e677a368e8793f.
>
> Reason for revert:
> This is breaking the ANGLE build in the Chromium build process:
>
> https://bugs.chromium.org/p/chromium/issues/detail?id=933783#c6
>
> Original change's description:
> > Create Container ANGLE APK
> >
> > The ANGLE APK needs to be reverted back to just being a container
> > for the ANGLE shared object libraries, since the rest of the APK
> > contents are in the Android source tree.
> >
> > Bug: angleproject:3154
> > Test: 'adb sync' the APK on to a device
> > Change-Id: Id245f1e3d269c71054d9759e8ba8be0532afe659
> > Reviewed-on: https://chromium-review.googlesource.com/c/1474341
> > Commit-Queue: Tim Van Patten <timvp@google.com>
> > Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
>
> TBR=ynovikov@chromium.org,jmadill@google.com,cnorthrop@google.com,courtneygo@google.com,timvp@google.com
>
> Change-Id: I71a739faa2052a707a06bce616ab43a621d5a4ff
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:3154
> Reviewed-on: https://chromium-review.googlesource.com/c/1478333
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Commit-Queue: Tim Van Patten <timvp@google.com>
TBR=ynovikov@chromium.org,jmadill@google.com,cnorthrop@google.com,courtneygo@google.com,timvp@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:3154
Change-Id: If3a9abfb1c00aab3278437a233bef29d5febe5a5
Reviewed-on: https://chromium-review.googlesource.com/c/1480865
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
2019-02-21 22:21:09 +03:00
|
|
|
apk_name = "AngleLibraries"
|
2018-11-29 19:00:08 +03:00
|
|
|
}
|
|
|
|
|
2018-12-01 02:24:11 +03:00
|
|
|
group("angle_apks") {
|
2020-02-05 08:31:47 +03:00
|
|
|
deps = [ ":angle_chromium_apk" ]
|
2018-04-13 02:06:48 +03:00
|
|
|
}
|
|
|
|
}
|
2019-10-04 22:17:49 +03:00
|
|
|
|
|
|
|
group("angle") {
|
|
|
|
data_deps = [
|
2020-02-05 08:31:47 +03:00
|
|
|
":libEGL",
|
2019-12-03 22:08:36 +03:00
|
|
|
":libGLESv1_CM",
|
2019-10-04 22:17:49 +03:00
|
|
|
":libGLESv2",
|
|
|
|
]
|
|
|
|
}
|