Skip to content

Commit ef514ca

Browse files
authored
Forward build_overrides to flutter/build_overrides (#832)
In flutter/engine#51258, all existing build_overrides from the buildroot were copied into the engine. This replaces each existing file under build_overrides in the buildroot with a shim that just imports the files landed in that patch. This allows the third-party dependencies to continue hardcoding the `//build_overrides/foo.gni` path, but provides a seamless path forward when we drop the buildroot. Issue: flutter/flutter#144790 Part of: flutter/flutter#67373 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] Do not start, operate, or service Flutter CI infra until you read and understand the operator's manual. Failure to do so could result in serious injury or death. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
1 parent 31f887a commit ef514ca

11 files changed

+33
-87
lines changed

build_overrides/angle.gni

+3-34
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
# Ensure use_xcode_clang is visibile to ANGLE.
6-
import("//build/toolchain/toolchain.gni")
7-
8-
# The ANGLE build requires this file to point to the location of third-party
9-
# dependencies.
10-
angle_root = "//third_party/angle"
11-
12-
angle_vma_version = 30000001
13-
14-
# Flutter's buildroot looks enough like Chromium to satisfy Angle, and enough
15-
# to cause GN variable collisions if we don't set this.
16-
if (!is_fuchsia) {
17-
angle_has_build = true
18-
}
19-
20-
# Overrides for ANGLE's dependencies.
21-
angle_abseil_cpp_dir = "//flutter/third_party/abseil-cpp"
22-
angle_glslang_dir = "//flutter/third_party/vulkan-deps/glslang/src"
23-
angle_googletest_dir = "//third_party/googletest/googletest/src"
24-
25-
# Note: This path doesn't actually exist; see
26-
# //build/secondary/third_party/jsoncpp/BUILD.gn
27-
angle_jsoncpp_dir = "//third_party/jsoncpp"
28-
angle_libjpeg_turbo_dir = "//third_party/libjpeg_turbo"
29-
angle_libpng_dir = "//flutter/third_party/libpng"
30-
angle_spirv_headers_dir = "//flutter/third_party/vulkan-deps/spirv-headers/src"
31-
angle_spirv_tools_dir = "//flutter/third_party/vulkan-deps/spirv-tools/src"
32-
angle_spirv_cross_dir = "//flutter/third_party/vulkan-deps/spirv-cross/src"
33-
angle_spirv_headers_dir = "//flutter/third_party/vulkan-deps/spirv-headers/src"
34-
angle_vulkan_memory_allocator_dir = "//third_party/vulkan_memory_allocator"
35-
36-
# This is a general Chromium flag, but in the Flutter build only ANGLE needs it
37-
# so it is defined here.
38-
is_cfi = false
5+
# This file is a temporary shim needed during the elimination of the buildroot.
6+
# See: https://github.com/flutter/flutter/issues/67373
7+
import("//flutter/build_overrides/angle.gni")

build_overrides/build.gni

+3-9
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
# The engine build uses some Chromium-sourced versions of third-party
6-
# dependencies (e.g, ANGLE, abseil) to use their GN build files, but we don't
7-
# want the Chromium-specific parts of the build.
8-
build_with_chromium = false
9-
10-
# Perfetto targets fail to build without this variable. It is used by Perfetto
11-
# targets to distinguish embedder builds from Perfetto standalone builds, and
12-
# builds in the Android tree.
13-
perfetto_build_with_embedder = true
5+
# This file is a temporary shim needed during the elimination of the buildroot.
6+
# See: https://github.com/flutter/flutter/issues/67373
7+
import("//flutter/build_overrides/build.gni")

build_overrides/glslang.gni

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
glslang_spirv_tools_dir = "//flutter/third_party/vulkan-deps/spirv-tools/src"
6-
spirv_tools_dir = "//flutter/third_party/vulkan-deps/spirv-tools/src"
5+
# This file is a temporary shim needed during the elimination of the buildroot.
6+
# See: https://github.com/flutter/flutter/issues/67373
7+
import("//flutter/build_overrides/glslang.gni")

build_overrides/spirv_tools.gni

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
# We are building inside Flutter.
6-
spirv_tools_standalone = false
7-
8-
# Paths to SPIRV-Tools dependencies in Flutter.
9-
spirv_tools_googletest_dir = "//third_party/googletest/googletest/src"
10-
spirv_tools_spirv_headers_dir = "//flutter/third_party/vulkan-deps/spirv-headers/src"
5+
# This file is a temporary shim needed during the elimination of the buildroot.
6+
# See: https://github.com/flutter/flutter/issues/67373
7+
import("//flutter/build_overrides/spirv_tools.gni")

build_overrides/swiftshader.gni

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
# We are building SwiftShader in Flutter.
6-
swiftshader_standalone = false
7-
8-
# Path to SwiftShader.
9-
swiftshader_dir = "//flutter/third_party/swiftshader"
5+
# This file is a temporary shim needed during the elimination of the buildroot.
6+
# See: https://github.com/flutter/flutter/issues/67373
7+
import("//flutter/build_overrides/swiftshader.gni")

build_overrides/vulkan_headers.gni

+3-7
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
# This file is needed by the vulkan-headers build, but doesn't need to actually
6-
# set anything.
7-
8-
if (is_linux) {
9-
vulkan_use_x11 = true
10-
vulkan_use_wayland = true
11-
}
5+
# This file is a temporary shim needed during the elimination of the buildroot.
6+
# See: https://github.com/flutter/flutter/issues/67373
7+
import("//flutter/build_overrides/vulkan_headers.gni")

build_overrides/vulkan_loader.gni

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
vulkan_headers_dir = "//flutter/third_party/vulkan-deps/vulkan-headers/src"
6-
7-
# Vulkan loader build options
8-
vulkan_loader_shared = true
5+
# This file is a temporary shim needed during the elimination of the buildroot.
6+
# See: https://github.com/flutter/flutter/issues/67373
7+
import("//flutter/build_overrides/vulkan_loader.gni")

build_overrides/vulkan_tools.gni

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
vulkan_headers_dir = "//flutter/third_party/vulkan-deps/vulkan-headers/src"
6-
7-
# Subdirectories for generated files
8-
vulkan_data_subdir = ""
9-
vulkan_gen_subdir = ""
5+
# This file is a temporary shim needed during the elimination of the buildroot.
6+
# See: https://github.com/flutter/flutter/issues/67373
7+
import("//flutter/build_overrides/vulkan_tools.gni")

build_overrides/vulkan_utility_libraries.gni

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
vulkan_headers_dir = "//flutter/third_party/vulkan-deps/vulkan-headers/src"
5+
# This file is a temporary shim needed during the elimination of the buildroot.
6+
# See: https://github.com/flutter/flutter/issues/67373
7+
import("//flutter/build_overrides/vulkan_utility_libraries.gni")

build_overrides/vulkan_validation_layers.gni

+3-10
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
vulkan_headers_dir = "//flutter/third_party/vulkan-deps/vulkan-headers/src"
6-
vulkan_utility_libraries_dir = "//flutter/third_party/vulkan-deps/vulkan-utility-libraries/src"
7-
vvl_spirv_tools_dir = "//flutter/third_party/vulkan-deps/spirv-tools/src"
8-
vvl_glslang_dir = "//flutter/third_party/vulkan-deps/spirv-tools/src"
9-
10-
# robin_hood_headers_dir = "//external/robin-hood-hashing/src/include"
11-
12-
# Subdirectories for generated files
13-
vulkan_data_subdir = "vulkan-data"
14-
vulkan_gen_subdir = ""
5+
# This file is a temporary shim needed during the elimination of the buildroot.
6+
# See: https://github.com/flutter/flutter/issues/67373
7+
import("//flutter/build_overrides/vulkan_validation_layers.gni")

build_overrides/wayland.gni

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
# ANGLE expects this to be here.
6-
7-
# Flutter has no wayland third-party dir
8-
wayland_gn_dir = ""
5+
# This file is a temporary shim needed during the elimination of the buildroot.
6+
# See: https://github.com/flutter/flutter/issues/67373
7+
import("//flutter/build_overrides/wayland.gni")

0 commit comments

Comments
 (0)