diff --git a/BUILD.gn b/BUILD.gn index 964d51123..37c43a2c1 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 @@ -91,10 +94,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" ] } @@ -271,7 +278,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)) { @@ -279,7 +286,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. @@ -342,7 +349,7 @@ config("build_id_config") { ldflags = [ "-Wl,--build-id" ] } -_use_copy_compiler_dll = angle_has_build && is_win +_use_copy_compiler_dll = angle_has_build && is_msvs if (_use_copy_compiler_dll) { copy("copy_compiler_dll") { @@ -451,7 +458,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" ] @@ -616,9 +623,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) { @@ -762,7 +769,7 @@ template("translator_lib") { ":angle_version_info", ] - 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" ] @@ -949,7 +956,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. } @@ -1053,8 +1060,8 @@ angle_source_set("libANGLE_no_vulkan") { if (is_win && !angle_is_winuwp) { libs += [ - "gdi32.lib", - "user32.lib", + "gdi32", + "user32", ] } @@ -1079,7 +1086,7 @@ angle_source_set("libANGLE_no_vulkan") { } if (angle_enable_d3d11) { - libs += [ "dxguid.lib" ] + libs += [ "dxguid" ] } if (angle_enable_metal) { diff --git a/build_overrides/build.gni b/build_overrides/build.gni index f9d54f2b3..40c1f8e63 100644 --- a/build_overrides/build.gni +++ b/build_overrides/build.gni @@ -42,7 +42,7 @@ limit_android_deps = true # of hardening checks. To ensure performance remains competitive, drop the # libc++ hardening checks, since ANGLE already makes no security guarantees in # these situations. -if (is_win) { +if (is_msvs) { # TODO(https://crbug.com/1418717): ANGLE uses Chromium's abseil-cpp directory. # Since Abseil does not mark symbols as exported, Chromium uses an alternate # approach to scrape the symbols that need to be exported and generates .def diff --git a/gni/angle.gni b/gni/angle.gni index e946c6b6f..8862dc2f7 100644 --- a/gni/angle.gni +++ b/gni/angle.gni @@ -48,7 +48,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") } @@ -61,6 +60,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 = ozone_platform_x11 && !is_ggp && (is_linux || is_chromeos) @@ -197,7 +202,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() { @@ -274,7 +279,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 b5cbea8b7..054395801 100644 --- a/src/libANGLE/renderer/d3d/BUILD.gn +++ b/src/libANGLE/renderer/d3d/BUILD.gn @@ -27,14 +27,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" ] @@ -52,7 +54,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 440d2e0dd..f686474b5 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 89bfb5362..9a1fd3a07 100644 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -379,7 +379,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", @@ -435,7 +435,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" ] }