diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index 4866e6021b..726a571637 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -286,6 +286,13 @@ is_apple = is_ios || is_mac # Needed for some third_party build files from Chromium. is_nacl = false +# Needed for //third_party/angle. +is_chromecast = false +is_chromeos_lacros = false +ozone_platform_headless = false +ozone_platform_x11 = false +ozone_platform_wayland = false + default_library_type = "static_library" # ============================================================================= @@ -294,7 +301,8 @@ default_library_type = "static_library" # These Sanitizers all imply using the Clang compiler. On Windows they either # don't work or work differently. -if (!is_clang && (is_asan || is_lsan || is_tsan || is_msan)) { +using_sanitizer = !is_win && (is_asan || is_lsan || is_tsan || is_msan) +if (!is_clang && using_sanitizer) { is_clang = true } diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 8b723d9a85..014fb7c034 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -47,10 +47,6 @@ config("default_include_dirs") { ] } -if (!is_win) { - using_sanitizer = is_asan || is_lsan || is_tsan || is_msan -} - # compiler --------------------------------------------------------------------- # # Base compiler configuration. diff --git a/build/win/BUILD.gn b/build/win/BUILD.gn new file mode 100644 index 0000000000..4e8df7d02e --- /dev/null +++ b/build/win/BUILD.gn @@ -0,0 +1,12 @@ +# Copyright 2019 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Windows DLLs on which Flutter has a runtime dependency that should be shipped +# with our distributable binaries. +# +# This target is for compatibility with the Chromium buildroot. In particular, +# //third_party/angle depends on it. +group("runtime_libs") { + data = [] +} diff --git a/build_overrides/angle.gni b/build_overrides/angle.gni index a4f82405cb..c6f66c9616 100644 --- a/build_overrides/angle.gni +++ b/build_overrides/angle.gni @@ -7,18 +7,20 @@ import("//build/toolchain/toolchain.gni") # The ANGLE build requires this file to point to the location of third-party # dependencies. - angle_root = "//third_party/angle" # Flutter's buildroot looks enough like Chromium to satisfy Angle, and enough # to cause GN variable collisions if we don't set this. angle_has_build = true +# Overrides for ANGLE's dependencies. angle_googletest_dir = "//third_party/googletest/src" -angle_libpng_dir = "//third_party/libpng" # Note: This path doesn't actually exist; see # //build/secondary/third_party/jsoncpp/BUILD.gn angle_jsoncpp_dir = "//third_party/jsoncpp" +angle_libpng_dir = "//third_party/libpng" +angle_spirv_headers_dir = "//third_party/spirv_headers" +angle_spirv_tools_dir = "//third_party/spirv_tools_flutter" # This is a general Chromium flag, but in the Flutter build only ANGLE needs it # so it is defined here. diff --git a/build_overrides/spirv_tools.gni b/build_overrides/spirv_tools.gni new file mode 100644 index 0000000000..c6da7ae61a --- /dev/null +++ b/build_overrides/spirv_tools.gni @@ -0,0 +1,10 @@ +# Copyright 2019 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# We are building inside Flutter. +spirv_tools_standalone = false + +# Paths to SPIRV-Tools dependencies in Flutter. +spirv_tools_googletest_dir = "//third_party/googletest" +spirv_tools_spirv_headers_dir = "//third_party/spirv_headers" diff --git a/build_overrides/swiftshader.gni b/build_overrides/swiftshader.gni new file mode 100644 index 0000000000..aff1f1e835 --- /dev/null +++ b/build_overrides/swiftshader.gni @@ -0,0 +1,9 @@ +# Copyright 2019 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# We are building SwiftShader in Flutter. +swiftshader_standalone = false + +# Path to SwiftShader. +swiftshader_dir = "//third_party/swiftshader"