* Remove patch for adding D3D11_CLIP_OR_CULL_DISTANCE_COUNT symbol. * Enable adding DEF files in source list. * Disable using visibility attribute for mingw.
261 lines
8.0 KiB
Diff
261 lines
8.0 KiB
Diff
diff --git a/BUILD.gn b/BUILD.gn
|
|
index 6e965691e..6911fb7c6 100644
|
|
--- a/BUILD.gn
|
|
+++ b/BUILD.gn
|
|
@@ -14,7 +14,10 @@ if (angle_has_build) {
|
|
import("//build/config/linux/pkg_config.gni")
|
|
import("//build/config/sanitizers/sanitizers.gni")
|
|
import("//build/config/ui.gni")
|
|
- import("//testing/libfuzzer/fuzzer_test.gni")
|
|
+
|
|
+ if (use_fuzzing_engine) {
|
|
+ import("//testing/libfuzzer/fuzzer_test.gni")
|
|
+ }
|
|
|
|
if (is_android) {
|
|
# android/rules.gni can only be imported for Android targets
|
|
@@ -81,10 +84,14 @@ if (angle_build_all) {
|
|
":angle",
|
|
":angle_shader_translator",
|
|
":translator_fuzzer",
|
|
- ":xxhash_fuzzer",
|
|
"$angle_root/samples:angle_samples",
|
|
- "$angle_root/src/tests:angle_tests",
|
|
+ #"$angle_root/src/tests:angle_tests",
|
|
]
|
|
+ if (use_fuzzing_engine) {
|
|
+ deps += [
|
|
+ ":xxhash_fuzzer",
|
|
+ ]
|
|
+ }
|
|
if (angle_enable_cl) {
|
|
deps += [ "$angle_root/src/libOpenCL:angle_cl" ]
|
|
}
|
|
@@ -243,7 +250,7 @@ config("constructor_and_destructor_warnings") {
|
|
config("extra_warnings") {
|
|
cflags = []
|
|
|
|
- is_gcc = !is_clang && !is_win
|
|
+ is_gcc = !is_clang && !is_msvs
|
|
|
|
# Avoid failing builds for warnings enabled by Skia build.
|
|
if (defined(is_skia_standalone)) {
|
|
@@ -251,7 +258,7 @@ config("extra_warnings") {
|
|
}
|
|
|
|
# Enable more default warnings on Windows.
|
|
- if (is_win) {
|
|
+ if (is_msvs) {
|
|
cflags += [
|
|
"/we4244", # Conversion: possible loss of data.
|
|
"/we4312", # Conversion: greater size.
|
|
@@ -314,7 +321,7 @@ config("build_id_config") {
|
|
ldflags = [ "-Wl,--build-id" ]
|
|
}
|
|
|
|
-_use_copy_compiler_dll = angle_has_build && is_win && target_cpu != "arm64"
|
|
+_use_copy_compiler_dll = angle_has_build && is_msvs && target_cpu != "arm64"
|
|
|
|
# Windows ARM64 is available since 10.0.16299 so no need to copy
|
|
# d3dcompiler_47.dll because this file is available as inbox.
|
|
@@ -436,7 +443,7 @@ angle_source_set("xxhash") {
|
|
}
|
|
}
|
|
|
|
-if (angle_has_build) {
|
|
+if (angle_has_build && use_fuzzing_engine) {
|
|
fuzzer_test("xxhash_fuzzer") {
|
|
sources = [ "src/common/third_party/xxhash/xxhash_fuzzer.cpp" ]
|
|
deps = [ ":xxhash" ]
|
|
@@ -601,9 +608,9 @@ angle_static_library("angle_gpu_info_util") {
|
|
if (is_win) {
|
|
sources += libangle_gpu_info_util_win_sources
|
|
if (!angle_is_winuwp) {
|
|
- libs += [ "setupapi.lib" ]
|
|
+ libs += [ "setupapi" ]
|
|
}
|
|
- libs += [ "dxgi.lib" ]
|
|
+ libs += [ "dxgi" ]
|
|
}
|
|
|
|
if (is_linux || is_chromeos) {
|
|
@@ -698,7 +705,7 @@ template("translator_lib") {
|
|
|
|
if (!invoker.gl_d3d_only) {
|
|
if (angle_enable_vulkan || use_fuzzing_engine ||
|
|
- angle_enable_msl_through_spirv) {
|
|
+ angle_enable_metal) {
|
|
_needs_glsl_base = true
|
|
_needs_glsl_and_vulkan_base = true
|
|
_uses_spirv = true
|
|
@@ -732,11 +739,11 @@ template("translator_lib") {
|
|
deps = [
|
|
":includes",
|
|
":preprocessor",
|
|
- "$angle_root/src/common/spirv:angle_spirv_headers",
|
|
]
|
|
|
|
if (_uses_spirv) {
|
|
deps += [
|
|
+ "$angle_root/src/common/spirv:angle_spirv_headers",
|
|
"$angle_root/src/common/spirv:angle_spirv_base",
|
|
"$angle_root/src/common/spirv:angle_spirv_builder",
|
|
"${angle_spirv_headers_dir}:spv_headers",
|
|
@@ -750,7 +757,7 @@ template("translator_lib") {
|
|
":angle_translator_headers",
|
|
]
|
|
|
|
- if (is_win) {
|
|
+ if (is_msvs) {
|
|
# Necessary to suppress some system header xtree warnings in Release.
|
|
# For some reason this warning doesn't get triggered in Chromium
|
|
cflags = [ "/wd4718" ]
|
|
@@ -905,7 +912,7 @@ config("libANGLE_config") {
|
|
ldflags = []
|
|
defines += [ "LIBANGLE_IMPLEMENTATION" ]
|
|
|
|
- if (is_win) {
|
|
+ if (is_msvs) {
|
|
cflags += [ "/wd4530" ] # C++ exception handler used, but unwind semantics
|
|
# are not enabled.
|
|
}
|
|
@@ -1003,8 +1010,8 @@ angle_source_set("libANGLE_no_vulkan") {
|
|
|
|
if (is_win && !angle_is_winuwp) {
|
|
libs += [
|
|
- "gdi32.lib",
|
|
- "user32.lib",
|
|
+ "gdi32",
|
|
+ "user32",
|
|
]
|
|
}
|
|
|
|
@@ -1029,7 +1036,7 @@ angle_source_set("libANGLE_no_vulkan") {
|
|
}
|
|
|
|
if (angle_enable_d3d11) {
|
|
- libs += [ "dxguid.lib" ]
|
|
+ libs += [ "dxguid" ]
|
|
}
|
|
|
|
if (angle_enable_metal) {
|
|
diff --git a/gni/angle.gni b/gni/angle.gni
|
|
index 53925c104..eb391723f 100644
|
|
--- a/gni/angle.gni
|
|
+++ b/gni/angle.gni
|
|
@@ -45,7 +45,6 @@ if (angle_has_build) {
|
|
import("//build/config/ozone.gni") # import the ozone_platform_x11 variable
|
|
import("//build/config/sanitizers/sanitizers.gni")
|
|
import("//build_overrides/build.gni")
|
|
- import("//testing/test.gni")
|
|
if (is_android) {
|
|
import("//build/config/android/config.gni")
|
|
}
|
|
@@ -58,6 +57,12 @@ if (angle_has_build) {
|
|
angle_vulkan_display_mode = "headless"
|
|
}
|
|
|
|
+ if (is_mingw) {
|
|
+ declare_args() {
|
|
+ use_fuzzing_engine = false
|
|
+ }
|
|
+ }
|
|
+
|
|
declare_args() {
|
|
angle_use_gbm = ozone_platform_gbm
|
|
angle_use_x11 =
|
|
@@ -174,7 +179,7 @@ declare_args() {
|
|
angle_enable_vulkan =
|
|
angle_has_build &&
|
|
!(is_android && build_with_chromium && is_official_build) &&
|
|
- ((is_win && !angle_is_winuwp) ||
|
|
+ ((is_msvs && !angle_is_winuwp) ||
|
|
((is_linux || is_chromeos) &&
|
|
(angle_use_x11 || angle_use_wayland || angle_use_vulkan_display)) ||
|
|
is_android || is_fuchsia || is_ggp || angle_enable_msl_through_spirv)
|
|
@@ -196,7 +201,7 @@ declare_args() {
|
|
|
|
declare_args() {
|
|
# ASTC emulation is only built on standalone non-android builds
|
|
- angle_has_astc_encoder = angle_has_build && angle_standalone && !is_android
|
|
+ angle_has_astc_encoder = angle_has_build && angle_standalone && !is_android && !is_mingw
|
|
}
|
|
|
|
declare_args() {
|
|
@@ -273,7 +278,7 @@ declare_args() {
|
|
angle_vulkan_validation_layers_dir =
|
|
"$angle_root/third_party/vulkan-deps/vulkan-validation-layers/src"
|
|
|
|
- angle_build_vulkan_system_info = angle_has_build && !angle_is_winuwp
|
|
+ angle_build_vulkan_system_info = angle_has_build && angle_enable_vulkan && !angle_is_winuwp
|
|
|
|
# Enable overlay by default when debug layers are enabled. This is currently only implemented on
|
|
# Vulkan.
|
|
diff --git a/src/libANGLE/renderer/d3d/BUILD.gn b/src/libANGLE/renderer/d3d/BUILD.gn
|
|
index 26ae1d852..88298d651 100644
|
|
--- a/src/libANGLE/renderer/d3d/BUILD.gn
|
|
+++ b/src/libANGLE/renderer/d3d/BUILD.gn
|
|
@@ -300,14 +300,16 @@ angle_source_set("angle_d3d_shared") {
|
|
if (angle_enable_d3d9) {
|
|
config("angle_d3d9_backend_config") {
|
|
defines = [ "ANGLE_ENABLE_D3D9" ]
|
|
- ldflags = [ "/DELAYLOAD:d3d9.dll" ]
|
|
+ if (is_msvs) {
|
|
+ ldflags = [ "/DELAYLOAD:d3d9.dll" ]
|
|
+ }
|
|
}
|
|
|
|
angle_source_set("angle_d3d9_backend") {
|
|
sources = _d3d9_backend_sources
|
|
libs = [
|
|
- "d3d9.lib",
|
|
- "delayimp.lib",
|
|
+ "d3d9",
|
|
+ "delayimp",
|
|
]
|
|
public_deps = [ ":angle_d3d_shared" ]
|
|
public_configs = [ ":angle_d3d9_backend_config" ]
|
|
@@ -325,7 +327,7 @@ if (angle_enable_d3d11) {
|
|
angle_source_set("angle_d3d11_backend") {
|
|
sources = _d3d11_backend_sources
|
|
|
|
- libs = [ "dxguid.lib" ]
|
|
+ libs = [ "dxguid" ]
|
|
|
|
public_deps = [ ":angle_d3d_shared" ]
|
|
public_configs = [ ":angle_d3d11_backend_config" ]
|
|
diff --git a/src/tests/BUILD.gn b/src/tests/BUILD.gn
|
|
index f1233cf1d..77bbf3061 100644
|
|
--- a/src/tests/BUILD.gn
|
|
+++ b/src/tests/BUILD.gn
|
|
@@ -3,7 +3,6 @@
|
|
# found in the LICENSE file.
|
|
|
|
import("//build/config/chromecast_build.gni")
|
|
-import("//testing/test.gni")
|
|
import("../../gni/angle.gni")
|
|
import("angle_unittests.gni")
|
|
|
|
diff --git a/util/BUILD.gn b/util/BUILD.gn
|
|
index 4954863c6..ad7d071b0 100644
|
|
--- a/util/BUILD.gn
|
|
+++ b/util/BUILD.gn
|
|
@@ -360,7 +360,7 @@ foreach(is_shared_library,
|
|
}
|
|
}
|
|
|
|
-if (is_win && !angle_is_winuwp) {
|
|
+if (is_msvs && !angle_is_winuwp) {
|
|
angle_source_set("angle_stack_walker") {
|
|
sources = [
|
|
"windows/third_party/StackWalker/src/StackWalker.cpp",
|
|
@@ -416,7 +416,7 @@ angle_source_set("angle_test_utils") {
|
|
sources += [ "windows/test_utils_win.cpp" ]
|
|
if (angle_is_winuwp) {
|
|
sources += [ "windows/test_utils_winuwp.cpp" ]
|
|
- } else {
|
|
+ } else if (is_msvs) {
|
|
deps += [ ":angle_stack_walker" ]
|
|
sources += [ "windows/win32/test_utils_win32.cpp" ]
|
|
}
|