Corentin Wallez | d4bcfa2 | 2015-09-01 10:32:30 -0400 | [diff] [blame] | 1 | # Copyright 2014-2015 The Chromium 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 |
Jamie Madill | e31fd87 | 2016-05-27 08:35:36 -0400 | [diff] [blame] | 6 | import("//build/config/dcheck_always_on.gni") |
Frank Henigman | 77df676 | 2016-06-13 16:39:01 -0400 | [diff] [blame] | 7 | import("//build/config/linux/pkg_config.gni") |
Corentin Wallez | 51e2ad1 | 2015-05-26 11:32:58 -0400 | [diff] [blame] | 8 | import("//build/config/ui.gni") |
Corentin Wallez | 28b6528 | 2016-06-16 07:24:50 -0700 | [diff] [blame] | 9 | import("//testing/libfuzzer/fuzzer_test.gni") |
Frank Henigman | d0ef13a | 2017-08-28 22:53:24 -0400 | [diff] [blame] | 10 | import("gni/angle.gni") |
Courtney Goeltzenleuchter | 2565d48 | 2018-04-12 17:06:48 -0600 | [diff] [blame] | 11 | if (is_android) { |
| 12 | # android/rules.gni can only be imported for Android targets |
| 13 | import("//build/config/android/rules.gni") |
| 14 | } |
Corentin Wallez | 51e2ad1 | 2015-05-26 11:32:58 -0400 | [diff] [blame] | 15 | |
Corentin Wallez | 16d4e47 | 2017-03-20 13:06:19 -0400 | [diff] [blame] | 16 | declare_args() { |
| 17 | # Use the PCI lib to collect GPU information on Linux. |
| 18 | use_libpci = is_linux && (!is_chromecast || is_cast_desktop_build) && |
| 19 | (use_x11 || use_ozone) |
Frank Henigman | e42ec18 | 2017-12-11 23:58:53 -0500 | [diff] [blame] | 20 | |
| 21 | # Link in system libGL, to work with apitrace. See doc/DebuggingTips.md. |
| 22 | angle_link_glx = false |
Corentin Wallez | 16d4e47 | 2017-03-20 13:06:19 -0400 | [diff] [blame] | 23 | } |
| 24 | |
Frank Henigman | d0ef13a | 2017-08-28 22:53:24 -0400 | [diff] [blame] | 25 | if (!build_with_chromium) { |
| 26 | group("all") { |
| 27 | testonly = true |
| 28 | deps = [ |
| 29 | ":angle_shader_translator", |
| 30 | ":translator_fuzzer", |
| 31 | "//samples:all", |
| 32 | "//src/tests:all", |
| 33 | ] |
| 34 | } |
| 35 | } |
| 36 | |
Frank Henigman | e8d5c5c | 2016-07-07 13:17:47 -0400 | [diff] [blame] | 37 | if (ozone_platform_gbm) { |
Frank Henigman | 62ba962 | 2016-06-27 17:08:28 -0400 | [diff] [blame] | 38 | pkg_config("libdrm") { |
| 39 | packages = [ "libdrm" ] |
| 40 | } |
Frank Henigman | 77df676 | 2016-06-13 16:39:01 -0400 | [diff] [blame] | 41 | } |
| 42 | |
Tomasz Moniuszko | 319fb898 | 2015-07-30 14:34:54 +0200 | [diff] [blame] | 43 | angle_git_is_present = exec_script("src/commit_id.py", |
| 44 | [ |
| 45 | "check", |
| 46 | rebase_path(".", root_build_dir), |
| 47 | ], |
| 48 | "value") |
| 49 | |
| 50 | angle_use_commit_id = angle_git_is_present == 1 |
| 51 | |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 52 | gles_gypi = exec_script("//build/gypi_to_gn.py", |
| 53 | [ rebase_path("src/libGLESv2.gypi") ], |
| 54 | "scope", |
| 55 | [ "src/libGLESv2.gypi" ]) |
Brett Wilson | 04bac60 | 2014-07-16 14:19:18 -0700 | [diff] [blame] | 56 | |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 57 | compiler_gypi = exec_script("//build/gypi_to_gn.py", |
| 58 | [ rebase_path("src/compiler.gypi") ], |
| 59 | "scope", |
| 60 | [ "src/compiler.gypi" ]) |
Brett Wilson | 04bac60 | 2014-07-16 14:19:18 -0700 | [diff] [blame] | 61 | |
Brett Wilson | 2f5469c | 2014-07-22 17:00:17 -0700 | [diff] [blame] | 62 | # This config is exported to dependent targets (and also applied to internal |
| 63 | # ones). |
| 64 | config("external_config") { |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 65 | include_dirs = [ "include" ] |
Brett Wilson | 2f5469c | 2014-07-22 17:00:17 -0700 | [diff] [blame] | 66 | } |
| 67 | |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 68 | # This config is applied to internal Angle targets (not pushed to dependents). |
| 69 | config("internal_config") { |
| 70 | include_dirs = [ |
| 71 | "include", |
| 72 | "src", |
| 73 | ] |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 74 | |
| 75 | # Prevent the GL headers from redeclaring ANGLE entry points. |
| 76 | defines = [ |
| 77 | "GL_GLEXT_PROTOTYPES", |
| 78 | "EGL_EGLEXT_PROTOTYPES", |
| 79 | ] |
Jamie Madill | 6de5185 | 2017-04-12 09:53:01 -0400 | [diff] [blame] | 80 | |
Courtney Goeltzenleuchter | b001528 | 2018-05-18 16:48:50 -0600 | [diff] [blame] | 81 | if (angle_64bit_current_cpu) { |
Yuly Novikov | c4f1dd8 | 2017-10-25 17:02:29 -0400 | [diff] [blame] | 82 | defines += [ "ANGLE_IS_64_BIT_CPU" ] |
Courtney Goeltzenleuchter | b001528 | 2018-05-18 16:48:50 -0600 | [diff] [blame] | 83 | } else { |
| 84 | defines += [ "ANGLE_IS_32_BIT_CPU" ] |
Jamie Madill | 6de5185 | 2017-04-12 09:53:01 -0400 | [diff] [blame] | 85 | } |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 86 | } |
| 87 | |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 88 | config("extra_warnings") { |
Ben Wagner | 211bff3 | 2017-10-10 23:53:20 -0400 | [diff] [blame] | 89 | cflags = [] |
Frank Henigman | d0ef13a | 2017-08-28 22:53:24 -0400 | [diff] [blame] | 90 | |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 91 | # Enable more default warnings on Windows. |
| 92 | if (is_win) { |
Ben Wagner | 211bff3 | 2017-10-10 23:53:20 -0400 | [diff] [blame] | 93 | cflags += [ |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 94 | "/we4244", # Conversion: possible loss of data. |
| 95 | "/we4456", # Variable shadowing. |
Jamie Madill | 1db8a26 | 2016-09-22 13:53:47 -0400 | [diff] [blame] | 96 | "/we4458", # declaration hides class member. |
Geoff Lang | b944053 | 2017-11-28 13:26:34 -0500 | [diff] [blame] | 97 | "/we4800", # forcing value to bool. |
| 98 | "/we4838", # narrowing conversion. |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 99 | ] |
| 100 | } |
Ben Wagner | 211bff3 | 2017-10-10 23:53:20 -0400 | [diff] [blame] | 101 | if (is_clang) { |
Nico Weber | 79de62c | 2018-01-31 10:47:14 -0500 | [diff] [blame] | 102 | cflags += [ |
| 103 | # Remove when crbug.com/428099 is resolved. |
| 104 | "-Winconsistent-missing-override", |
Courtney Goeltzenleuchter | 1521526 | 2018-04-11 12:14:55 -0600 | [diff] [blame] | 105 | "-Wunneeded-internal-declaration", |
Olli Etuaho | 8073a95 | 2018-05-09 16:41:39 +0300 | [diff] [blame] | 106 | "-Wnon-virtual-dtor", |
Nico Weber | 79de62c | 2018-01-31 10:47:14 -0500 | [diff] [blame] | 107 | ] |
Ben Wagner | 211bff3 | 2017-10-10 23:53:20 -0400 | [diff] [blame] | 108 | } |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 109 | } |
| 110 | |
Courtney Goeltzenleuchter | 4607148 | 2018-05-15 13:35:15 -0600 | [diff] [blame] | 111 | # This config adds build-ids to the associated library. |
| 112 | # -Wl is a special option that indicates that clang should pass the associated |
| 113 | # option --build-id to the linker. This will cause a build-id section to be added |
| 114 | # to the associated library. The build-id makes it possible for a debugger to |
| 115 | # find the right symbol file to use. |
| 116 | config("build_id_config") { |
| 117 | ldflags = [ "-Wl,--build-id" ] |
| 118 | } |
| 119 | |
Daniel Bratell | 73941de | 2015-02-25 14:34:49 +0100 | [diff] [blame] | 120 | if (is_win) { |
Daniel Bratell | 73941de | 2015-02-25 14:34:49 +0100 | [diff] [blame] | 121 | copy("copy_compiler_dll") { |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 122 | sources = [ |
| 123 | "$windows_sdk_path/Redist/D3D/$target_cpu/d3dcompiler_47.dll", |
| 124 | ] |
| 125 | outputs = [ |
| 126 | "$root_out_dir/d3dcompiler_47.dll", |
| 127 | ] |
Daniel Bratell | 73941de | 2015-02-25 14:34:49 +0100 | [diff] [blame] | 128 | } |
Daniel Bratell | 73941de | 2015-02-25 14:34:49 +0100 | [diff] [blame] | 129 | } |
| 130 | |
Jamie Madill | a8503ce | 2016-07-18 13:47:12 -0400 | [diff] [blame] | 131 | angle_undefine_configs = [ "//build/config/compiler:default_include_dirs" ] |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 132 | |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 133 | # Holds the shared includes so we only need to list them once. |
| 134 | source_set("includes") { |
Jamie Madill | ff7aac5 | 2017-11-13 16:57:14 -0500 | [diff] [blame] | 135 | sources = rebase_path(gles_gypi.libangle_includes, ".", "src") |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 136 | } |
| 137 | |
| 138 | static_library("preprocessor") { |
Brett Wilson | 04bac60 | 2014-07-16 14:19:18 -0700 | [diff] [blame] | 139 | sources = rebase_path(compiler_gypi.angle_preprocessor_sources, ".", "src") |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 140 | |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 141 | configs -= angle_undefine_configs |
Ben Wagner | d736ccc | 2017-10-11 15:08:22 -0400 | [diff] [blame] | 142 | configs += [ |
| 143 | ":extra_warnings", |
| 144 | ":internal_config", |
| 145 | ] |
Corentin Wallez | 054f7ed | 2016-09-20 17:15:59 -0400 | [diff] [blame] | 146 | |
| 147 | public_deps = [ |
| 148 | ":angle_common", |
| 149 | ] |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 150 | } |
| 151 | |
Corentin Wallez | a5615c6 | 2016-09-19 09:54:44 -0400 | [diff] [blame] | 152 | config("translator_disable_pool_alloc") { |
| 153 | defines = [ "ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC" ] |
Jamie Madill | e5c97ab | 2014-08-07 12:31:38 -0400 | [diff] [blame] | 154 | } |
| 155 | |
Cooper Partin | 75da197 | 2015-06-16 15:03:14 -0700 | [diff] [blame] | 156 | config("debug_annotations_config") { |
| 157 | if (is_debug) { |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 158 | defines = [ "ANGLE_ENABLE_DEBUG_ANNOTATIONS" ] |
Cooper Partin | 75da197 | 2015-06-16 15:03:14 -0700 | [diff] [blame] | 159 | } |
| 160 | } |
| 161 | |
Jamie Madill | e31fd87 | 2016-05-27 08:35:36 -0400 | [diff] [blame] | 162 | config("angle_release_asserts_config") { |
| 163 | if (dcheck_always_on) { |
| 164 | defines = [ "ANGLE_ENABLE_RELEASE_ASSERTS" ] |
| 165 | } |
| 166 | } |
| 167 | |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 168 | config("angle_common_config") { |
Jamie Madill | 5ea762a | 2017-06-07 14:59:51 -0400 | [diff] [blame] | 169 | include_dirs = [ "src/common/third_party/base" ] |
Yuly Novikov | e762400 | 2018-01-27 18:27:07 -0500 | [diff] [blame] | 170 | if (is_android) { |
| 171 | libs = [ "log" ] |
| 172 | } |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 173 | } |
| 174 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 175 | static_library("angle_common") { |
| 176 | sources = rebase_path(gles_gypi.libangle_common_sources, ".", "src") |
Cooper Partin | 75da197 | 2015-06-16 15:03:14 -0700 | [diff] [blame] | 177 | |
Jamie Madill | d7ebfb9 | 2018-02-15 16:34:29 -0500 | [diff] [blame] | 178 | if (is_linux || is_android || is_fuchsia) { |
Jamie Madill | dcab56a | 2017-01-05 14:47:34 -0500 | [diff] [blame] | 179 | sources += rebase_path(gles_gypi.libangle_common_linux_sources, ".", "src") |
| 180 | } |
| 181 | |
| 182 | if (is_mac) { |
| 183 | sources += rebase_path(gles_gypi.libangle_common_mac_sources, ".", "src") |
| 184 | } |
| 185 | |
| 186 | if (is_win) { |
| 187 | sources += rebase_path(gles_gypi.libangle_common_win_sources, ".", "src") |
| 188 | } |
| 189 | |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 190 | configs -= angle_undefine_configs |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 191 | configs += [ |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 192 | ":angle_common_config", |
Cooper Partin | 75da197 | 2015-06-16 15:03:14 -0700 | [diff] [blame] | 193 | ":debug_annotations_config", |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 194 | ":extra_warnings", |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 195 | ":internal_config", |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 196 | ] |
Jeremy Roman | 06feb81 | 2016-04-06 16:39:52 -0400 | [diff] [blame] | 197 | |
Yuly Novikov | 87ae8cd | 2016-05-19 17:59:55 -0400 | [diff] [blame] | 198 | public_deps = [ |
| 199 | ":commit_id", |
Jamie Madill | 8d986bf | 2018-02-21 08:28:01 -0500 | [diff] [blame] | 200 | ":includes", |
Yuly Novikov | 87ae8cd | 2016-05-19 17:59:55 -0400 | [diff] [blame] | 201 | ] |
Jamie Madill | e1fd475 | 2017-04-26 16:46:48 -0400 | [diff] [blame] | 202 | public_configs = [ ":angle_common_config" ] |
| 203 | all_dependent_configs = [ ":angle_release_asserts_config" ] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 204 | } |
| 205 | |
Geoff Lang | 6e4cfce | 2016-06-13 15:06:31 -0400 | [diff] [blame] | 206 | config("angle_image_util_config") { |
| 207 | include_dirs = [ |
| 208 | "include", |
| 209 | "src", |
| 210 | ] |
| 211 | } |
| 212 | |
Dirk Pranke | 313d944 | 2016-07-13 18:01:55 -0700 | [diff] [blame] | 213 | static_library("angle_image_util") { |
Geoff Lang | 6e4cfce | 2016-06-13 15:06:31 -0400 | [diff] [blame] | 214 | sources = rebase_path(gles_gypi.libangle_image_util_sources, ".", "src") |
| 215 | |
| 216 | configs -= angle_undefine_configs |
Corentin Wallez | 878baf9 | 2017-02-15 13:57:16 -0500 | [diff] [blame] | 217 | configs += [ |
| 218 | ":internal_config", |
| 219 | ":extra_warnings", |
| 220 | ] |
Geoff Lang | 6e4cfce | 2016-06-13 15:06:31 -0400 | [diff] [blame] | 221 | |
| 222 | public_configs = [ ":angle_image_util_config" ] |
| 223 | |
| 224 | public_deps = [ |
| 225 | ":angle_common", |
| 226 | ] |
| 227 | } |
| 228 | |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 229 | config("angle_gpu_info_util_config") { |
| 230 | include_dirs = [ |
| 231 | "include", |
| 232 | "src", |
| 233 | ] |
| 234 | } |
| 235 | |
| 236 | static_library("angle_gpu_info_util") { |
| 237 | configs -= angle_undefine_configs |
Corentin Wallez | 878baf9 | 2017-02-15 13:57:16 -0500 | [diff] [blame] | 238 | configs += [ |
| 239 | ":internal_config", |
| 240 | ":extra_warnings", |
| 241 | ] |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 242 | |
| 243 | public_configs = [ ":angle_gpu_info_util_config" ] |
| 244 | |
| 245 | public_deps = [ |
| 246 | ":angle_common", |
| 247 | ] |
| 248 | |
| 249 | sources = rebase_path(gles_gypi.libangle_gpu_info_util_sources, ".", "src") |
| 250 | deps = [] |
| 251 | libs = [] |
| 252 | defines = [] |
| 253 | |
Ian Elliott | d07c52e | 2018-06-22 15:42:09 -0600 | [diff] [blame] | 254 | if (is_android) { |
| 255 | sources += [ "src/gpu_info_util/SystemInfo_android.cpp" ] |
| 256 | } |
| 257 | |
Corentin Wallez | 8f77e5d | 2017-03-24 11:58:59 -0700 | [diff] [blame] | 258 | if (is_win) { |
| 259 | sources += |
| 260 | rebase_path(gles_gypi.libangle_gpu_info_util_win_sources, ".", "src") |
| 261 | libs += [ "setupapi.lib" ] |
| 262 | defines += [ "GPU_INFO_USE_SETUPAPI" ] |
| 263 | } |
| 264 | |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 265 | if (is_linux) { |
| 266 | sources += |
| 267 | rebase_path(gles_gypi.libangle_gpu_info_util_linux_sources, ".", "src") |
| 268 | |
| 269 | if (use_x11) { |
Corentin Wallez | 878baf9 | 2017-02-15 13:57:16 -0500 | [diff] [blame] | 270 | sources += |
| 271 | rebase_path(gles_gypi.libangle_gpu_info_util_x11_sources, ".", "src") |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 272 | deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ] |
| 273 | defines += [ "GPU_INFO_USE_X11" ] |
| 274 | libs += [ |
| 275 | "X11", |
| 276 | "Xi", |
| 277 | "Xext", |
| 278 | ] |
| 279 | } |
| 280 | } |
| 281 | |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 282 | if (use_libpci) { |
| 283 | sources += |
| 284 | rebase_path(gles_gypi.libangle_gpu_info_util_libpci_sources, ".", "src") |
| 285 | defines += [ "GPU_INFO_USE_LIBPCI" ] |
| 286 | libs += [ "pci" ] |
| 287 | } |
Corentin Wallez | d83f64f | 2017-02-16 10:58:46 -0500 | [diff] [blame] | 288 | |
| 289 | if (is_mac) { |
| 290 | sources += |
| 291 | rebase_path(gles_gypi.libangle_gpu_info_util_mac_sources, ".", "src") |
| 292 | libs += [ |
| 293 | "IOKit.framework", |
| 294 | "CoreFoundation.framework", |
Corentin Wallez | 163965d | 2017-10-11 11:38:55 -0400 | [diff] [blame] | 295 | "CoreGraphics.framework", |
Corentin Wallez | d83f64f | 2017-02-16 10:58:46 -0500 | [diff] [blame] | 296 | ] |
| 297 | } |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 298 | } |
| 299 | |
Yuly Novikov | ea58654 | 2016-11-10 17:33:43 -0500 | [diff] [blame] | 300 | static_library("translator") { |
Yuly Novikov | dfd7fb2 | 2016-11-11 16:05:11 -0500 | [diff] [blame] | 301 | sources = rebase_path(compiler_gypi.angle_translator_sources, ".", "src") |
Austin Kinross | 82b5ab6 | 2015-12-11 09:30:15 -0800 | [diff] [blame] | 302 | defines = [] |
| 303 | |
Jonathan Metzman | fb9051a | 2017-10-09 16:14:06 -0700 | [diff] [blame] | 304 | if (angle_enable_essl || use_fuzzing_engine) { |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 305 | sources += |
Yuly Novikov | dfd7fb2 | 2016-11-11 16:05:11 -0500 | [diff] [blame] | 306 | rebase_path(compiler_gypi.angle_translator_essl_sources, ".", "src") |
Austin Kinross | 82b5ab6 | 2015-12-11 09:30:15 -0800 | [diff] [blame] | 307 | defines += [ "ANGLE_ENABLE_ESSL" ] |
| 308 | } |
| 309 | |
Jonathan Metzman | fb9051a | 2017-10-09 16:14:06 -0700 | [diff] [blame] | 310 | if (angle_enable_glsl || use_fuzzing_engine) { |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 311 | sources += |
Yuly Novikov | dfd7fb2 | 2016-11-11 16:05:11 -0500 | [diff] [blame] | 312 | rebase_path(compiler_gypi.angle_translator_glsl_sources, ".", "src") |
Austin Kinross | 82b5ab6 | 2015-12-11 09:30:15 -0800 | [diff] [blame] | 313 | defines += [ "ANGLE_ENABLE_GLSL" ] |
| 314 | } |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 315 | |
Jonathan Metzman | fb9051a | 2017-10-09 16:14:06 -0700 | [diff] [blame] | 316 | if (angle_enable_hlsl || use_fuzzing_engine) { |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 317 | sources += |
Yuly Novikov | dfd7fb2 | 2016-11-11 16:05:11 -0500 | [diff] [blame] | 318 | rebase_path(compiler_gypi.angle_translator_hlsl_sources, ".", "src") |
Austin Kinross | 82b5ab6 | 2015-12-11 09:30:15 -0800 | [diff] [blame] | 319 | defines += [ "ANGLE_ENABLE_HLSL" ] |
Daniel Bratell | 73941de | 2015-02-25 14:34:49 +0100 | [diff] [blame] | 320 | } |
Jamie Madill | e794cd8 | 2017-01-13 17:29:51 -0500 | [diff] [blame] | 321 | |
Jonathan Metzman | fb9051a | 2017-10-09 16:14:06 -0700 | [diff] [blame] | 322 | if (angle_enable_vulkan || use_fuzzing_engine) { |
Jamie Madill | e794cd8 | 2017-01-13 17:29:51 -0500 | [diff] [blame] | 323 | sources += rebase_path(compiler_gypi.angle_translator_lib_vulkan_sources, |
| 324 | ".", |
| 325 | "src") |
| 326 | defines += [ "ANGLE_ENABLE_VULKAN" ] |
| 327 | } |
| 328 | |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 329 | configs -= angle_undefine_configs |
Ben Wagner | d736ccc | 2017-10-11 15:08:22 -0400 | [diff] [blame] | 330 | configs += [ |
| 331 | ":internal_config", |
| 332 | ":extra_warnings", |
| 333 | ] |
Brett Wilson | 10ac404 | 2014-09-24 10:20:56 -0700 | [diff] [blame] | 334 | public_configs = [ ":external_config" ] |
Jonathan Metzman | fb9051a | 2017-10-09 16:14:06 -0700 | [diff] [blame] | 335 | if (use_fuzzing_engine) { |
Corentin Wallez | a5615c6 | 2016-09-19 09:54:44 -0400 | [diff] [blame] | 336 | all_dependent_configs = [ ":translator_disable_pool_alloc" ] |
| 337 | } |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 338 | |
| 339 | deps = [ |
| 340 | ":includes", |
| 341 | ":preprocessor", |
| 342 | ] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 343 | |
| 344 | public_deps = [ |
| 345 | ":angle_common", |
| 346 | ] |
Jamie Madill | a8503ce | 2016-07-18 13:47:12 -0400 | [diff] [blame] | 347 | |
| 348 | if (is_win) { |
| 349 | # Necessary to suppress some system header xtree warnigns in Release. |
| 350 | # For some reason this warning doesn't get triggered in Chromium |
| 351 | cflags = [ "/wd4718" ] |
| 352 | } |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 353 | } |
| 354 | |
Corentin Wallez | 30e11ab | 2016-09-16 10:29:54 -0400 | [diff] [blame] | 355 | source_set("translator_fuzzer") { |
Corentin Wallez | 28b6528 | 2016-06-16 07:24:50 -0700 | [diff] [blame] | 356 | sources = [ |
| 357 | "src/compiler/fuzz/translator_fuzzer.cpp", |
| 358 | ] |
| 359 | |
| 360 | include_dirs = [ |
| 361 | "include", |
| 362 | "src", |
| 363 | ] |
| 364 | |
| 365 | deps = [ |
Yuly Novikov | e653403 | 2016-11-01 18:19:06 -0400 | [diff] [blame] | 366 | ":translator", |
Corentin Wallez | 28b6528 | 2016-06-16 07:24:50 -0700 | [diff] [blame] | 367 | ] |
| 368 | } |
| 369 | |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 370 | config("commit_id_config") { |
| 371 | include_dirs = [ "$root_gen_dir/angle" ] |
| 372 | } |
| 373 | |
Tomasz Moniuszko | 319fb898 | 2015-07-30 14:34:54 +0200 | [diff] [blame] | 374 | commit_id_output_file = "$root_gen_dir/angle/id/commit.h" |
| 375 | if (angle_use_commit_id) { |
| 376 | action("commit_id") { |
| 377 | script = "src/commit_id.py" |
| 378 | outputs = [ |
| 379 | commit_id_output_file, |
| 380 | ] |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 381 | |
Tomasz Moniuszko | 319fb898 | 2015-07-30 14:34:54 +0200 | [diff] [blame] | 382 | args = [ |
| 383 | "gen", |
| 384 | rebase_path(".", root_build_dir), |
| 385 | rebase_path(commit_id_output_file, root_build_dir), |
| 386 | ] |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 387 | |
Tomasz Moniuszko | 319fb898 | 2015-07-30 14:34:54 +0200 | [diff] [blame] | 388 | public_configs = [ ":commit_id_config" ] |
| 389 | } |
| 390 | } else { |
| 391 | copy("commit_id") { |
| 392 | sources = [ |
| 393 | "src/commit.h", |
| 394 | ] |
| 395 | outputs = [ |
| 396 | commit_id_output_file, |
| 397 | ] |
| 398 | public_configs = [ ":commit_id_config" ] |
| 399 | } |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 400 | } |
| 401 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 402 | config("libANGLE_config") { |
Austin Kinross | 4085347 | 2015-02-12 10:39:56 -0800 | [diff] [blame] | 403 | cflags = [] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 404 | defines = [] |
| 405 | if (angle_enable_d3d9) { |
| 406 | defines += [ "ANGLE_ENABLE_D3D9" ] |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 407 | } |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 408 | if (angle_enable_d3d11) { |
| 409 | defines += [ "ANGLE_ENABLE_D3D11" ] |
| 410 | } |
Geoff Lang | c588ac7 | 2015-02-13 15:41:41 -0500 | [diff] [blame] | 411 | if (angle_enable_gl) { |
| 412 | defines += [ "ANGLE_ENABLE_OPENGL" ] |
Steven Bennetts | 369d03c | 2016-05-05 10:37:38 -0700 | [diff] [blame] | 413 | if (use_x11) { |
| 414 | defines += [ "ANGLE_USE_X11" ] |
| 415 | } |
Jamie Madill | 6d94f06 | 2017-10-21 22:19:40 -0400 | [diff] [blame] | 416 | if (angle_enable_gl_null) { |
| 417 | defines += [ "ANGLE_ENABLE_OPENGL_NULL" ] |
| 418 | } |
Corentin Wallez | 51e2ad1 | 2015-05-26 11:32:58 -0400 | [diff] [blame] | 419 | } |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 420 | if (angle_enable_vulkan) { |
| 421 | defines += [ "ANGLE_ENABLE_VULKAN" ] |
| 422 | } |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 423 | if (angle_enable_null) { |
| 424 | defines += [ "ANGLE_ENABLE_NULL" ] |
| 425 | } |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 426 | defines += [ "LIBANGLE_IMPLEMENTATION" ] |
Corentin Wallez | beb8158 | 2015-09-02 10:30:55 -0400 | [diff] [blame] | 427 | |
| 428 | if (is_win) { |
Austin Kinross | 4085347 | 2015-02-12 10:39:56 -0800 | [diff] [blame] | 429 | cflags += [ "/wd4530" ] # C++ exception handler used, but unwind semantics are not enabled. |
| 430 | } |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 431 | } |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 432 | |
Jamie Madill | b62a1c2 | 2018-02-06 09:54:02 -0500 | [diff] [blame] | 433 | if (angle_enable_vulkan) { |
| 434 | # Use this target to include everything ANGLE needs for Vulkan. |
| 435 | group("angle_vulkan") { |
| 436 | deps = [ |
Jamie Madill | a1134ba | 2018-02-07 15:24:47 -0500 | [diff] [blame] | 437 | "$angle_root/third_party/glslang:glslang", |
Jamie Madill | b62a1c2 | 2018-02-06 09:54:02 -0500 | [diff] [blame] | 438 | ] |
| 439 | public_deps = [ |
Tobin Ehlis | b971f49 | 2018-05-24 10:56:17 -0600 | [diff] [blame] | 440 | "$angle_root/third_party/vulkan-headers:vulkan_headers", |
Jamie Madill | b62a1c2 | 2018-02-06 09:54:02 -0500 | [diff] [blame] | 441 | ] |
Jamie Madill | b62a1c2 | 2018-02-06 09:54:02 -0500 | [diff] [blame] | 442 | public_configs = [ |
Jamie Madill | a1134ba | 2018-02-07 15:24:47 -0500 | [diff] [blame] | 443 | "$angle_root/third_party/glslang:glslang_config", |
Jamie Madill | b62a1c2 | 2018-02-06 09:54:02 -0500 | [diff] [blame] | 444 | "$angle_root/third_party/vulkan-validation-layers:vulkan_config", |
| 445 | ] |
Courtney Goeltzenleuchter | e5db628 | 2018-04-26 08:05:18 -0600 | [diff] [blame] | 446 | data_deps = [] |
Jamie Madill | b62a1c2 | 2018-02-06 09:54:02 -0500 | [diff] [blame] | 447 | if (!is_android) { |
Tobin Ehlis | b971f49 | 2018-05-24 10:56:17 -0600 | [diff] [blame] | 448 | deps += [ "$angle_root/third_party/vulkan-loader:libvulkan" ] |
| 449 | data_deps += [ "$angle_root/third_party/vulkan-tools:VkICD_mock_icd" ] |
| 450 | public_configs += |
| 451 | [ "$angle_root/third_party/vulkan-loader:vulkan_loader_config" ] |
Jamie Madill | b62a1c2 | 2018-02-06 09:54:02 -0500 | [diff] [blame] | 452 | } |
Courtney Goeltzenleuchter | ec10096 | 2018-04-10 13:43:46 -0600 | [diff] [blame] | 453 | |
| 454 | if (angle_enable_vulkan_validation_layers) { |
Courtney Goeltzenleuchter | e5db628 | 2018-04-26 08:05:18 -0600 | [diff] [blame] | 455 | data_deps += [ "$angle_root/third_party/vulkan-validation-layers:vulkan_validation_layers" ] |
Courtney Goeltzenleuchter | ec10096 | 2018-04-10 13:43:46 -0600 | [diff] [blame] | 456 | if (!is_android) { |
Courtney Goeltzenleuchter | e5db628 | 2018-04-26 08:05:18 -0600 | [diff] [blame] | 457 | data_deps += [ "$angle_root/third_party/vulkan-validation-layers:vulkan_gen_json_files" ] |
Courtney Goeltzenleuchter | ec10096 | 2018-04-10 13:43:46 -0600 | [diff] [blame] | 458 | } |
| 459 | } |
Jamie Madill | b62a1c2 | 2018-02-06 09:54:02 -0500 | [diff] [blame] | 460 | } |
| 461 | } |
| 462 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 463 | static_library("libANGLE") { |
| 464 | sources = rebase_path(gles_gypi.libangle_sources, ".", "src") |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 465 | |
Jamie Madill | 5ea762a | 2017-06-07 14:59:51 -0400 | [diff] [blame] | 466 | include_dirs = [] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 467 | libs = [] |
Corentin Wallez | 64598b5 | 2016-11-11 08:25:44 -0500 | [diff] [blame] | 468 | defines = [] |
Frank Henigman | e42ec18 | 2017-12-11 23:58:53 -0500 | [diff] [blame] | 469 | if (angle_link_glx) { |
| 470 | libs += [ "GL" ] |
| 471 | defines += [ "ANGLE_LINK_GLX" ] |
| 472 | } |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 473 | public_deps = [ |
Corentin Wallez | cc068e9 | 2016-02-29 16:37:04 -0500 | [diff] [blame] | 474 | ":angle_common", |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 475 | ] |
| 476 | deps = [ |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 477 | ":angle_gpu_info_util", |
Corentin Wallez | 878baf9 | 2017-02-15 13:57:16 -0500 | [diff] [blame] | 478 | ":angle_image_util", |
Corentin Wallez | cc068e9 | 2016-02-29 16:37:04 -0500 | [diff] [blame] | 479 | ":commit_id", |
| 480 | ":includes", |
Yuly Novikov | e653403 | 2016-11-01 18:19:06 -0400 | [diff] [blame] | 481 | ":translator", |
Corentin Wallez | cc068e9 | 2016-02-29 16:37:04 -0500 | [diff] [blame] | 482 | ] |
| 483 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 484 | # Shared D3D sources. |
| 485 | if (angle_enable_d3d9 || angle_enable_d3d11) { |
| 486 | sources += rebase_path(gles_gypi.libangle_d3d_shared_sources, ".", "src") |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 487 | |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 488 | 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] | 489 | } |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 490 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 491 | if (angle_enable_d3d9) { |
| 492 | sources += rebase_path(gles_gypi.libangle_d3d9_sources, ".", "src") |
| 493 | libs += [ "d3d9.lib" ] |
| 494 | } |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 495 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 496 | if (angle_enable_d3d11) { |
| 497 | sources += rebase_path(gles_gypi.libangle_d3d11_sources, ".", "src") |
| 498 | sources += rebase_path(gles_gypi.libangle_d3d11_win32_sources, ".", "src") |
Austin Kinross | 91e71ed | 2016-08-23 09:29:22 -0700 | [diff] [blame] | 499 | libs += [ "dxguid.lib" ] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 500 | } |
| 501 | |
Geoff Lang | c588ac7 | 2015-02-13 15:41:41 -0500 | [diff] [blame] | 502 | if (angle_enable_gl) { |
| 503 | sources += rebase_path(gles_gypi.libangle_gl_sources, ".", "src") |
| 504 | include_dirs += [ "src/third_party/khronos" ] |
| 505 | |
Jamie Madill | 6d94f06 | 2017-10-21 22:19:40 -0400 | [diff] [blame] | 506 | if (angle_enable_gl_null) { |
| 507 | sources += rebase_path(gles_gypi.libangle_gl_null_sources, ".", "src") |
| 508 | } |
Geoff Lang | c588ac7 | 2015-02-13 15:41:41 -0500 | [diff] [blame] | 509 | if (is_win) { |
| 510 | sources += rebase_path(gles_gypi.libangle_gl_wgl_sources, ".", "src") |
| 511 | } |
Corentin Wallez | 51e2ad1 | 2015-05-26 11:32:58 -0400 | [diff] [blame] | 512 | if (use_x11) { |
Corentin Wallez | 47fc1fe | 2015-05-14 10:54:18 -0400 | [diff] [blame] | 513 | sources += rebase_path(gles_gypi.libangle_gl_glx_sources, ".", "src") |
Yuly Novikov | 87ae8cd | 2016-05-19 17:59:55 -0400 | [diff] [blame] | 514 | deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ] |
Corentin Wallez | cc068e9 | 2016-02-29 16:37:04 -0500 | [diff] [blame] | 515 | libs += [ |
| 516 | "X11", |
| 517 | "Xi", |
| 518 | "Xext", |
| 519 | ] |
Corentin Wallez | 47fc1fe | 2015-05-14 10:54:18 -0400 | [diff] [blame] | 520 | } |
Nico Weber | de44d3a | 2016-05-13 17:27:57 -0400 | [diff] [blame] | 521 | if (is_mac) { |
| 522 | sources += rebase_path(gles_gypi.libangle_gl_cgl_sources, ".", "src") |
| 523 | libs += [ |
| 524 | "Cocoa.framework", |
| 525 | "IOSurface.framework", |
| 526 | "OpenGL.framework", |
| 527 | "QuartzCore.framework", |
| 528 | ] |
| 529 | } |
Yuly Novikov | a6426d6 | 2016-06-03 00:18:38 -0400 | [diff] [blame] | 530 | if (is_android) { |
| 531 | sources += rebase_path(gles_gypi.libangle_gl_egl_sources, ".", "src") |
| 532 | sources += rebase_path(gles_gypi.libangle_gl_egl_dl_sources, ".", "src") |
| 533 | sources += |
| 534 | rebase_path(gles_gypi.libangle_gl_egl_android_sources, ".", "src") |
Courtney Goeltzenleuchter | b001528 | 2018-05-18 16:48:50 -0600 | [diff] [blame] | 535 | if (ndk_supports_nativewindow) { |
| 536 | libs += [ "nativewindow" ] |
| 537 | } else { |
| 538 | libs += [ "android" ] |
| 539 | } |
| 540 | libs += [ "log" ] |
Yuly Novikov | a6426d6 | 2016-06-03 00:18:38 -0400 | [diff] [blame] | 541 | } |
Frank Henigman | e8d5c5c | 2016-07-07 13:17:47 -0400 | [diff] [blame] | 542 | if (ozone_platform_gbm) { |
Frank Henigman | 77df676 | 2016-06-13 16:39:01 -0400 | [diff] [blame] | 543 | configs += [ ":libdrm" ] |
| 544 | defines += [ "ANGLE_USE_OZONE" ] |
| 545 | deps += [ "//third_party/minigbm" ] |
| 546 | sources += rebase_path(gles_gypi.libangle_gl_egl_sources, ".", "src") |
| 547 | sources += rebase_path(gles_gypi.libangle_gl_egl_dl_sources, ".", "src") |
| 548 | sources += rebase_path(gles_gypi.libangle_gl_ozone_sources, ".", "src") |
| 549 | } |
Geoff Lang | c588ac7 | 2015-02-13 15:41:41 -0500 | [diff] [blame] | 550 | } |
| 551 | |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 552 | if (angle_enable_vulkan) { |
| 553 | sources += rebase_path(gles_gypi.libangle_vulkan_sources, ".", "src") |
Frank Henigman | 29f148b | 2016-11-23 21:05:36 -0500 | [diff] [blame] | 554 | if (is_win) { |
| 555 | sources += |
| 556 | rebase_path(gles_gypi.libangle_vulkan_win32_sources, ".", "src") |
| 557 | } |
| 558 | if (is_linux) { |
| 559 | sources += rebase_path(gles_gypi.libangle_vulkan_xcb_sources, ".", "src") |
| 560 | } |
Yuly Novikov | 199f429 | 2018-01-19 19:04:05 -0500 | [diff] [blame] | 561 | if (is_android) { |
| 562 | sources += |
| 563 | rebase_path(gles_gypi.libangle_vulkan_android_sources, ".", "src") |
| 564 | } |
Jamie Madill | b62a1c2 | 2018-02-06 09:54:02 -0500 | [diff] [blame] | 565 | deps += [ ":angle_vulkan" ] |
Tobin Ehlis | b971f49 | 2018-05-24 10:56:17 -0600 | [diff] [blame] | 566 | public_deps += [ "$angle_root/third_party/vulkan-headers:vulkan_headers" ] |
Jamie Madill | d47044a | 2018-04-27 11:45:03 -0400 | [diff] [blame] | 567 | |
| 568 | # Include generated shaders. |
| 569 | import("src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.gni") |
| 570 | sources += angle_vulkan_internal_shaders |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 571 | } |
| 572 | |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 573 | if (angle_enable_null) { |
| 574 | sources += rebase_path(gles_gypi.libangle_null_sources, ".", "src") |
| 575 | } |
| 576 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 577 | if (is_debug) { |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 578 | defines += [ "ANGLE_GENERATE_SHADER_DEBUG_INFO" ] |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 579 | } |
| 580 | |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 581 | configs -= angle_undefine_configs |
Jamie Madill | a8503ce | 2016-07-18 13:47:12 -0400 | [diff] [blame] | 582 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 583 | configs += [ |
| 584 | ":commit_id_config", |
Cooper Partin | 75da197 | 2015-06-16 15:03:14 -0700 | [diff] [blame] | 585 | ":debug_annotations_config", |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 586 | ":extra_warnings", |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 587 | ":internal_config", |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 588 | ] |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 589 | |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 590 | public_configs = [ ":libANGLE_config" ] |
| 591 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 592 | if (is_win) { |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 593 | data_deps = [ |
| 594 | ":copy_compiler_dll", |
| 595 | ] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 596 | } |
| 597 | } |
| 598 | |
Robert Sesek | db8ae83 | 2016-06-21 11:47:03 -0400 | [diff] [blame] | 599 | config("shared_library_public_config") { |
| 600 | if (is_mac && !is_component_build) { |
| 601 | # Executable targets that depend on the shared libraries below need to have |
| 602 | # the rpath setup in non-component build configurations. |
Jamie Madill | a8503ce | 2016-07-18 13:47:12 -0400 | [diff] [blame] | 603 | ldflags = [ |
| 604 | "-rpath", |
| 605 | "@executable_path/", |
| 606 | ] |
Robert Sesek | db8ae83 | 2016-06-21 11:47:03 -0400 | [diff] [blame] | 607 | } |
| 608 | } |
| 609 | |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 610 | # This config controls export definitions on ANGLE API calls. |
| 611 | config("angle_static") { |
| 612 | defines = [ |
| 613 | "ANGLE_EXPORT=", |
| 614 | "EGLAPI=", |
| 615 | "GL_APICALL=", |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 616 | "GL_API=", |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 617 | ] |
| 618 | } |
| 619 | |
Yuly Novikov | ad4f964 | 2018-02-08 17:58:46 -0500 | [diff] [blame] | 620 | shared_library("libGLESv2${angle_libs_suffix}") { |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 621 | sources = rebase_path(gles_gypi.libglesv2_sources, ".", "src") |
| 622 | |
Andrew Grieve | 949e070 | 2017-01-16 09:44:49 -0500 | [diff] [blame] | 623 | if (is_android) { |
| 624 | configs -= [ "//build/config/android:hide_all_but_jni_onload" ] |
Courtney Goeltzenleuchter | 4607148 | 2018-05-15 13:35:15 -0600 | [diff] [blame] | 625 | configs += [ ":build_id_config" ] |
Andrew Grieve | 949e070 | 2017-01-16 09:44:49 -0500 | [diff] [blame] | 626 | } |
| 627 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 628 | if (is_win) { |
Jamie Madill | 74a7632 | 2018-05-14 09:11:51 -0400 | [diff] [blame] | 629 | ldflags = [ "/DEF:" + rebase_path("src/libGLESv2/libGLESv2_autogen.def", |
| 630 | root_build_dir) ] |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 631 | } |
John Abd-El-Malek | 657cd68 | 2014-11-05 14:04:19 -0800 | [diff] [blame] | 632 | |
Robert Sesek | db8ae83 | 2016-06-21 11:47:03 -0400 | [diff] [blame] | 633 | if (is_mac && !is_component_build) { |
Jamie Madill | a8503ce | 2016-07-18 13:47:12 -0400 | [diff] [blame] | 634 | ldflags = [ |
| 635 | "-install_name", |
| 636 | "@rpath/${target_name}.dylib", |
| 637 | ] |
Robert Sesek | db8ae83 | 2016-06-21 11:47:03 -0400 | [diff] [blame] | 638 | public_configs = [ ":shared_library_public_config" ] |
| 639 | } |
| 640 | |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 641 | configs -= angle_undefine_configs |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 642 | configs += [ |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 643 | ":commit_id_config", |
Cooper Partin | 75da197 | 2015-06-16 15:03:14 -0700 | [diff] [blame] | 644 | ":debug_annotations_config", |
Ben Wagner | d736ccc | 2017-10-11 15:08:22 -0400 | [diff] [blame] | 645 | ":extra_warnings", |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 646 | ":internal_config", |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 647 | ] |
Jamie Madill | 72f5b5e | 2014-06-23 15:13:02 -0400 | [diff] [blame] | 648 | |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 649 | defines = [ "LIBGLESV2_IMPLEMENTATION" ] |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 650 | if (is_win) { |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 651 | defines += [ |
| 652 | "GL_APICALL=", |
| 653 | "GL_API=", |
| 654 | ] |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 655 | } else { |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 656 | defines += [ |
| 657 | "GL_APICALL=__attribute__((visibility(\"default\")))", |
| 658 | "GL_API=__attribute__((visibility(\"default\")))", |
| 659 | ] |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 660 | } |
| 661 | |
| 662 | deps = [ |
| 663 | ":includes", |
| 664 | ":libANGLE", |
| 665 | ] |
| 666 | } |
| 667 | |
| 668 | static_library("libGLESv2_static") { |
| 669 | sources = rebase_path(gles_gypi.libglesv2_sources, ".", "src") |
| 670 | |
| 671 | configs -= angle_undefine_configs |
| 672 | configs += [ |
| 673 | ":commit_id_config", |
| 674 | ":debug_annotations_config", |
Ben Wagner | d736ccc | 2017-10-11 15:08:22 -0400 | [diff] [blame] | 675 | ":extra_warnings", |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 676 | ":internal_config", |
| 677 | ] |
| 678 | |
| 679 | public_configs = [ ":angle_static" ] |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 680 | |
| 681 | deps = [ |
| 682 | ":includes", |
| 683 | ":libANGLE", |
| 684 | ] |
| 685 | } |
| 686 | |
Yuly Novikov | ad4f964 | 2018-02-08 17:58:46 -0500 | [diff] [blame] | 687 | shared_library("libGLESv1_CM${angle_libs_suffix}") { |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 688 | sources = rebase_path(gles_gypi.libglesv1_cm_sources, ".", "src") |
| 689 | |
| 690 | if (is_android) { |
| 691 | configs -= [ "//build/config/android:hide_all_but_jni_onload" ] |
Courtney Goeltzenleuchter | 4607148 | 2018-05-15 13:35:15 -0600 | [diff] [blame] | 692 | configs += [ ":build_id_config" ] |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 693 | } |
Lingfeng Yang | 4edce33 | 2018-02-14 19:01:31 -0800 | [diff] [blame] | 694 | |
| 695 | if (is_mac && !is_component_build) { |
| 696 | ldflags = [ |
| 697 | "-install_name", |
| 698 | "@rpath/${target_name}.dylib", |
| 699 | ] |
| 700 | public_configs = [ ":shared_library_public_config" ] |
| 701 | } |
| 702 | |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 703 | configs -= angle_undefine_configs |
| 704 | configs += [ |
| 705 | ":commit_id_config", |
| 706 | ":debug_annotations_config", |
| 707 | ":extra_warnings", |
| 708 | ":internal_config", |
| 709 | ] |
| 710 | |
| 711 | defines = [] |
| 712 | if (is_win) { |
| 713 | defines += [ |
| 714 | "GL_APICALL=", |
| 715 | "GL_API=", |
| 716 | ] |
| 717 | } else { |
| 718 | defines += [ |
| 719 | "GL_APICALL=__attribute__((visibility(\"default\")))", |
| 720 | "GL_API=__attribute__((visibility(\"default\")))", |
| 721 | ] |
| 722 | } |
| 723 | |
| 724 | deps = [ |
| 725 | ":includes", |
Yuly Novikov | ad4f964 | 2018-02-08 17:58:46 -0500 | [diff] [blame] | 726 | ":libGLESv2${angle_libs_suffix}", |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 727 | ] |
| 728 | } |
| 729 | |
| 730 | static_library("libGLESv1_CM_static") { |
| 731 | sources = rebase_path(gles_gypi.libglesv1_cm_sources, ".", "src") |
| 732 | |
| 733 | configs -= angle_undefine_configs |
| 734 | configs += [ |
| 735 | ":commit_id_config", |
| 736 | ":debug_annotations_config", |
| 737 | ":extra_warnings", |
| 738 | ":internal_config", |
| 739 | ] |
| 740 | |
| 741 | public_configs = [ ":angle_static" ] |
| 742 | |
| 743 | deps = [ |
| 744 | ":includes", |
| 745 | ":libGLESv2_static", |
| 746 | ] |
| 747 | } |
| 748 | |
Yuly Novikov | ad4f964 | 2018-02-08 17:58:46 -0500 | [diff] [blame] | 749 | shared_library("libEGL${angle_libs_suffix}") { |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 750 | sources = rebase_path(gles_gypi.libegl_sources, ".", "src") |
| 751 | |
Andrew Grieve | 949e070 | 2017-01-16 09:44:49 -0500 | [diff] [blame] | 752 | if (is_android) { |
| 753 | configs -= [ "//build/config/android:hide_all_but_jni_onload" ] |
Courtney Goeltzenleuchter | 4607148 | 2018-05-15 13:35:15 -0600 | [diff] [blame] | 754 | configs += [ ":build_id_config" ] |
Andrew Grieve | 949e070 | 2017-01-16 09:44:49 -0500 | [diff] [blame] | 755 | } |
Jamie Madill | e2e406c | 2016-06-02 13:04:10 -0400 | [diff] [blame] | 756 | configs -= angle_undefine_configs |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 757 | configs += [ |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 758 | ":commit_id_config", |
Corentin Wallez | beb8158 | 2015-09-02 10:30:55 -0400 | [diff] [blame] | 759 | ":debug_annotations_config", |
Jamie Madill | 509a1d4 | 2016-07-18 10:10:29 -0400 | [diff] [blame] | 760 | ":extra_warnings", |
| 761 | ":internal_config", |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 762 | ] |
| 763 | |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 764 | defines = [ "LIBEGL_IMPLEMENTATION" ] |
Yuly Novikov | a4ab580 | 2016-12-19 17:44:22 -0500 | [diff] [blame] | 765 | if (is_win) { |
| 766 | defines += [ "EGLAPI=" ] |
| 767 | } else { |
| 768 | defines += [ "EGLAPI=__attribute__((visibility(\"default\")))" ] |
| 769 | } |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 770 | |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 771 | if (is_win) { |
| 772 | ldflags = [ "/DEF:" + rebase_path("src/libEGL/libEGL.def", root_build_dir) ] |
| 773 | } |
| 774 | |
| 775 | if (is_mac && !is_component_build) { |
| 776 | ldflags = [ |
| 777 | "-install_name", |
| 778 | "@rpath/${target_name}.dylib", |
| 779 | ] |
| 780 | public_configs = [ ":shared_library_public_config" ] |
| 781 | } |
| 782 | |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 783 | deps = [ |
| 784 | ":includes", |
Yuly Novikov | ad4f964 | 2018-02-08 17:58:46 -0500 | [diff] [blame] | 785 | ":libGLESv2${angle_libs_suffix}", |
Jamie Madill | 562e81b | 2015-01-14 14:31:02 -0500 | [diff] [blame] | 786 | ] |
| 787 | } |
Corentin Wallez | beb8158 | 2015-09-02 10:30:55 -0400 | [diff] [blame] | 788 | |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 789 | static_library("libEGL_static") { |
| 790 | sources = rebase_path(gles_gypi.libegl_sources, ".", "src") |
| 791 | |
| 792 | configs -= angle_undefine_configs |
| 793 | configs += [ |
| 794 | ":commit_id_config", |
| 795 | ":debug_annotations_config", |
| 796 | ":extra_warnings", |
| 797 | ":internal_config", |
| 798 | ] |
| 799 | |
| 800 | public_configs = [ ":angle_static" ] |
| 801 | |
| 802 | deps = [ |
| 803 | ":includes", |
| 804 | ":libGLESv2_static", |
| 805 | ] |
| 806 | } |
| 807 | |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 808 | util_gypi = exec_script("//build/gypi_to_gn.py", |
| 809 | [ rebase_path("util/util.gyp") ], |
| 810 | "scope", |
| 811 | [ "util/util.gyp" ]) |
| 812 | |
| 813 | config("angle_util_config") { |
| 814 | include_dirs = [ "util" ] |
Frank Henigman | 77df676 | 2016-06-13 16:39:01 -0400 | [diff] [blame] | 815 | if (is_linux && use_x11) { |
Jamie Madill | 1fae355 | 2016-01-07 14:33:48 -0500 | [diff] [blame] | 816 | libs = [ "X11" ] |
| 817 | } |
Jamie Madill | edbc244 | 2016-01-04 11:25:00 -0500 | [diff] [blame] | 818 | } |
Corentin Wallez | beb8158 | 2015-09-02 10:30:55 -0400 | [diff] [blame] | 819 | |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 820 | foreach(is_shared_library, |
| 821 | [ |
| 822 | true, |
| 823 | false, |
| 824 | ]) { |
| 825 | if (is_shared_library) { |
| 826 | library_type = "shared_library" |
| 827 | library_name = "angle_util" |
Yuly Novikov | ad4f964 | 2018-02-08 17:58:46 -0500 | [diff] [blame] | 828 | dep_suffix = "${angle_libs_suffix}" |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 829 | } else { |
| 830 | library_type = "static_library" |
| 831 | library_name = "angle_util_static" |
| 832 | dep_suffix = "_static" |
Corentin Wallez | beb8158 | 2015-09-02 10:30:55 -0400 | [diff] [blame] | 833 | } |
| 834 | |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 835 | target(library_type, library_name) { |
| 836 | sources = rebase_path(util_gypi.util_sources, ".", "util") |
| 837 | |
| 838 | if (is_win) { |
| 839 | sources += rebase_path(util_gypi.util_win32_sources, ".", "util") |
| 840 | } |
| 841 | |
Courtney Goeltzenleuchter | b001528 | 2018-05-18 16:48:50 -0600 | [diff] [blame] | 842 | libs = [] |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 843 | if (is_linux) { |
| 844 | sources += rebase_path(util_gypi.util_linux_sources, ".", "util") |
Courtney Goeltzenleuchter | b001528 | 2018-05-18 16:48:50 -0600 | [diff] [blame] | 845 | libs += [ |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 846 | "rt", |
| 847 | "dl", |
| 848 | ] |
| 849 | } |
| 850 | |
| 851 | if (is_mac) { |
| 852 | sources += rebase_path(util_gypi.util_osx_sources, ".", "util") |
Courtney Goeltzenleuchter | b001528 | 2018-05-18 16:48:50 -0600 | [diff] [blame] | 853 | libs += [ |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 854 | "AppKit.framework", |
| 855 | "QuartzCore.framework", |
| 856 | ] |
| 857 | } |
| 858 | |
| 859 | if (use_x11) { |
| 860 | sources += rebase_path(util_gypi.util_x11_sources, ".", "util") |
| 861 | } |
| 862 | |
| 863 | if (is_android) { |
Andrew Grieve | 949e070 | 2017-01-16 09:44:49 -0500 | [diff] [blame] | 864 | if (is_shared_library) { |
| 865 | configs -= [ "//build/config/android:hide_all_but_jni_onload" ] |
| 866 | } |
Corentin Wallez | 7b4e00d | 2017-02-08 10:43:47 -0500 | [diff] [blame] | 867 | |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 868 | # To prevent linux sources filtering on android |
| 869 | set_sources_assignment_filter([]) |
| 870 | sources += rebase_path(util_gypi.util_linux_sources, ".", "util") |
| 871 | sources += rebase_path(util_gypi.util_android_sources, ".", "util") |
Yuly Novikov | cd70aa4 | 2018-06-20 17:05:32 -0400 | [diff] [blame] | 872 | libs += [ |
| 873 | "android", |
| 874 | "log", |
| 875 | ] |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 876 | } |
| 877 | |
| 878 | if (use_ozone) { |
| 879 | sources += rebase_path(util_gypi.util_ozone_sources, ".", "util") |
| 880 | } |
| 881 | |
| 882 | configs += [ |
| 883 | ":debug_annotations_config", |
| 884 | ":extra_warnings", |
Yuly Novikov | 87ae8cd | 2016-05-19 17:59:55 -0400 | [diff] [blame] | 885 | ] |
Corentin Wallez | beb8158 | 2015-09-02 10:30:55 -0400 | [diff] [blame] | 886 | |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 887 | public_configs = [ |
| 888 | ":angle_util_config", |
| 889 | ":internal_config", |
Yuly Novikov | e3352f9 | 2016-08-12 20:40:14 -0400 | [diff] [blame] | 890 | ] |
Corentin Wallez | beb8158 | 2015-09-02 10:30:55 -0400 | [diff] [blame] | 891 | |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 892 | deps = [ |
| 893 | ":angle_common", |
| 894 | ":libEGL${dep_suffix}", |
| 895 | ":libGLESv2${dep_suffix}", |
Yuly Novikov | a6426d6 | 2016-06-03 00:18:38 -0400 | [diff] [blame] | 896 | ] |
Jamie Madill | 80ab03c | 2017-01-03 11:03:23 -0500 | [diff] [blame] | 897 | |
| 898 | if (is_shared_library) { |
| 899 | defines = [ "LIBANGLE_UTIL_IMPLEMENTATION" ] |
| 900 | |
| 901 | if (is_mac && !is_component_build) { |
| 902 | ldflags = [ |
| 903 | "-install_name", |
| 904 | "@rpath/lib${target_name}.dylib", |
| 905 | ] |
| 906 | public_configs += [ ":shared_library_public_config" ] |
| 907 | } |
| 908 | } |
Yuly Novikov | a6426d6 | 2016-06-03 00:18:38 -0400 | [diff] [blame] | 909 | } |
Corentin Wallez | beb8158 | 2015-09-02 10:30:55 -0400 | [diff] [blame] | 910 | } |
Ken Russell | fcadd08 | 2017-06-28 14:01:15 -0700 | [diff] [blame] | 911 | |
| 912 | # Convenience targets for some of the samples so they can be built |
| 913 | # with Chromium's toolchain. |
| 914 | |
| 915 | executable("angle_shader_translator") { |
| 916 | testonly = true |
| 917 | |
| 918 | sources = [ |
Yuly Novikov | f0be43f | 2017-06-29 21:25:56 -0400 | [diff] [blame] | 919 | "samples/shader_translator/shader_translator.cpp", |
Ken Russell | fcadd08 | 2017-06-28 14:01:15 -0700 | [diff] [blame] | 920 | ] |
| 921 | |
| 922 | deps = [ |
Yuly Novikov | f0be43f | 2017-06-29 21:25:56 -0400 | [diff] [blame] | 923 | ":translator", |
Ken Russell | fcadd08 | 2017-06-28 14:01:15 -0700 | [diff] [blame] | 924 | ] |
| 925 | } |
Courtney Goeltzenleuchter | 2565d48 | 2018-04-12 17:06:48 -0600 | [diff] [blame] | 926 | |
| 927 | if (is_android) { |
| 928 | # Package ANGLE libraries for pre-installed system image |
| 929 | android_apk("angle_apk") { |
| 930 | if (build_apk_secondary_abi && android_64bit_target_cpu) { |
| 931 | secondary_abi_shared_libraries = [ |
Courtney Goeltzenleuchter | e5db628 | 2018-04-26 08:05:18 -0600 | [diff] [blame] | 932 | "//third_party/angle:libEGL${angle_libs_suffix}($android_secondary_abi_toolchain)", |
Courtney Goeltzenleuchter | ddd7724 | 2018-04-30 10:31:18 -0600 | [diff] [blame] | 933 | "//third_party/angle:libGLESv1_CM${angle_libs_suffix}($android_secondary_abi_toolchain)", |
Courtney Goeltzenleuchter | b001528 | 2018-05-18 16:48:50 -0600 | [diff] [blame] | 934 | "//third_party/angle:libGLESv2${angle_libs_suffix}($android_secondary_abi_toolchain)", |
Courtney Goeltzenleuchter | 2565d48 | 2018-04-12 17:06:48 -0600 | [diff] [blame] | 935 | ] |
| 936 | } |
| 937 | |
| 938 | android_manifest = "AndroidManifest.xml" |
Courtney Goeltzenleuchter | e5db628 | 2018-04-26 08:05:18 -0600 | [diff] [blame] | 939 | |
| 940 | # requires_sdk_api_level_23 tells the apk tool that this apk is only |
| 941 | # supported on M or later releases (which is true for Vulkan). |
| 942 | # Allows tool to optimize for that. |
Courtney Goeltzenleuchter | 2565d48 | 2018-04-12 17:06:48 -0600 | [diff] [blame] | 943 | requires_sdk_api_level_23 = true |
Courtney Goeltzenleuchter | 8c1508b | 2018-07-30 09:46:27 -0600 | [diff] [blame^] | 944 | apk_name = "ANGLEPrebuilt" |
Courtney Goeltzenleuchter | 2565d48 | 2018-04-12 17:06:48 -0600 | [diff] [blame] | 945 | uncompress_shared_libraries = true |
| 946 | shared_libraries = [ |
Courtney Goeltzenleuchter | e5db628 | 2018-04-26 08:05:18 -0600 | [diff] [blame] | 947 | "//third_party/angle:libEGL${angle_libs_suffix}", |
Courtney Goeltzenleuchter | ddd7724 | 2018-04-30 10:31:18 -0600 | [diff] [blame] | 948 | "//third_party/angle:libGLESv1_CM${angle_libs_suffix}", |
Courtney Goeltzenleuchter | b001528 | 2018-05-18 16:48:50 -0600 | [diff] [blame] | 949 | "//third_party/angle:libGLESv2${angle_libs_suffix}", |
Courtney Goeltzenleuchter | 2565d48 | 2018-04-12 17:06:48 -0600 | [diff] [blame] | 950 | ] |
| 951 | } |
| 952 | } |