summaryrefslogtreecommitdiffstats
path: root/gfx/angle/BUILD.gn
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-11 18:11:13 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-11 18:11:13 +0200
commit4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 (patch)
treef000dd831240707a03b8c806db292c2a15cde3ce /gfx/angle/BUILD.gn
parent3b7ffb477eec078c7036c92c6a51bb5de6de4f28 (diff)
downloadUXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.gz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.lz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.xz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.zip
Roll back to ANGLE/2845
Diffstat (limited to 'gfx/angle/BUILD.gn')
-rwxr-xr-xgfx/angle/BUILD.gn98
1 files changed, 46 insertions, 52 deletions
diff --git a/gfx/angle/BUILD.gn b/gfx/angle/BUILD.gn
index 4232008bc..5c0b1fc32 100755
--- a/gfx/angle/BUILD.gn
+++ b/gfx/angle/BUILD.gn
@@ -6,8 +6,7 @@
import("//build/config/dcheck_always_on.gni")
import("//build/config/linux/pkg_config.gni")
import("//build/config/ui.gni")
-import("//testing/libfuzzer/fuzzer_test.gni")
-import("//third_party/angle/gni/angle.gni")
+import("//third_party/angle/build/angle_common.gni")
import("//ui/ozone/ozone.gni")
if (ozone_platform_gbm) {
@@ -55,7 +54,6 @@ config("extra_warnings") {
cflags = [
"/we4244", # Conversion: possible loss of data.
"/we4456", # Variable shadowing.
- "/we4458", # declaration hides class member.
]
}
}
@@ -73,6 +71,22 @@ if (is_win) {
angle_undefine_configs = [ "//build/config/compiler:default_include_dirs" ]
+component("translator") {
+ sources = [
+ "src/compiler/translator/ShaderLang.cpp",
+ "src/compiler/translator/ShaderVars.cpp",
+ ]
+
+ defines = [ "ANGLE_TRANSLATOR_IMPLEMENTATION" ]
+
+ configs -= angle_undefine_configs
+ configs += [ ":internal_config" ]
+
+ public_deps = [
+ ":translator_lib",
+ ]
+}
+
# Holds the shared includes so we only need to list them once.
source_set("includes") {
sources = [
@@ -96,14 +110,10 @@ static_library("preprocessor") {
configs -= angle_undefine_configs
configs += [ ":internal_config" ]
-
- public_deps = [
- ":angle_common",
- ]
}
-config("translator_disable_pool_alloc") {
- defines = [ "ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC" ]
+config("translator_static_config") {
+ defines = [ "ANGLE_TRANSLATOR_STATIC" ]
}
config("debug_annotations_config") {
@@ -162,33 +172,33 @@ static_library("angle_image_util") {
]
}
-static_library("translator") {
- sources = rebase_path(compiler_gypi.angle_translator_sources, ".", "src")
+static_library("translator_lib") {
+ sources = rebase_path(compiler_gypi.angle_translator_lib_sources, ".", "src")
defines = []
- if (angle_enable_essl || use_libfuzzer) {
+ if (angle_enable_essl) {
sources +=
- rebase_path(compiler_gypi.angle_translator_essl_sources, ".", "src")
+ rebase_path(compiler_gypi.angle_translator_lib_essl_sources, ".", "src")
defines += [ "ANGLE_ENABLE_ESSL" ]
}
- if (angle_enable_glsl || use_libfuzzer) {
+ if (angle_enable_glsl) {
sources +=
- rebase_path(compiler_gypi.angle_translator_glsl_sources, ".", "src")
+ rebase_path(compiler_gypi.angle_translator_lib_glsl_sources, ".", "src")
defines += [ "ANGLE_ENABLE_GLSL" ]
}
- if (angle_enable_hlsl || use_libfuzzer) {
+ if (angle_enable_hlsl) {
sources +=
- rebase_path(compiler_gypi.angle_translator_hlsl_sources, ".", "src")
+ rebase_path(compiler_gypi.angle_translator_lib_hlsl_sources, ".", "src")
defines += [ "ANGLE_ENABLE_HLSL" ]
}
configs -= angle_undefine_configs
- configs += [ ":internal_config" ]
+ configs += [
+ ":internal_config",
+ ":translator_static_config",
+ ]
public_configs = [ ":external_config" ]
- if (use_libfuzzer) {
- all_dependent_configs = [ ":translator_disable_pool_alloc" ]
- }
deps = [
":includes",
@@ -206,18 +216,22 @@ static_library("translator") {
}
}
-source_set("translator_fuzzer") {
+static_library("translator_static") {
sources = [
- "src/compiler/fuzz/translator_fuzzer.cpp",
+ "src/compiler/translator/ShaderLang.cpp",
+ "src/compiler/translator/ShaderVars.cpp",
]
- include_dirs = [
- "include",
- "src",
- ]
+ if (angle_enable_hlsl) {
+ defines = [ "ANGLE_ENABLE_HLSL" ]
+ }
- deps = [
- ":translator",
+ configs -= angle_undefine_configs
+ configs += [ ":internal_config" ]
+ public_configs = [ ":translator_static_config" ]
+
+ public_deps = [
+ ":translator_lib",
]
}
@@ -271,13 +285,9 @@ config("libANGLE_config") {
if (angle_enable_vulkan) {
defines += [ "ANGLE_ENABLE_VULKAN" ]
}
- if (angle_enable_null) {
- defines += [ "ANGLE_ENABLE_NULL" ]
- }
defines += [
"GL_GLEXT_PROTOTYPES",
"EGL_EGLEXT_PROTOTYPES",
- "LIBANGLE_IMPLEMENTATION",
]
if (is_win) {
@@ -301,7 +311,7 @@ static_library("libANGLE") {
include_dirs = []
libs = []
- defines = []
+ defines = [ "LIBANGLE_IMPLEMENTATION" ]
public_deps = [
":angle_common",
]
@@ -309,7 +319,7 @@ static_library("libANGLE") {
":angle_image_util",
":commit_id",
":includes",
- ":translator",
+ ":translator_static",
]
# Shared D3D sources.
@@ -379,10 +389,6 @@ static_library("libANGLE") {
sources += rebase_path(gles_gypi.libangle_vulkan_sources, ".", "src")
}
- if (angle_enable_null) {
- sources += rebase_path(gles_gypi.libangle_null_sources, ".", "src")
- }
-
if (is_debug) {
defines += [ "ANGLE_GENERATE_SHADER_DEBUG_INFO" ]
}
@@ -491,7 +497,7 @@ config("angle_util_config") {
}
}
-shared_library("angle_util") {
+static_library("angle_util") {
sources = rebase_path(util_gypi.util_sources, ".", "util")
if (is_win) {
@@ -508,10 +514,6 @@ shared_library("angle_util") {
if (is_mac) {
sources += rebase_path(util_gypi.util_osx_sources, ".", "util")
- libs = [
- "AppKit.framework",
- "QuartzCore.framework",
- ]
}
if (use_x11) {
@@ -536,7 +538,6 @@ shared_library("angle_util") {
defines = [
"GL_GLEXT_PROTOTYPES",
"EGL_EGLEXT_PROTOTYPES",
- "LIBANGLE_UTIL_IMPLEMENTATION",
]
configs += [
@@ -548,13 +549,6 @@ shared_library("angle_util") {
":angle_util_config",
":internal_config",
]
- if (is_mac && !is_component_build) {
- ldflags = [
- "-install_name",
- "@rpath/lib${target_name}.dylib",
- ]
- public_configs += [ ":shared_library_public_config" ]
- }
deps = [
":angle_common",