Jamie Madill | 0cb3b0f | 2019-01-28 09:55:20 -0500 | [diff] [blame] | 1 | # Copyright 2019 The ANGLE Project Authors. All rights reserved. |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
Corentin Wallez | 51e2ad1 | 2015-05-26 11:32:58 -0400 | [diff] [blame] | 5 | # import the use_x11 variable |
Frank Henigman | d0ef13a | 2017-08-28 22:53:24 -0400 | [diff] [blame] | 6 | import("gni/angle.gni") |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 7 | if (angle_has_build) { |
| 8 | import("//build/config/linux/pkg_config.gni") |
| 9 | import("//build/config/ui.gni") |
| 10 | import("//testing/libfuzzer/fuzzer_test.gni") |
| 11 | |
| 12 | if (is_android) { |
| 13 | # android/rules.gni can only be imported for Android targets |
| 14 | import("//build/config/android/config.gni") |
| 15 | import("//build/config/android/rules.gni") |
| 16 | import("android/angle_apk.gni") |
| 17 | } |
Courtney Goeltzenleuchter | 2565d48 | 2018-04-12 17:06:48 -0600 | [diff] [blame] | 18 | } |
Corentin Wallez | 51e2ad1 | 2015-05-26 11:32:58 -0400 | [diff] [blame] | 19 | |
Corentin Wallez | 16d4e47 | 2017-03-20 13:06:19 -0400 | [diff] [blame] | 20 | declare_args() { |
| 21 | # Use the PCI lib to collect GPU information on Linux. |
| 22 | use_libpci = is_linux && (!is_chromecast || is_cast_desktop_build) && |
Ethan Lee | d22b8be | 2019-11-15 12:26:39 -0500 | [diff] [blame] | 23 | (angle_use_x11 || use_ozone) |
Frank Henigman | e42ec18 | 2017-12-11 23:58:53 -0500 | [diff] [blame] | 24 | |
| 25 | # Link in system libGL, to work with apitrace. See doc/DebuggingTips.md. |
| 26 | angle_link_glx = false |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 27 | |
| 28 | # Defaults to capture building to $root_out_dir/angle_libs/with_capture. |
| 29 | # Switch on to build capture to $root_out_dir. |
| 30 | angle_with_capture_by_default = false |
Austin Kinross | 11dc163 | 2019-09-18 14:46:23 -0700 | [diff] [blame] | 31 | |
| 32 | # Don't build extra (test, samples etc) for Windows UWP. We don't have |
| 33 | # infrastructure (e.g. windowing helper functions) in place to run them. |
Jamie Madill | e3c2571 | 2019-12-03 14:08:36 -0500 | [diff] [blame] | 34 | angle_build_all = !build_with_chromium && !angle_is_winuwp && angle_has_build |
Geoff Lang | e888356 | 2020-03-06 09:32:18 -0500 | [diff] [blame] | 35 | |
| 36 | # Enable generating current commit information using git |
| 37 | angle_enable_commit_id = true |
Corentin Wallez | 16d4e47 | 2017-03-20 13:06:19 -0400 | [diff] [blame] | 38 | } |
| 39 | |
Jamie Madill | e3c2571 | 2019-12-03 14:08:36 -0500 | [diff] [blame] | 40 | if (angle_build_all) { |
Frank Henigman | d0ef13a | 2017-08-28 22:53:24 -0400 | [diff] [blame] | 41 | group("all") { |
| 42 | testonly = true |
| 43 | deps = [ |
Jamie Madill | e3c2571 | 2019-12-03 14:08:36 -0500 | [diff] [blame] | 44 | ":angle", |
Frank Henigman | d0ef13a | 2017-08-28 22:53:24 -0400 | [diff] [blame] | 45 | ":angle_shader_translator", |
| 46 | ":translator_fuzzer", |
Jamie Madill | 238c19e | 2019-02-07 09:09:41 -0500 | [diff] [blame] | 47 | ":xxhash_fuzzer", |
Jamie Madill | e3c2571 | 2019-12-03 14:08:36 -0500 | [diff] [blame] | 48 | "$angle_root/samples:angle_samples", |
| 49 | "$angle_root/src/tests:angle_tests", |
Frank Henigman | d0ef13a | 2017-08-28 22:53:24 -0400 | [diff] [blame] | 50 | ] |
| 51 | } |
| 52 | } |
| 53 | |
Frank Henigman | e8d5c5c | 2016-07-07 13:17:47 -0400 | [diff] [blame] | 54 | if (ozone_platform_gbm) { |
Frank Henigman | 62ba962 | 2016-06-27 17:08:28 -0400 | [diff] [blame] | 55 | pkg_config("libdrm") { |
| 56 | packages = [ "libdrm" ] |
| 57 | } |
Frank Henigman | 77df676 | 2016-06-13 16:39:01 -0400 | [diff] [blame] | 58 | } |
| 59 | |
Tim Van Patten | c4e0a1e | 2018-11-28 16:08:11 +0000 | [diff] [blame] | 60 | import("src/compiler.gni") |
Tim Van Patten | fdccaa3 | 2018-11-01 17:47:10 -0600 | [diff] [blame] | 61 | import("src/libGLESv2.gni") |
Brett Wilson | 04bac60 | 2014-07-16 14:19:18 -0700 | [diff] [blame] | 62 | |
Brett Wilson | 2f5469c | 2014-07-22 17:00:17 -0700 | [diff] [blame] | 63 | # This config is exported to dependent targets (and also applied to internal |
| 64 | # ones). |
| 65 | config("external_config") { |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 66 | include_dirs = [ "include" ] |
Brett Wilson | 2f5469c | 2014-07-22 17:00:17 -0700 | [diff] [blame] | 67 | } |
| 68 | |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 69 | # Prevent the GL headers from redeclaring ANGLE entry points. |
| 70 | config("no_gl_prototypes") { |
| 71 | defines = [ |
| 72 | "GL_GLES_PROTOTYPES=0", |
| 73 | "EGL_EGL_PROTOTYPES=0", |
| 74 | ] |
| 75 | } |
| 76 | |
| 77 | config("gl_prototypes") { |
| 78 | defines = [ |
| 79 | "GL_GLES_PROTOTYPES=1", |
| 80 | "EGL_EGL_PROTOTYPES=1", |
| 81 | "GL_GLEXT_PROTOTYPES", |
| 82 | "EGL_EGLEXT_PROTOTYPES", |
| 83 | ] |
| 84 | } |
| 85 | |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 86 | # This config is applied to internal Angle targets (not pushed to dependents). |
| 87 | config("internal_config") { |
| 88 | include_dirs = [ |
| 89 | "include", |
| 90 | "src", |
| 91 | ] |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 92 | |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 93 | defines = [] |
Jamie Madill | 6de5185 | 2017-04-12 09:53:01 -0400 | [diff] [blame] | 94 | |
Courtney Goeltzenleuchter | b001528 | 2018-05-18 16:48:50 -0600 | [diff] [blame] | 95 | if (angle_64bit_current_cpu) { |
Yuly Novikov | c4f1dd8 | 2017-10-25 17:02:29 -0400 | [diff] [blame] | 96 | defines += [ "ANGLE_IS_64_BIT_CPU" ] |
Courtney Goeltzenleuchter | b001528 | 2018-05-18 16:48:50 -0600 | [diff] [blame] | 97 | } else { |
| 98 | defines += [ "ANGLE_IS_32_BIT_CPU" ] |
Jamie Madill | 6de5185 | 2017-04-12 09:53:01 -0400 | [diff] [blame] | 99 | } |
Geoff Lang | b02fc66 | 2018-08-21 09:48:01 -0400 | [diff] [blame] | 100 | |
Tobin Ehlis | 573f76b | 2018-05-03 11:10:44 -0600 | [diff] [blame] | 101 | if (angle_enable_trace) { |
| 102 | defines += [ "ANGLE_ENABLE_DEBUG_TRACE=1" ] |
| 103 | } |
Tobin Ehlis | 93121f3 | 2019-10-17 08:18:16 -0600 | [diff] [blame] | 104 | |
| 105 | if (is_chromeos) { |
| 106 | defines += [ "ANGLE_PLATFORM_CHROMEOS" ] |
| 107 | } |
Ethan Lee | fcef6dc | 2020-01-24 22:41:35 -0500 | [diff] [blame] | 108 | |
| 109 | if (is_ggp) { |
| 110 | defines += [ "__ggp__" ] |
| 111 | } |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 112 | } |
| 113 | |
Jamie Madill | a9f11bf | 2019-10-21 08:39:14 -0400 | [diff] [blame] | 114 | config("constructor_and_destructor_warnings") { |
| 115 | if (is_clang) { |
| 116 | cflags = [ |
| 117 | "-Wexit-time-destructors", |
| 118 | "-Wglobal-constructors", |
| 119 | ] |
| 120 | } |
| 121 | } |
| 122 | |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 123 | config("extra_warnings") { |
Ben Wagner | 211bff3 | 2017-10-10 23:53:20 -0400 | [diff] [blame] | 124 | cflags = [] |
Frank Henigman | d0ef13a | 2017-08-28 22:53:24 -0400 | [diff] [blame] | 125 | |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 126 | # Enable more default warnings on Windows. |
| 127 | if (is_win) { |
Ben Wagner | 211bff3 | 2017-10-10 23:53:20 -0400 | [diff] [blame] | 128 | cflags += [ |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 129 | "/we4244", # Conversion: possible loss of data. |
| 130 | "/we4456", # Variable shadowing. |
Jamie Madill | 1db8a26 | 2016-09-22 13:53:47 -0400 | [diff] [blame] | 131 | "/we4458", # declaration hides class member. |
Ben Wagner | 1e06401 | 2019-04-12 14:10:17 -0400 | [diff] [blame] | 132 | "/we4715", # not all control paths return a value |
Geoff Lang | b944053 | 2017-11-28 13:26:34 -0500 | [diff] [blame] | 133 | "/we4800", # forcing value to bool. |
| 134 | "/we4838", # narrowing conversion. |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 135 | ] |
| 136 | } |
Ben Wagner | 211bff3 | 2017-10-10 23:53:20 -0400 | [diff] [blame] | 137 | if (is_clang) { |
Michael Spang | 229fc83 | 2019-01-21 18:09:15 -0500 | [diff] [blame] | 138 | cflags += [ |
Jamie Madill | 155947f | 2019-10-24 12:55:11 -0400 | [diff] [blame] | 139 | "-Wconditional-uninitialized", |
Jamie Madill | 44a0e73 | 2019-09-02 13:55:59 -0400 | [diff] [blame] | 140 | "-Wextra-semi-stmt", |
Jiacheng Lu | 73e5e9b | 2019-07-22 15:26:17 -0600 | [diff] [blame] | 141 | "-Wfloat-conversion", |
Jamie Madill | 16370a6 | 2019-10-24 12:55:11 -0400 | [diff] [blame] | 142 | "-Winconsistent-missing-destructor-override", |
Jamie Madill | a620685 | 2019-10-24 12:55:09 -0400 | [diff] [blame] | 143 | "-Wmissing-field-initializers", |
Olli Etuaho | 8073a95 | 2018-05-09 16:41:39 +0300 | [diff] [blame] | 144 | "-Wnon-virtual-dtor", |
Jamie Madill | 68945f1 | 2019-10-24 12:55:09 -0400 | [diff] [blame] | 145 | "-Wredundant-parens", |
Jamie Madill | 859ca03 | 2019-10-24 12:55:08 -0400 | [diff] [blame] | 146 | "-Wshadow-field", |
Jamie Madill | fd58d22 | 2019-10-24 12:55:07 -0400 | [diff] [blame] | 147 | "-Wtautological-type-limit-compare", |
Jamie Madill | c017cee | 2019-10-24 12:55:10 -0400 | [diff] [blame] | 148 | "-Wundefined-reinterpret-cast", |
Jamie Madill | c09ae15 | 2019-02-01 14:16:32 -0500 | [diff] [blame] | 149 | "-Wunneeded-internal-declaration", |
James Darpinian | efa898a | 2019-08-07 17:05:35 -0700 | [diff] [blame] | 150 | |
| 151 | # The below warnings are used by WebKit. We enable them to make rolling |
| 152 | # ANGLE in WebKit easier. |
| 153 | "-Wparentheses", |
| 154 | "-Wrange-loop-analysis", |
| 155 | "-Wstrict-prototypes", |
| 156 | "-Wunreachable-code", |
James Darpinian | 7e48c9e | 2019-08-06 17:17:19 -0700 | [diff] [blame] | 157 | "-Wshorten-64-to-32", |
Nico Weber | 79de62c | 2018-01-31 10:47:14 -0500 | [diff] [blame] | 158 | ] |
Ben Wagner | 211bff3 | 2017-10-10 23:53:20 -0400 | [diff] [blame] | 159 | } |
Austin Kinross | 11dc163 | 2019-09-18 14:46:23 -0700 | [diff] [blame] | 160 | |
| 161 | if (angle_is_winuwp) { |
| 162 | cflags += [ "/wd4447" ] # 'main' signature found without threading model. |
| 163 | } |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 164 | } |
| 165 | |
Courtney Goeltzenleuchter | 4607148 | 2018-05-15 13:35:15 -0600 | [diff] [blame] | 166 | # This config adds build-ids to the associated library. |
| 167 | # -Wl is a special option that indicates that clang should pass the associated |
| 168 | # option --build-id to the linker. This will cause a build-id section to be added |
| 169 | # to the associated library. The build-id makes it possible for a debugger to |
| 170 | # find the right symbol file to use. |
| 171 | config("build_id_config") { |
| 172 | ldflags = [ "-Wl,--build-id" ] |
| 173 | } |
| 174 | |
Jamie Madill | 20d380f | 2019-06-03 15:21:47 -0400 | [diff] [blame] | 175 | # Useful for more informative stack traces. |
| 176 | config("better_linux_stack_traces") { |
| 177 | if (angle_better_stack_traces) { |
| 178 | ldflags = [ "-Wl,--export-dynamic" ] |
| 179 | } |
| 180 | } |
| 181 | |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 182 | _use_copy_compiler_dll = angle_has_build && is_win && target_cpu != "arm64" |
| 183 | |
Tom Tan | 5c31753 | 2018-11-30 17:01:01 -0800 | [diff] [blame] | 184 | # Windows ARM64 is available since 10.0.16299 so no need to copy |
| 185 | # d3dcompiler_47.dll because this file is available as inbox. |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 186 | if (_use_copy_compiler_dll) { |
Jamie Madill | d09546e | 2019-02-22 10:24:44 -0500 | [diff] [blame] | 187 | # We also ship an older DLL for compatiblity with Windows 7 machines without |
| 188 | # the UCRT. This DLL isn't available in the standard SDK distribution. |
| 189 | _old_compiler = "$windows_sdk_path/Redist/D3D/$target_cpu/d3dcompiler_old.dll" |
| 190 | _has_old_compiler = |
| 191 | exec_script("scripts/file_exists.py", [ _old_compiler ], "value") |
| 192 | |
Daniel Bratell | 73941de | 2015-02-25 14:34:49 +0100 | [diff] [blame] | 193 | copy("copy_compiler_dll") { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 194 | sources = [ "$windows_sdk_path/Redist/D3D/$target_cpu/d3dcompiler_47.dll" ] |
Jamie Madill | d09546e | 2019-02-22 10:24:44 -0500 | [diff] [blame] | 195 | |
| 196 | if (_has_old_compiler) { |
| 197 | sources += [ _old_compiler ] |
| 198 | } |
| 199 | |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 200 | outputs = [ "$root_out_dir/{{source_file_part}}" ] |
Daniel Bratell | 73941de | 2015-02-25 14:34:49 +0100 | [diff] [blame] | 201 | } |
Daniel Bratell | 73941de | 2015-02-25 14:34:49 +0100 | [diff] [blame] | 202 | } |
| 203 | |
Jamie Madill | 55959b0 | 2019-03-05 10:07:41 -0500 | [diff] [blame] | 204 | # Holds the shared includes so we only need to list them once. |
Jamie Madill | cd4f1fb | 2019-02-07 15:26:10 -0500 | [diff] [blame] | 205 | config("includes_config") { |
| 206 | include_dirs = [ "include" ] |
| 207 | } |
| 208 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 209 | angle_source_set("includes") { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 210 | sources = libangle_includes |
Jamie Madill | cd4f1fb | 2019-02-07 15:26:10 -0500 | [diff] [blame] | 211 | public_configs = [ ":includes_config" ] |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 212 | } |
| 213 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 214 | angle_static_library("preprocessor") { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 215 | sources = angle_preprocessor_sources |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 216 | |
Corentin Wallez | 054f7ed | 2016-09-20 17:15:59 -0400 | [diff] [blame] | 217 | public_deps = [ |
| 218 | ":angle_common", |
Jamie Madill | 1f08ab2 | 2019-10-03 16:22:52 -0400 | [diff] [blame] | 219 | ":angle_translator_headers", |
Corentin Wallez | 054f7ed | 2016-09-20 17:15:59 -0400 | [diff] [blame] | 220 | ] |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 221 | } |
| 222 | |
Tobin Ehlis | 5546fb4 | 2019-01-17 12:25:54 -0500 | [diff] [blame] | 223 | config("angle_disable_pool_alloc") { |
| 224 | defines = [ "ANGLE_DISABLE_POOL_ALLOC" ] |
Jamie Madill | e5c97ab | 2014-08-07 12:31:38 -0400 | [diff] [blame] | 225 | } |
| 226 | |
Cooper Partin | 75da197 | 2015-06-16 15:03:14 -0700 | [diff] [blame] | 227 | config("debug_annotations_config") { |
Corentin Wallez | 105bc9d | 2019-03-06 16:32:40 +0000 | [diff] [blame] | 228 | if (is_debug) { |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 229 | defines = [ "ANGLE_ENABLE_DEBUG_ANNOTATIONS" ] |
Cooper Partin | 75da197 | 2015-06-16 15:03:14 -0700 | [diff] [blame] | 230 | } |
| 231 | } |
| 232 | |
Jamie Madill | e31fd87 | 2016-05-27 08:35:36 -0400 | [diff] [blame] | 233 | config("angle_release_asserts_config") { |
| 234 | if (dcheck_always_on) { |
| 235 | defines = [ "ANGLE_ENABLE_RELEASE_ASSERTS" ] |
| 236 | } |
| 237 | } |
| 238 | |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 239 | config("angle_common_config") { |
Jamie Madill | 5ea762a | 2017-06-07 14:59:51 -0400 | [diff] [blame] | 240 | include_dirs = [ "src/common/third_party/base" ] |
Yuly Novikov | e762400 | 2018-01-27 18:27:07 -0500 | [diff] [blame] | 241 | if (is_android) { |
| 242 | libs = [ "log" ] |
| 243 | } |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 244 | } |
| 245 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 246 | angle_source_set("angle_system_utils") { |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 247 | sources = angle_system_utils_sources |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 248 | } |
| 249 | |
Jamie Madill | c09ae15 | 2019-02-01 14:16:32 -0500 | [diff] [blame] | 250 | angle_source_set("xxhash") { |
| 251 | sources = xxhash_sources |
Jamie Madill | c09ae15 | 2019-02-01 14:16:32 -0500 | [diff] [blame] | 252 | } |
| 253 | |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 254 | if (angle_has_build) { |
| 255 | fuzzer_test("xxhash_fuzzer") { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 256 | sources = [ "src/common/third_party/xxhash/xxhash_fuzzer.cpp" ] |
| 257 | deps = [ ":xxhash" ] |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 258 | } |
Jamie Madill | 238c19e | 2019-02-07 09:09:41 -0500 | [diff] [blame] | 259 | } |
| 260 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 261 | angle_static_library("angle_common") { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 262 | sources = libangle_common_sources |
Cooper Partin | 75da197 | 2015-06-16 15:03:14 -0700 | [diff] [blame] | 263 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 264 | configs += [ |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 265 | ":angle_common_config", |
Cooper Partin | 75da197 | 2015-06-16 15:03:14 -0700 | [diff] [blame] | 266 | ":debug_annotations_config", |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 267 | ] |
Jeremy Roman | 06feb81 | 2016-04-06 16:39:52 -0400 | [diff] [blame] | 268 | |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 269 | deps = [ ":xxhash" ] |
Jamie Madill | c09ae15 | 2019-02-01 14:16:32 -0500 | [diff] [blame] | 270 | |
Yuly Novikov | 87ae8cd | 2016-05-19 17:59:55 -0400 | [diff] [blame] | 271 | public_deps = [ |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 272 | ":angle_system_utils", |
| 273 | ":angle_version", |
Jamie Madill | 8d986bf | 2018-02-21 08:28:01 -0500 | [diff] [blame] | 274 | ":includes", |
Yuly Novikov | 87ae8cd | 2016-05-19 17:59:55 -0400 | [diff] [blame] | 275 | ] |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 276 | public_configs += [ ":angle_common_config" ] |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 277 | if (angle_has_build && use_fuzzing_engine) { |
Jamie Madill | 48aa52f | 2019-10-17 07:56:53 -0400 | [diff] [blame] | 278 | all_dependent_configs = [ ":angle_disable_pool_alloc" ] |
Tobin Ehlis | 5546fb4 | 2019-01-17 12:25:54 -0500 | [diff] [blame] | 279 | } |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 280 | } |
| 281 | |
Geoff Lang | 6e4cfce | 2016-06-13 15:06:31 -0400 | [diff] [blame] | 282 | config("angle_image_util_config") { |
| 283 | include_dirs = [ |
| 284 | "include", |
| 285 | "src", |
| 286 | ] |
| 287 | } |
| 288 | |
Jamie Madill | 1f08ab2 | 2019-10-03 16:22:52 -0400 | [diff] [blame] | 289 | angle_source_set("angle_image_util_headers") { |
| 290 | sources = libangle_image_util_headers |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 291 | public_deps = [ ":angle_common" ] |
Jamie Madill | 1f08ab2 | 2019-10-03 16:22:52 -0400 | [diff] [blame] | 292 | } |
| 293 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 294 | angle_static_library("angle_image_util") { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 295 | sources = libangle_image_util_sources |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 296 | public_configs += [ ":angle_image_util_config" ] |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 297 | public_deps = [ ":angle_image_util_headers" ] |
Geoff Lang | 6e4cfce | 2016-06-13 15:06:31 -0400 | [diff] [blame] | 298 | } |
| 299 | |
Courtney Goeltzenleuchter | 7d81ae7 | 2018-10-08 19:25:19 -0600 | [diff] [blame] | 300 | config("angle_gl_visibility_config") { |
| 301 | if (is_win) { |
| 302 | defines = [ |
| 303 | "GL_APICALL=", |
| 304 | "GL_API=", |
| 305 | ] |
| 306 | } else { |
| 307 | defines = [ |
| 308 | "GL_APICALL=__attribute__((visibility(\"default\")))", |
| 309 | "GL_API=__attribute__((visibility(\"default\")))", |
| 310 | ] |
Courtney Goeltzenleuchter | e7ece9e | 2018-10-08 16:43:43 -0600 | [diff] [blame] | 311 | } |
Ian Elliott | abcb2b3 | 2018-08-29 17:04:15 -0600 | [diff] [blame] | 312 | } |
| 313 | |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 314 | config("angle_gpu_info_util_config") { |
| 315 | include_dirs = [ |
| 316 | "include", |
| 317 | "src", |
| 318 | ] |
| 319 | } |
| 320 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 321 | angle_static_library("angle_gpu_info_util") { |
Jonah Ryan-Davis | 66e4850 | 2019-04-25 10:49:05 -0400 | [diff] [blame] | 322 | public_configs += [ |
| 323 | ":angle_gpu_info_util_config", |
| 324 | ":angle_backend_config", |
| 325 | ] |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 326 | public_deps = [ ":angle_common" ] |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 327 | sources = libangle_gpu_info_util_sources |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 328 | deps = [] |
| 329 | libs = [] |
| 330 | defines = [] |
| 331 | |
Michael Spang | b630bf9 | 2020-01-24 17:27:01 -0500 | [diff] [blame] | 332 | if (is_android || is_fuchsia) { |
| 333 | sources += libangle_gpu_info_util_vulkan_sources |
Geoff Lang | dd90f5a | 2020-04-07 12:59:23 -0400 | [diff] [blame] | 334 | deps += [ "$angle_root/third_party/vulkan-headers/src:vulkan_headers" ] |
Michael Spang | b630bf9 | 2020-01-24 17:27:01 -0500 | [diff] [blame] | 335 | } |
| 336 | |
Ian Elliott | d07c52e | 2018-06-22 15:42:09 -0600 | [diff] [blame] | 337 | if (is_android) { |
Michael Spang | b630bf9 | 2020-01-24 17:27:01 -0500 | [diff] [blame] | 338 | sources += libangle_gpu_info_util_android_sources |
| 339 | } |
| 340 | |
| 341 | if (is_fuchsia) { |
| 342 | sources += libangle_gpu_info_util_fuchsia_sources |
| 343 | deps += |
| 344 | [ "$angle_root/src/libANGLE/renderer/vulkan:angle_vulkan_entry_points" ] |
Ian Elliott | d07c52e | 2018-06-22 15:42:09 -0600 | [diff] [blame] | 345 | } |
| 346 | |
Corentin Wallez | 8f77e5d | 2017-03-24 11:58:59 -0700 | [diff] [blame] | 347 | if (is_win) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 348 | sources += libangle_gpu_info_util_win_sources |
Austin Kinross | 11dc163 | 2019-09-18 14:46:23 -0700 | [diff] [blame] | 349 | if (!angle_is_winuwp) { |
| 350 | libs += [ "setupapi.lib" ] |
| 351 | } |
Jonah Ryan-Davis | 66e4850 | 2019-04-25 10:49:05 -0400 | [diff] [blame] | 352 | libs += [ "dxgi.lib" ] |
Corentin Wallez | 8f77e5d | 2017-03-24 11:58:59 -0700 | [diff] [blame] | 353 | } |
| 354 | |
Michael Spang | b630bf9 | 2020-01-24 17:27:01 -0500 | [diff] [blame] | 355 | if (is_linux) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 356 | sources += libangle_gpu_info_util_linux_sources |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 357 | |
Ethan Lee | d22b8be | 2019-11-15 12:26:39 -0500 | [diff] [blame] | 358 | if (angle_use_x11) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 359 | sources += libangle_gpu_info_util_x11_sources |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 360 | deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ] |
| 361 | defines += [ "GPU_INFO_USE_X11" ] |
| 362 | libs += [ |
| 363 | "X11", |
| 364 | "Xi", |
| 365 | "Xext", |
| 366 | ] |
| 367 | } |
| 368 | } |
| 369 | |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 370 | if (use_libpci) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 371 | sources += libangle_gpu_info_util_libpci_sources |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 372 | defines += [ "GPU_INFO_USE_LIBPCI" ] |
| 373 | libs += [ "pci" ] |
| 374 | } |
Corentin Wallez | d83f64f | 2017-02-16 10:58:46 -0500 | [diff] [blame] | 375 | |
| 376 | if (is_mac) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 377 | sources += libangle_gpu_info_util_mac_sources |
Corentin Wallez | d83f64f | 2017-02-16 10:58:46 -0500 | [diff] [blame] | 378 | libs += [ |
| 379 | "IOKit.framework", |
| 380 | "CoreFoundation.framework", |
Corentin Wallez | 163965d | 2017-10-11 11:38:55 -0400 | [diff] [blame] | 381 | "CoreGraphics.framework", |
Daksh Idnani | 5ec0488 | 2019-08-22 21:12:08 +0000 | [diff] [blame] | 382 | "OpenGL.framework", |
Corentin Wallez | d83f64f | 2017-02-16 10:58:46 -0500 | [diff] [blame] | 383 | ] |
| 384 | } |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 385 | } |
| 386 | |
Jamie Madill | 1f08ab2 | 2019-10-03 16:22:52 -0400 | [diff] [blame] | 387 | angle_source_set("angle_translator_headers") { |
| 388 | sources = angle_translator_exported_headers |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 389 | public_deps = [ ":includes" ] |
Jamie Madill | 1f08ab2 | 2019-10-03 16:22:52 -0400 | [diff] [blame] | 390 | } |
| 391 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 392 | angle_static_library("translator") { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 393 | sources = angle_translator_sources |
Austin Kinross | 82b5ab6 | 2015-12-11 09:30:15 -0800 | [diff] [blame] | 394 | defines = [] |
| 395 | |
Jonathan Metzman | fb9051a | 2017-10-09 16:14:06 -0700 | [diff] [blame] | 396 | if (angle_enable_essl || use_fuzzing_engine) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 397 | sources += angle_translator_essl_sources |
Austin Kinross | 82b5ab6 | 2015-12-11 09:30:15 -0800 | [diff] [blame] | 398 | defines += [ "ANGLE_ENABLE_ESSL" ] |
| 399 | } |
| 400 | |
Jonathan Metzman | fb9051a | 2017-10-09 16:14:06 -0700 | [diff] [blame] | 401 | if (angle_enable_glsl || use_fuzzing_engine) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 402 | sources += angle_translator_glsl_sources |
Austin Kinross | 82b5ab6 | 2015-12-11 09:30:15 -0800 | [diff] [blame] | 403 | defines += [ "ANGLE_ENABLE_GLSL" ] |
| 404 | } |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 405 | |
Jonathan Metzman | fb9051a | 2017-10-09 16:14:06 -0700 | [diff] [blame] | 406 | if (angle_enable_hlsl || use_fuzzing_engine) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 407 | sources += angle_translator_hlsl_sources |
Austin Kinross | 82b5ab6 | 2015-12-11 09:30:15 -0800 | [diff] [blame] | 408 | defines += [ "ANGLE_ENABLE_HLSL" ] |
Daniel Bratell | 73941de | 2015-02-25 14:34:49 +0100 | [diff] [blame] | 409 | } |
Jamie Madill | e794cd8 | 2017-01-13 17:29:51 -0500 | [diff] [blame] | 410 | |
Le Quyen | d200a77 | 2019-10-10 00:44:01 +0800 | [diff] [blame] | 411 | if (angle_enable_vulkan || use_fuzzing_engine || angle_enable_metal) { |
| 412 | # This translator is needed by metal backend also. |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 413 | sources += angle_translator_lib_vulkan_sources |
Le Quyen | d200a77 | 2019-10-10 00:44:01 +0800 | [diff] [blame] | 414 | } |
| 415 | |
| 416 | if (angle_enable_vulkan || use_fuzzing_engine) { |
Jamie Madill | e794cd8 | 2017-01-13 17:29:51 -0500 | [diff] [blame] | 417 | defines += [ "ANGLE_ENABLE_VULKAN" ] |
| 418 | } |
| 419 | |
Le Quyen | d200a77 | 2019-10-10 00:44:01 +0800 | [diff] [blame] | 420 | if (angle_enable_metal) { |
| 421 | sources += angle_translator_lib_metal_sources |
| 422 | defines += [ "ANGLE_ENABLE_METAL" ] |
| 423 | } |
| 424 | |
Jonah Ryan-Davis | 5afd5ec | 2019-10-25 10:53:40 -0600 | [diff] [blame] | 425 | if (angle_enable_swiftshader) { |
| 426 | defines += [ "ANGLE_ENABLE_SWIFTSHADER" ] |
| 427 | } |
| 428 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 429 | public_configs += [ ":external_config" ] |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 430 | |
| 431 | deps = [ |
| 432 | ":includes", |
| 433 | ":preprocessor", |
| 434 | ] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 435 | |
| 436 | public_deps = [ |
| 437 | ":angle_common", |
Jamie Madill | 1f08ab2 | 2019-10-03 16:22:52 -0400 | [diff] [blame] | 438 | ":angle_translator_headers", |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 439 | ] |
Jamie Madill | a8503ce | 2016-07-18 13:47:12 -0400 | [diff] [blame] | 440 | |
| 441 | if (is_win) { |
| 442 | # Necessary to suppress some system header xtree warnigns in Release. |
| 443 | # For some reason this warning doesn't get triggered in Chromium |
| 444 | cflags = [ "/wd4718" ] |
| 445 | } |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 446 | } |
| 447 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 448 | angle_source_set("translator_fuzzer") { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 449 | sources = [ "src/compiler/fuzz/translator_fuzzer.cpp" ] |
Corentin Wallez | 28b6528 | 2016-06-16 07:24:50 -0700 | [diff] [blame] | 450 | |
| 451 | include_dirs = [ |
| 452 | "include", |
| 453 | "src", |
| 454 | ] |
| 455 | |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 456 | deps = [ ":translator" ] |
Corentin Wallez | 28b6528 | 2016-06-16 07:24:50 -0700 | [diff] [blame] | 457 | } |
| 458 | |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 459 | config("commit_id_config") { |
| 460 | include_dirs = [ "$root_gen_dir/angle" ] |
Jamie Madill | 720ca44 | 2018-12-17 14:04:10 -0500 | [diff] [blame] | 461 | visibility = [ ":commit_id" ] |
| 462 | } |
| 463 | |
Geoff Lang | ba8ef68 | 2020-02-24 14:13:40 -0500 | [diff] [blame] | 464 | commit_id_output_file = "$root_gen_dir/angle/commit.h" |
| 465 | action("commit_id") { |
| 466 | script = "src/commit_id.py" |
| 467 | outputs = [ commit_id_output_file ] |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 468 | |
Geoff Lang | ba8ef68 | 2020-02-24 14:13:40 -0500 | [diff] [blame] | 469 | # Add git as a dependency if it is available. |
Geoff Lang | 20c6973 | 2020-03-06 11:02:31 -0500 | [diff] [blame] | 470 | if (angle_enable_commit_id && |
| 471 | exec_script("src/commit_id.py", [ "check" ], "value") == 1) { |
Geoff Lang | dd19d55 | 2020-03-02 09:41:22 -0500 | [diff] [blame] | 472 | # commit id should depend on angle's HEAD revision |
| 473 | inputs = [ ".git/HEAD" ] |
Tomasz Moniuszko | 319fb898 | 2015-07-30 14:34:54 +0200 | [diff] [blame] | 474 | } |
Geoff Lang | ba8ef68 | 2020-02-24 14:13:40 -0500 | [diff] [blame] | 475 | |
| 476 | args = [ |
| 477 | "gen", |
| 478 | rebase_path(commit_id_output_file, root_build_dir), |
| 479 | ] |
| 480 | |
| 481 | public_configs = [ ":commit_id_config" ] |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 482 | } |
| 483 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 484 | angle_source_set("angle_version") { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 485 | sources = [ "src/common/version.h" ] |
| 486 | public_deps = [ ":commit_id" ] |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 487 | } |
| 488 | |
Jonah Ryan-Davis | 66e4850 | 2019-04-25 10:49:05 -0400 | [diff] [blame] | 489 | config("angle_backend_config") { |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 490 | defines = [] |
Jonah Ryan-Davis | 66e4850 | 2019-04-25 10:49:05 -0400 | [diff] [blame] | 491 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 492 | if (angle_enable_d3d9) { |
| 493 | defines += [ "ANGLE_ENABLE_D3D9" ] |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 494 | } |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 495 | if (angle_enable_d3d11) { |
| 496 | defines += [ "ANGLE_ENABLE_D3D11" ] |
| 497 | } |
Geoff Lang | c588ac7 | 2015-02-13 15:41:41 -0500 | [diff] [blame] | 498 | if (angle_enable_gl) { |
| 499 | defines += [ "ANGLE_ENABLE_OPENGL" ] |
Jamie Madill | 6d94f06 | 2017-10-21 22:19:40 -0400 | [diff] [blame] | 500 | if (angle_enable_gl_null) { |
| 501 | defines += [ "ANGLE_ENABLE_OPENGL_NULL" ] |
| 502 | } |
Corentin Wallez | 51e2ad1 | 2015-05-26 11:32:58 -0400 | [diff] [blame] | 503 | } |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 504 | if (angle_enable_null) { |
| 505 | defines += [ "ANGLE_ENABLE_NULL" ] |
| 506 | } |
Jamie Madill | 1f08ab2 | 2019-10-03 16:22:52 -0400 | [diff] [blame] | 507 | |
Jonah Ryan-Davis | 5afd5ec | 2019-10-25 10:53:40 -0600 | [diff] [blame] | 508 | configs = [] |
| 509 | |
Le Quyen | d200a77 | 2019-10-10 00:44:01 +0800 | [diff] [blame] | 510 | if (angle_enable_metal) { |
Jonah Ryan-Davis | 5afd5ec | 2019-10-25 10:53:40 -0600 | [diff] [blame] | 511 | configs += [ "src/libANGLE/renderer/metal:angle_metal_backend_config" ] |
Le Quyen | d200a77 | 2019-10-10 00:44:01 +0800 | [diff] [blame] | 512 | } |
| 513 | |
Jamie Madill | 1f08ab2 | 2019-10-03 16:22:52 -0400 | [diff] [blame] | 514 | if (angle_enable_vulkan) { |
Jonah Ryan-Davis | 5afd5ec | 2019-10-25 10:53:40 -0600 | [diff] [blame] | 515 | configs += [ "src/libANGLE/renderer/vulkan:angle_vulkan_backend_config" ] |
Jamie Madill | 1f08ab2 | 2019-10-03 16:22:52 -0400 | [diff] [blame] | 516 | } |
Jonah Ryan-Davis | 66e4850 | 2019-04-25 10:49:05 -0400 | [diff] [blame] | 517 | } |
| 518 | |
| 519 | config("libANGLE_config") { |
| 520 | cflags = [] |
| 521 | defines = [] |
| 522 | libs = [] |
| 523 | ldflags = [] |
| 524 | if (angle_enable_d3d9) { |
| 525 | ldflags += [ "/DELAYLOAD:d3d9.dll" ] |
| 526 | } |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 527 | defines += [ "LIBANGLE_IMPLEMENTATION" ] |
Corentin Wallez | beb8158 | 2015-09-02 10:30:55 -0400 | [diff] [blame] | 528 | |
| 529 | if (is_win) { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 530 | cflags += [ "/wd4530" ] # C++ exception handler used, but unwind semantics |
| 531 | # are not enabled. |
Austin Kinross | 4085347 | 2015-02-12 10:39:56 -0800 | [diff] [blame] | 532 | } |
Yuly Novikov | b29fccf | 2018-11-28 10:09:39 -0500 | [diff] [blame] | 533 | |
| 534 | if (is_android && (angle_enable_gl || angle_enable_vulkan)) { |
Yuly Novikov | 8edc68e | 2019-02-12 12:41:01 -0500 | [diff] [blame] | 535 | # In API level 26 ANativeWindow APIs were moved from libandroid.so |
| 536 | # into a separate library, libnativewindow.so |
| 537 | if (ndk_api_level_at_least_26) { |
Yuly Novikov | b29fccf | 2018-11-28 10:09:39 -0500 | [diff] [blame] | 538 | libs += [ "nativewindow" ] |
| 539 | } else { |
| 540 | libs += [ "android" ] |
| 541 | } |
| 542 | } |
Michael Spang | 7cd5f64 | 2019-08-21 20:03:49 -0400 | [diff] [blame] | 543 | |
Ethan Lee | d22b8be | 2019-11-15 12:26:39 -0500 | [diff] [blame] | 544 | if (angle_use_x11) { |
Michael Spang | 7cd5f64 | 2019-08-21 20:03:49 -0400 | [diff] [blame] | 545 | defines += [ "ANGLE_USE_X11" ] |
| 546 | } |
Jamie Madill | af5e382 | 2020-01-28 10:05:36 -0500 | [diff] [blame] | 547 | |
| 548 | if (angle_enable_overlay) { |
| 549 | defines += [ "ANGLE_ENABLE_OVERLAY=1" ] |
| 550 | } |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 551 | } |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 552 | |
Jamie Madill | 1f08ab2 | 2019-10-03 16:22:52 -0400 | [diff] [blame] | 553 | angle_source_set("libANGLE_headers") { |
| 554 | sources = libangle_headers |
| 555 | public_deps = [ |
| 556 | ":angle_common", |
| 557 | ":angle_translator_headers", |
| 558 | ] |
Jamie Madill | af5e382 | 2020-01-28 10:05:36 -0500 | [diff] [blame] | 559 | public_configs += [ ":libANGLE_config" ] |
Jamie Madill | b62a1c2 | 2018-02-06 09:54:02 -0500 | [diff] [blame] | 560 | } |
| 561 | |
Jamie Madill | 2f71802 | 2019-10-28 11:48:46 -0400 | [diff] [blame] | 562 | # Don't even try to build glslang if Metal and Vulkan are disabled. |
| 563 | if (angle_enable_vulkan || angle_enable_metal) { |
| 564 | angle_source_set("angle_glslang_wrapper") { |
| 565 | sources = [ |
| 566 | "src/libANGLE/renderer/glslang_wrapper_utils.cpp", |
| 567 | "src/libANGLE/renderer/glslang_wrapper_utils.h", |
| 568 | ] |
| 569 | deps = [ |
| 570 | ":libANGLE_headers", |
| 571 | "${angle_glslang_dir}:glslang_default_resource_limits_sources", |
| 572 | "${angle_glslang_dir}:glslang_sources", |
Shahbaz Youssefi | 71e6afb | 2020-01-14 14:12:31 -0500 | [diff] [blame] | 573 | "${angle_spirv_headers_dir}:spv_headers", |
| 574 | "${angle_spirv_tools_dir}:spvtools_headers", |
Jamie Madill | 2f71802 | 2019-10-28 11:48:46 -0400 | [diff] [blame] | 575 | ] |
| 576 | } |
Le Quyen | a48f95a | 2019-10-14 14:49:49 +0800 | [diff] [blame] | 577 | } |
| 578 | |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 579 | angle_source_set("libANGLE_base") { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 580 | sources = libangle_sources |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 581 | |
Jamie Madill | 5ea762a | 2017-06-07 14:59:51 -0400 | [diff] [blame] | 582 | include_dirs = [] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 583 | libs = [] |
Corentin Wallez | 64598b5 | 2016-11-11 08:25:44 -0500 | [diff] [blame] | 584 | defines = [] |
Frank Henigman | e42ec18 | 2017-12-11 23:58:53 -0500 | [diff] [blame] | 585 | if (angle_link_glx) { |
| 586 | libs += [ "GL" ] |
| 587 | defines += [ "ANGLE_LINK_GLX" ] |
| 588 | } |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 589 | public_deps = [ |
Corentin Wallez | cc068e9 | 2016-02-29 16:37:04 -0500 | [diff] [blame] | 590 | ":angle_common", |
Jamie Madill | 720ca44 | 2018-12-17 14:04:10 -0500 | [diff] [blame] | 591 | ":angle_gpu_info_util", |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 592 | ":angle_version", |
Jamie Madill | 1f08ab2 | 2019-10-03 16:22:52 -0400 | [diff] [blame] | 593 | ":libANGLE_headers", |
Jamie Madill | 720ca44 | 2018-12-17 14:04:10 -0500 | [diff] [blame] | 594 | ":translator", |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 595 | ] |
| 596 | deps = [ |
Corentin Wallez | 878baf9 | 2017-02-15 13:57:16 -0500 | [diff] [blame] | 597 | ":angle_image_util", |
Corentin Wallez | cc068e9 | 2016-02-29 16:37:04 -0500 | [diff] [blame] | 598 | ":includes", |
Corentin Wallez | cc068e9 | 2016-02-29 16:37:04 -0500 | [diff] [blame] | 599 | ] |
| 600 | |
Jamie Madill | e55374f | 2019-10-24 12:55:12 -0400 | [diff] [blame] | 601 | if (is_win) { |
Ethan Lee | d83dc17 | 2019-11-20 01:50:36 -0500 | [diff] [blame] | 602 | if (angle_enable_d3d9) { |
| 603 | libs += [ "delayimp.lib" ] |
| 604 | } |
Jamie Madill | e55374f | 2019-10-24 12:55:12 -0400 | [diff] [blame] | 605 | libs += [ |
Jamie Madill | e55374f | 2019-10-24 12:55:12 -0400 | [diff] [blame] | 606 | "gdi32.lib", |
| 607 | "user32.lib", |
| 608 | ] |
| 609 | } |
| 610 | |
Jamie Madill | 1f08ab2 | 2019-10-03 16:22:52 -0400 | [diff] [blame] | 611 | if (angle_enable_vulkan) { |
| 612 | public_deps += [ "src/libANGLE/renderer/vulkan:angle_vulkan_backend" ] |
| 613 | } |
| 614 | |
Le Quyen | d200a77 | 2019-10-10 00:44:01 +0800 | [diff] [blame] | 615 | if (angle_enable_metal) { |
| 616 | public_deps += [ "src/libANGLE/renderer/metal:angle_metal_backend" ] |
| 617 | } |
| 618 | |
Jamie Madill | ab2bfa8 | 2019-01-15 19:06:47 -0500 | [diff] [blame] | 619 | # Enable extra Chromium style warnings for libANGLE. |
Jamie Madill | 299b1ba | 2019-10-24 09:29:18 -0400 | [diff] [blame] | 620 | if (is_clang && angle_has_build) { |
Jamie Madill | ab2bfa8 | 2019-01-15 19:06:47 -0500 | [diff] [blame] | 621 | suppressed_configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 622 | } |
| 623 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 624 | # Shared D3D sources. |
| 625 | if (angle_enable_d3d9 || angle_enable_d3d11) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 626 | sources += libangle_d3d_shared_sources |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 627 | |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 628 | defines += [ "ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ " + "\"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" ] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 629 | } |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 630 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 631 | if (angle_enable_d3d9) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 632 | sources += libangle_d3d9_sources |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 633 | libs += [ "d3d9.lib" ] |
| 634 | } |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 635 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 636 | if (angle_enable_d3d11) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 637 | sources += libangle_d3d11_sources |
Austin Kinross | 11dc163 | 2019-09-18 14:46:23 -0700 | [diff] [blame] | 638 | |
| 639 | if (angle_is_winuwp) { |
| 640 | sources += libangle_d3d11_winuwp_sources |
| 641 | } else { |
| 642 | sources += libangle_d3d11_win32_sources |
| 643 | } |
| 644 | |
Austin Kinross | 91e71ed | 2016-08-23 09:29:22 -0700 | [diff] [blame] | 645 | libs += [ "dxguid.lib" ] |
Brandon Jones | b77884b | 2018-10-10 09:07:12 -0700 | [diff] [blame] | 646 | import("src/libANGLE/renderer/d3d/d3d11/d3d11_blit_shaders_autogen.gni") |
| 647 | sources += libangle_d3d11_blit_shaders |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 648 | } |
| 649 | |
Geoff Lang | c588ac7 | 2015-02-13 15:41:41 -0500 | [diff] [blame] | 650 | if (angle_enable_gl) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 651 | sources += libangle_gl_sources |
Geoff Lang | c588ac7 | 2015-02-13 15:41:41 -0500 | [diff] [blame] | 652 | include_dirs += [ "src/third_party/khronos" ] |
| 653 | |
Jamie Madill | 6d94f06 | 2017-10-21 22:19:40 -0400 | [diff] [blame] | 654 | if (angle_enable_gl_null) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 655 | sources += libangle_gl_null_sources |
Jamie Madill | 6d94f06 | 2017-10-21 22:19:40 -0400 | [diff] [blame] | 656 | } |
Geoff Lang | c588ac7 | 2015-02-13 15:41:41 -0500 | [diff] [blame] | 657 | if (is_win) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 658 | sources += libangle_gl_wgl_sources |
Geoff Lang | c588ac7 | 2015-02-13 15:41:41 -0500 | [diff] [blame] | 659 | } |
Ethan Lee | d22b8be | 2019-11-15 12:26:39 -0500 | [diff] [blame] | 660 | if (angle_use_x11) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 661 | sources += libangle_gl_glx_sources |
Yuly Novikov | 87ae8cd | 2016-05-19 17:59:55 -0400 | [diff] [blame] | 662 | deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ] |
Corentin Wallez | cc068e9 | 2016-02-29 16:37:04 -0500 | [diff] [blame] | 663 | libs += [ |
| 664 | "X11", |
| 665 | "Xi", |
| 666 | "Xext", |
| 667 | ] |
Corentin Wallez | 47fc1fe | 2015-05-14 10:54:18 -0400 | [diff] [blame] | 668 | } |
Nico Weber | de44d3a | 2016-05-13 17:27:57 -0400 | [diff] [blame] | 669 | if (is_mac) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 670 | sources += libangle_gl_cgl_sources |
Nico Weber | de44d3a | 2016-05-13 17:27:57 -0400 | [diff] [blame] | 671 | libs += [ |
| 672 | "Cocoa.framework", |
| 673 | "IOSurface.framework", |
| 674 | "OpenGL.framework", |
| 675 | "QuartzCore.framework", |
| 676 | ] |
| 677 | } |
Yuly Novikov | a6426d6 | 2016-06-03 00:18:38 -0400 | [diff] [blame] | 678 | if (is_android) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 679 | sources += libangle_gl_egl_sources |
| 680 | sources += libangle_gl_egl_dl_sources |
| 681 | sources += libangle_gl_egl_android_sources |
Yuly Novikov | a6426d6 | 2016-06-03 00:18:38 -0400 | [diff] [blame] | 682 | } |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 683 | if (is_linux) { |
| 684 | sources += libangle_gl_egl_sources |
| 685 | sources += libangle_gl_egl_dl_sources |
| 686 | } |
Frank Henigman | e8d5c5c | 2016-07-07 13:17:47 -0400 | [diff] [blame] | 687 | if (ozone_platform_gbm) { |
Frank Henigman | 77df676 | 2016-06-13 16:39:01 -0400 | [diff] [blame] | 688 | configs += [ ":libdrm" ] |
| 689 | defines += [ "ANGLE_USE_OZONE" ] |
| 690 | deps += [ "//third_party/minigbm" ] |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 691 | sources += libangle_gl_ozone_sources |
Frank Henigman | 77df676 | 2016-06-13 16:39:01 -0400 | [diff] [blame] | 692 | } |
Geoff Lang | c588ac7 | 2015-02-13 15:41:41 -0500 | [diff] [blame] | 693 | } |
| 694 | |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 695 | if (angle_enable_null) { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 696 | sources += libangle_null_sources |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 697 | } |
| 698 | |
Geoff Lang | ecd2e3b | 2019-07-09 15:39:39 -0400 | [diff] [blame] | 699 | if (is_mac) { |
| 700 | sources += libangle_mac_sources |
| 701 | } |
| 702 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 703 | if (is_debug) { |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 704 | defines += [ "ANGLE_GENERATE_SHADER_DEBUG_INFO" ] |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 705 | } |
| 706 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 707 | configs += [ ":debug_annotations_config" ] |
Jonah Ryan-Davis | 66e4850 | 2019-04-25 10:49:05 -0400 | [diff] [blame] | 708 | public_configs += [ |
| 709 | ":libANGLE_config", |
| 710 | ":angle_backend_config", |
| 711 | ] |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 712 | |
Tom Tan | 5c31753 | 2018-11-30 17:01:01 -0800 | [diff] [blame] | 713 | # Windows ARM64 is available since 10.0.16299 so no need to copy |
| 714 | # d3dcompiler_47.dll because this file is available as inbox. |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 715 | if (_use_copy_compiler_dll) { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 716 | data_deps = [ ":copy_compiler_dll" ] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 717 | } |
| 718 | } |
| 719 | |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 720 | config("angle_frame_capture_disabled") { |
| 721 | defines = [ "ANGLE_CAPTURE_ENABLED=0" ] |
| 722 | } |
| 723 | |
| 724 | config("angle_frame_capture_enabled") { |
| 725 | defines = [ "ANGLE_CAPTURE_ENABLED=1" ] |
| 726 | } |
| 727 | |
| 728 | angle_source_set("libANGLE") { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 729 | public_deps = [ ":libANGLE_base" ] |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 730 | public_configs = [ ":angle_frame_capture_disabled" ] |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 731 | sources = [ "src/libANGLE/FrameCapture_mock.cpp" ] |
Jiacheng Lu | 9e14a19 | 2019-08-09 10:03:24 -0600 | [diff] [blame] | 732 | |
| 733 | # gl_enum_utils defaults included in with_capture build |
Brandon Schade | 5cfab19 | 2019-10-28 09:12:53 -0700 | [diff] [blame] | 734 | deps = [] |
Jiacheng Lu | 9e14a19 | 2019-08-09 10:03:24 -0600 | [diff] [blame] | 735 | if (angle_enable_trace || is_debug) { |
Brandon Schade | 5cfab19 | 2019-10-28 09:12:53 -0700 | [diff] [blame] | 736 | deps += [ ":angle_gl_enum_utils" ] |
Jiacheng Lu | 9e14a19 | 2019-08-09 10:03:24 -0600 | [diff] [blame] | 737 | } |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 738 | } |
| 739 | |
Brandon Schade | 5cfab19 | 2019-10-28 09:12:53 -0700 | [diff] [blame] | 740 | angle_source_set("angle_gl_enum_utils") { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 741 | public_deps = [ ":libANGLE_base" ] |
Brandon Schade | 5cfab19 | 2019-10-28 09:12:53 -0700 | [diff] [blame] | 742 | sources = [ |
| 743 | "src/libANGLE/gl_enum_utils.cpp", |
| 744 | "src/libANGLE/gl_enum_utils_autogen.cpp", |
| 745 | ] |
| 746 | } |
| 747 | |
Jamie Madill | 7e453a2 | 2020-03-15 22:11:03 -0400 | [diff] [blame] | 748 | config("angle_compression_config") { |
| 749 | include_dirs = [ "//third_party/zlib/google" ] |
| 750 | } |
| 751 | |
| 752 | group("angle_compression") { |
| 753 | public_configs = [ |
| 754 | ":angle_compression_config", |
| 755 | "//third_party/zlib:zlib_config", |
| 756 | ] |
| 757 | public_deps = [ "//third_party/zlib/google:compression_utils_portable" ] |
| 758 | } |
| 759 | |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 760 | angle_source_set("libANGLE_with_capture") { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 761 | public_deps = [ ":libANGLE_base" ] |
Jamie Madill | 7e453a2 | 2020-03-15 22:11:03 -0400 | [diff] [blame] | 762 | deps = [ ":angle_compression" ] |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 763 | public_configs = [ ":angle_frame_capture_enabled" ] |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 764 | sources = libangle_capture_sources |
| 765 | } |
| 766 | |
Robert Sesek | db8ae83 | 2016-06-21 11:47:03 -0400 | [diff] [blame] | 767 | config("shared_library_public_config") { |
| 768 | if (is_mac && !is_component_build) { |
| 769 | # Executable targets that depend on the shared libraries below need to have |
| 770 | # the rpath setup in non-component build configurations. |
Jamie Madill | a8503ce | 2016-07-18 13:47:12 -0400 | [diff] [blame] | 771 | ldflags = [ |
| 772 | "-rpath", |
| 773 | "@executable_path/", |
| 774 | ] |
Jonah Ryan-Davis | 90a8af3 | 2020-03-05 13:48:47 -0500 | [diff] [blame] | 775 | if (build_with_chromium) { |
| 776 | ldflags += [ |
| 777 | # Path for loading shared libraries for unbundled binaries. |
| 778 | # From //build/config/mac/BUILD.gn, this is only added for |
| 779 | # component builds. However, since ANGLE always dynamically |
| 780 | # links to libvulkan, it should be re-added for non-component |
| 781 | # builds. (anglebug.com/4455) |
| 782 | "-Wl,-rpath,@loader_path/.", |
| 783 | ] |
| 784 | } |
Robert Sesek | db8ae83 | 2016-06-21 11:47:03 -0400 | [diff] [blame] | 785 | } |
Josh Matthews | 732c9d0 | 2019-11-29 13:59:03 -0500 | [diff] [blame] | 786 | |
| 787 | if (angle_is_winuwp) { |
| 788 | ldflags = [ |
| 789 | "/APPCONTAINER", |
| 790 | |
| 791 | # Disable warning about invalid subsystem number. |
| 792 | # A default appropriate subsystem is selected automatically. |
| 793 | "/IGNORE:4010", |
| 794 | ] |
| 795 | } |
Robert Sesek | db8ae83 | 2016-06-21 11:47:03 -0400 | [diff] [blame] | 796 | } |
| 797 | |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 798 | config("library_name_config") { |
Yuly Novikov | 8b8dc56 | 2020-02-26 19:09:31 -0500 | [diff] [blame] | 799 | if (is_component_build && is_android) { |
| 800 | defines = [ |
| 801 | "ANGLE_EGL_LIBRARY_NAME=\"libEGL${angle_libs_suffix}.cr\"", |
| 802 | "ANGLE_GLESV2_LIBRARY_NAME=\"libGLESv2${angle_libs_suffix}.cr\"", |
| 803 | ] |
| 804 | } else { |
| 805 | defines = [ |
| 806 | "ANGLE_EGL_LIBRARY_NAME=\"libEGL${angle_libs_suffix}\"", |
| 807 | "ANGLE_GLESV2_LIBRARY_NAME=\"libGLESv2${angle_libs_suffix}\"", |
| 808 | ] |
| 809 | } |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 810 | } |
| 811 | |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 812 | # This config controls export definitions on ANGLE API calls. |
| 813 | config("angle_static") { |
| 814 | defines = [ |
| 815 | "ANGLE_EXPORT=", |
Jamie Madill | ba319ba | 2018-12-29 10:29:33 -0500 | [diff] [blame] | 816 | "ANGLE_UTIL_EXPORT=", |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 817 | "EGLAPI=", |
| 818 | "GL_APICALL=", |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 819 | "GL_API=", |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 820 | ] |
| 821 | } |
| 822 | |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 823 | set_defaults("angle_libGLESv2") { |
| 824 | sources = [] |
| 825 | output_name = "libGLESv2" |
| 826 | } |
| 827 | |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 828 | template("angle_libGLESv2") { |
| 829 | angle_shared_library(target_name) { |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 830 | sources = libglesv2_sources + invoker.sources |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 831 | |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 832 | if (is_win) { |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 833 | sources += [ "src/libGLESv2/${invoker.output_name}_autogen.def" ] |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 834 | } |
| 835 | |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 836 | output_name = "${invoker.output_name}${angle_libs_suffix}" |
| 837 | |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 838 | configs += [ |
| 839 | ":angle_gl_visibility_config", |
| 840 | ":debug_annotations_config", |
| 841 | ":gl_prototypes", |
| 842 | ] |
| 843 | |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 844 | defines = [ "LIBGLESV2_IMPLEMENTATION" ] |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 845 | |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 846 | deps = invoker.deps + [ ":includes" ] |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 847 | |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 848 | public_deps = [ ":angle_version" ] |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 849 | } |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 850 | } |
John Abd-El-Malek | 657cd68 | 2014-11-05 14:04:19 -0800 | [diff] [blame] | 851 | |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 852 | angle_libGLESv2("libGLESv2") { |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 853 | if (angle_with_capture_by_default) { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 854 | deps = [ ":libANGLE_with_capture" ] |
Jiacheng Lu | 617f23d | 2019-08-12 10:11:53 -0600 | [diff] [blame] | 855 | } else { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 856 | deps = [ ":libANGLE" ] |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 857 | } |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 858 | } |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 859 | |
Jiacheng Lu | 617f23d | 2019-08-12 10:11:53 -0600 | [diff] [blame] | 860 | # Output capture lib when `angle_with_capture_by_default` disabled, vice versa. |
| 861 | angle_libGLESv2("libGLESv2_capture_complement") { |
| 862 | if (angle_with_capture_by_default) { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 863 | deps = [ ":libANGLE" ] |
Jiacheng Lu | 617f23d | 2019-08-12 10:11:53 -0600 | [diff] [blame] | 864 | output_name += "_no_capture" |
| 865 | } else { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 866 | deps = [ ":libANGLE_with_capture" ] |
Jiacheng Lu | 617f23d | 2019-08-12 10:11:53 -0600 | [diff] [blame] | 867 | output_name += "_with_capture" |
Jamie Madill | eb1b164 | 2019-07-30 17:22:17 -0400 | [diff] [blame] | 868 | } |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 869 | } |
| 870 | |
Austin Kinross | 11dc163 | 2019-09-18 14:46:23 -0700 | [diff] [blame] | 871 | if (is_win && !angle_is_winuwp) { |
Clemen Deng | cb8b4a5 | 2019-07-04 16:05:25 -0400 | [diff] [blame] | 872 | angle_shared_library("libGL") { |
| 873 | sources = libgl_sources |
Clemen Deng | 663b048 | 2019-07-11 12:37:35 -0400 | [diff] [blame] | 874 | |
Clemen Deng | 6e7dd1e | 2019-07-16 13:41:59 -0400 | [diff] [blame] | 875 | output_name = "openGL32" |
| 876 | output_dir = "$root_out_dir/angle_libs" |
Clemen Deng | 7558e83 | 2019-06-18 13:02:03 -0400 | [diff] [blame] | 877 | |
| 878 | configs += [ |
| 879 | ":angle_gl_visibility_config", |
| 880 | ":debug_annotations_config", |
| 881 | ":gl_prototypes", |
| 882 | ] |
| 883 | |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 884 | defines = [ |
| 885 | "ANGLE_CAPTURE_ENABLED=0", |
Clemen Deng | cb8b4a5 | 2019-07-04 16:05:25 -0400 | [diff] [blame] | 886 | "LIBGL_IMPLEMENTATION", |
Jamie Madill | 612b741 | 2019-07-05 11:13:30 -0400 | [diff] [blame] | 887 | ] |
Clemen Deng | 7558e83 | 2019-06-18 13:02:03 -0400 | [diff] [blame] | 888 | |
| 889 | deps = [ |
| 890 | ":includes", |
| 891 | ":libANGLE", |
| 892 | ] |
| 893 | |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 894 | public_deps = [ ":angle_version" ] |
Clemen Deng | 7558e83 | 2019-06-18 13:02:03 -0400 | [diff] [blame] | 895 | } |
| 896 | } |
| 897 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 898 | angle_static_library("libGLESv2_static") { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 899 | sources = libglesv2_sources |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 900 | configs += [ ":debug_annotations_config" ] |
| 901 | public_configs += [ ":angle_static" ] |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 902 | deps = [ ":includes" ] |
| 903 | public_deps = [ ":libANGLE" ] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 904 | } |
| 905 | |
Jamie Madill | 77c8496 | 2019-06-28 11:24:27 -0400 | [diff] [blame] | 906 | angle_shared_library("libGLESv1_CM") { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 907 | sources = libglesv1_cm_sources |
Jamie Madill | 77c8496 | 2019-06-28 11:24:27 -0400 | [diff] [blame] | 908 | output_name = "libGLESv1_CM${angle_libs_suffix}" |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 909 | |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 910 | configs += [ |
Courtney Goeltzenleuchter | 7d81ae7 | 2018-10-08 19:25:19 -0600 | [diff] [blame] | 911 | ":angle_gl_visibility_config", |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 912 | ":debug_annotations_config", |
Jamie Madill | ba319ba | 2018-12-29 10:29:33 -0500 | [diff] [blame] | 913 | ":gl_prototypes", |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 914 | ] |
| 915 | |
| 916 | defines = [] |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 917 | |
| 918 | deps = [ |
| 919 | ":includes", |
Jamie Madill | 77c8496 | 2019-06-28 11:24:27 -0400 | [diff] [blame] | 920 | ":libGLESv2", |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 921 | ] |
| 922 | } |
| 923 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 924 | angle_static_library("libGLESv1_CM_static") { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 925 | sources = libglesv1_cm_sources |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 926 | configs += [ ":debug_annotations_config" ] |
| 927 | public_configs += [ ":angle_static" ] |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 928 | deps = [ |
| 929 | ":includes", |
| 930 | ":libGLESv2_static", |
| 931 | ] |
| 932 | } |
| 933 | |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 934 | config("libEGL_egl_loader_config") { |
| 935 | defines = [ "ANGLE_USE_EGL_LOADER" ] |
| 936 | } |
| 937 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 938 | angle_source_set("libEGL_egl_loader") { |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 939 | sources = [ |
| 940 | "src/libEGL/egl_loader_autogen.cpp", |
| 941 | "src/libEGL/egl_loader_autogen.h", |
| 942 | ] |
| 943 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 944 | public_configs += [ |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 945 | ":libEGL_egl_loader_config", |
| 946 | ":gl_prototypes", |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 947 | ] |
| 948 | |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 949 | deps = [ ":includes" ] |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 950 | } |
| 951 | |
Jamie Madill | 77c8496 | 2019-06-28 11:24:27 -0400 | [diff] [blame] | 952 | angle_shared_library("libEGL") { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 953 | sources = libegl_sources |
Jamie Madill | 77c8496 | 2019-06-28 11:24:27 -0400 | [diff] [blame] | 954 | output_name = "libEGL${angle_libs_suffix}" |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 955 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 956 | configs += [ |
Corentin Wallez | beb8158 | 2015-09-02 10:30:55 -0400 | [diff] [blame] | 957 | ":debug_annotations_config", |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 958 | ":library_name_config", |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 959 | ] |
| 960 | |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 961 | defines = [ "LIBEGL_IMPLEMENTATION" ] |
Yuly Novikov | a4ab580 | 2016-12-19 17:44:22 -0500 | [diff] [blame] | 962 | if (is_win) { |
| 963 | defines += [ "EGLAPI=" ] |
| 964 | } else { |
| 965 | defines += [ "EGLAPI=__attribute__((visibility(\"default\")))" ] |
| 966 | } |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 967 | |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 968 | if (is_win) { |
Nico Weber | 9db8df4 | 2019-01-04 14:47:27 -0500 | [diff] [blame] | 969 | sources += [ "src/libEGL/libEGL.def" ] |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 970 | } |
| 971 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 972 | deps = [ |
James Darpinian | 22ec7dc | 2019-08-06 10:10:52 -0700 | [diff] [blame] | 973 | ":angle_common", |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 974 | ":angle_system_utils", |
| 975 | ":angle_version", |
| 976 | ":libEGL_egl_loader", |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 977 | ] |
Jamie Madill | 720ca44 | 2018-12-17 14:04:10 -0500 | [diff] [blame] | 978 | |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 979 | public_deps = [ ":includes" ] |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 980 | |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 981 | data_deps = [ ":libGLESv2" ] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 982 | } |
Corentin Wallez | beb8158 | 2015-09-02 10:30:55 -0400 | [diff] [blame] | 983 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 984 | angle_static_library("libEGL_static") { |
Frank Henigman | 44b2c0b | 2018-08-29 17:31:27 -0400 | [diff] [blame] | 985 | sources = libegl_sources |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 986 | |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 987 | configs += [ |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 988 | ":debug_annotations_config", |
Jamie Madill | 4638dc9 | 2018-12-17 13:13:49 -0500 | [diff] [blame] | 989 | ":library_name_config", |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 990 | ] |
| 991 | |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 992 | public_configs += [ ":angle_static" ] |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 993 | |
| 994 | deps = [ |
| 995 | ":includes", |
| 996 | ":libGLESv2_static", |
| 997 | ] |
| 998 | } |
| 999 | |
Ken Russell | fcadd08 | 2017-06-28 14:01:15 -0700 | [diff] [blame] | 1000 | # Convenience targets for some of the samples so they can be built |
| 1001 | # with Chromium's toolchain. |
Jamie Madill | 7098cff | 2019-01-15 18:33:42 -0500 | [diff] [blame] | 1002 | angle_executable("angle_shader_translator") { |
Ken Russell | fcadd08 | 2017-06-28 14:01:15 -0700 | [diff] [blame] | 1003 | testonly = true |
| 1004 | |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 1005 | sources = [ "samples/shader_translator/shader_translator.cpp" ] |
Ken Russell | fcadd08 | 2017-06-28 14:01:15 -0700 | [diff] [blame] | 1006 | |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 1007 | deps = [ ":translator" ] |
Ken Russell | fcadd08 | 2017-06-28 14:01:15 -0700 | [diff] [blame] | 1008 | } |
Courtney Goeltzenleuchter | 2565d48 | 2018-04-12 17:06:48 -0600 | [diff] [blame] | 1009 | |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 1010 | if (angle_has_build) { |
| 1011 | config("angle_feature_support_config") { |
| 1012 | include_dirs = [ |
| 1013 | "include", |
| 1014 | "src", |
| 1015 | ] |
| 1016 | defines = [ "LIBFEATURE_SUPPORT_IMPLEMENTATION" ] |
| 1017 | if (is_debug) { |
| 1018 | defines += [ "ANGLE_FEATURE_UTIL_LOG_VERBOSE" ] |
| 1019 | } |
Ian Elliott | a9d579e | 2018-11-28 11:44:48 -0700 | [diff] [blame] | 1020 | } |
Courtney Goeltzenleuchter | 7d81ae7 | 2018-10-08 19:25:19 -0600 | [diff] [blame] | 1021 | |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 1022 | angle_shared_library("libfeature_support") { |
| 1023 | output_name = "libfeature_support${angle_libs_suffix}" |
Ian Elliott | a9d579e | 2018-11-28 11:44:48 -0700 | [diff] [blame] | 1024 | |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 1025 | if (is_android) { |
| 1026 | libs = [ "log" ] |
| 1027 | } |
| 1028 | |
| 1029 | public_configs += [ |
| 1030 | ":angle_feature_support_config", |
| 1031 | "${angle_jsoncpp_dir}:jsoncpp_config", |
| 1032 | ] |
| 1033 | |
| 1034 | if (is_mac && !is_component_build) { |
| 1035 | ldflags = [ |
| 1036 | "-install_name", |
| 1037 | "@rpath/${target_name}.dylib", |
| 1038 | ] |
| 1039 | } |
| 1040 | |
| 1041 | sources = [ |
| 1042 | "src/feature_support_util/feature_support_util.cpp", |
| 1043 | "src/feature_support_util/feature_support_util.h", |
| 1044 | ] |
| 1045 | |
| 1046 | deps = [ |
| 1047 | ":angle_gpu_info_util", |
| 1048 | "${angle_jsoncpp_dir}:jsoncpp", |
Cezary Kulakowski | 4fb738f | 2019-02-01 10:53:44 +0100 | [diff] [blame] | 1049 | ] |
| 1050 | } |
Ian Elliott | a9d579e | 2018-11-28 11:44:48 -0700 | [diff] [blame] | 1051 | } |
| 1052 | |
Jamie Madill | 1f56ed2 | 2019-01-03 15:24:22 -0500 | [diff] [blame] | 1053 | if (!is_component_build && is_android && symbol_level != 0) { |
| 1054 | action_foreach("compressed_symbols") { |
Courtney Goeltzenleuchter | c05c141 | 2019-01-03 12:40:13 -0700 | [diff] [blame] | 1055 | sources = [] |
| 1056 | foreach(_library, angle_libraries) { |
Jamie Madill | 77c8496 | 2019-06-28 11:24:27 -0400 | [diff] [blame] | 1057 | sources += [ "$root_out_dir/${_library}${angle_libs_suffix}.so" ] |
Courtney Goeltzenleuchter | c05c141 | 2019-01-03 12:40:13 -0700 | [diff] [blame] | 1058 | } |
| 1059 | if (angle_enable_vulkan_validation_layers) { |
| 1060 | foreach(_layer, vulkan_validation_layers) { |
Jamie Madill | 77c8496 | 2019-06-28 11:24:27 -0400 | [diff] [blame] | 1061 | sources += [ "$root_out_dir/lib${_layer}.so" ] |
Courtney Goeltzenleuchter | c05c141 | 2019-01-03 12:40:13 -0700 | [diff] [blame] | 1062 | } |
| 1063 | } |
Jamie Madill | 1f56ed2 | 2019-01-03 15:24:22 -0500 | [diff] [blame] | 1064 | |
| 1065 | script = rebase_path("${root_build_dir}/android/compress_symbols.py", |
| 1066 | root_build_dir) |
| 1067 | |
Courtney Goeltzenleuchter | c05c141 | 2019-01-03 12:40:13 -0700 | [diff] [blame] | 1068 | deps = [] |
| 1069 | foreach(_library, angle_libraries) { |
Jamie Madill | 77c8496 | 2019-06-28 11:24:27 -0400 | [diff] [blame] | 1070 | deps += [ ":$_library" ] |
Courtney Goeltzenleuchter | c05c141 | 2019-01-03 12:40:13 -0700 | [diff] [blame] | 1071 | } |
| 1072 | |
| 1073 | if (angle_enable_vulkan_validation_layers) { |
| 1074 | foreach(_layer, vulkan_validation_layers) { |
Tobin Ehlis | f22f16d | 2019-07-18 15:10:49 -0600 | [diff] [blame] | 1075 | deps += [ |
| 1076 | "${angle_root}/third_party/vulkan-validation-layers/src:${_layer}", |
| 1077 | ] |
Courtney Goeltzenleuchter | c05c141 | 2019-01-03 12:40:13 -0700 | [diff] [blame] | 1078 | } |
| 1079 | } |
Jamie Madill | 1f56ed2 | 2019-01-03 15:24:22 -0500 | [diff] [blame] | 1080 | |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 1081 | outputs = [ "$root_out_dir/lib.compressed/{{source_file_part}}" ] |
Jamie Madill | 1f56ed2 | 2019-01-03 15:24:22 -0500 | [diff] [blame] | 1082 | |
| 1083 | android_nm = "${android_tool_prefix}nm" |
Tim Van Patten | 73e17bf | 2019-05-14 10:42:25 -0600 | [diff] [blame] | 1084 | android_strip = "${android_tool_prefix}strip" |
Jamie Madill | 1f56ed2 | 2019-01-03 15:24:22 -0500 | [diff] [blame] | 1085 | |
| 1086 | args = [ |
| 1087 | "--objcopy", |
| 1088 | rebase_path(android_objcopy, root_build_dir), |
| 1089 | "--nm", |
| 1090 | rebase_path(android_nm, root_build_dir), |
Tim Van Patten | 73e17bf | 2019-05-14 10:42:25 -0600 | [diff] [blame] | 1091 | "--strip", |
| 1092 | rebase_path(android_strip, root_build_dir), |
Jamie Madill | 1f56ed2 | 2019-01-03 15:24:22 -0500 | [diff] [blame] | 1093 | "--unstrippedsofile", |
| 1094 | "{{source_dir}}/lib.unstripped/{{source_file_part}}", |
| 1095 | "--output", |
| 1096 | "{{source_dir}}/lib.compressed/{{source_file_part}}", |
| 1097 | ] |
| 1098 | } |
| 1099 | } |
| 1100 | |
Geoff Lang | 6e687af | 2019-10-17 14:36:41 -0400 | [diff] [blame] | 1101 | if (build_with_chromium && !is_component_build && is_android && |
Courtney Goeltzenleuchter | 92b16ea | 2018-12-12 17:06:47 -0700 | [diff] [blame] | 1102 | current_toolchain == default_toolchain) { |
Cody Northrop | 8cbd321 | 2019-04-23 13:25:20 -0600 | [diff] [blame] | 1103 | # Package ANGLE libraries |
| 1104 | angle_apk("angle_chromium_apk") { |
| 1105 | package_name = "com.chromium.angle" |
Tim Van Patten | ee4fa07 | 2019-02-21 19:21:09 +0000 | [diff] [blame] | 1106 | apk_name = "AngleLibraries" |
Cody Northrop | 8e63644 | 2018-11-30 16:24:11 -0700 | [diff] [blame] | 1107 | } |
| 1108 | |
| 1109 | group("angle_apks") { |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 1110 | deps = [ ":angle_chromium_apk" ] |
Courtney Goeltzenleuchter | 2565d48 | 2018-04-12 17:06:48 -0600 | [diff] [blame] | 1111 | } |
| 1112 | } |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 1113 | |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 1114 | group("angle") { |
| 1115 | data_deps = [ |
Julien Isorce | 5641d19 | 2020-02-04 21:31:47 -0800 | [diff] [blame] | 1116 | ":libEGL", |
Jamie Madill | e3c2571 | 2019-12-03 14:08:36 -0500 | [diff] [blame] | 1117 | ":libGLESv1_CM", |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 1118 | ":libGLESv2", |
Jamie Madill | 1ba7254 | 2019-10-04 15:17:49 -0400 | [diff] [blame] | 1119 | ] |
| 1120 | } |