Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Commit 2c41cfc

Browse files
authored
Add build variables required to roll ANGLE (#565)
This lands buildroot changes required to roll ANGLE to tip-of-tree; specifically, to commit 866210add2f6a2f891306c1d3d802a558462c07b. List of relevant ANGLE commits and the associated change to our buildroot: * 45344f05555eb7fc5a907d45ebc7a7d7e05856f4: dependency added on `is_chromecast`. * 08805e351f3cbfacb515557dc7f7f3d9d57e93bd: dependency added on `//build/win:runtime_libs`. * b62f8dd1164a7486646ad9281ffd6f02aa926e1c: dependency added on `is_chromeos_lacros`. * 81f03cc092f9122bfa574241c28ea7d8c1ff1617: dependencies added on `angle_spirv_headers_dir` and `angle_spirv_tools_dir`. * 96aa681ce39d288a58692debacb6dc2107971c07: dependency added on `ozone_platform_headless`. * 48da1c3594095fe363bd18e58982d9856f6654fa: dependency added on `build_overrides/swiftshader.gni`. * fa2e37497495b1215062603e8d214c2f0ba79451: dependency added on `ozone_platform_x11`. * 89e3de9720ced82ad9ee7fbaf11a6a1ca2aa2349: dependency added on `using_sanitizer` * 2be4f04a47c8b30e5a4cfaa5f4ca5acff68b717c: dependency added on `ozone_platform_wayland`. Issue: flutter/flutter#102117
1 parent 2c4c3a6 commit 2c41cfc

File tree

6 files changed

+44
-7
lines changed

6 files changed

+44
-7
lines changed

build/config/BUILDCONFIG.gn

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,13 @@ is_apple = is_ios || is_mac
286286
# Needed for some third_party build files from Chromium.
287287
is_nacl = false
288288

289+
# Needed for //third_party/angle.
290+
is_chromecast = false
291+
is_chromeos_lacros = false
292+
ozone_platform_headless = false
293+
ozone_platform_x11 = false
294+
ozone_platform_wayland = false
295+
289296
default_library_type = "static_library"
290297

291298
# =============================================================================
@@ -294,7 +301,8 @@ default_library_type = "static_library"
294301

295302
# These Sanitizers all imply using the Clang compiler. On Windows they either
296303
# don't work or work differently.
297-
if (!is_clang && (is_asan || is_lsan || is_tsan || is_msan)) {
304+
using_sanitizer = !is_win && (is_asan || is_lsan || is_tsan || is_msan)
305+
if (!is_clang && using_sanitizer) {
298306
is_clang = true
299307
}
300308

build/config/compiler/BUILD.gn

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ config("default_include_dirs") {
4747
]
4848
}
4949

50-
if (!is_win) {
51-
using_sanitizer = is_asan || is_lsan || is_tsan || is_msan
52-
}
53-
5450
# compiler ---------------------------------------------------------------------
5551
#
5652
# Base compiler configuration.

build/win/BUILD.gn

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2019 The Flutter Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
# Windows DLLs on which Flutter has a runtime dependency that should be shipped
6+
# with our distributable binaries.
7+
#
8+
# This target is for compatibility with the Chromium buildroot. In particular,
9+
# //third_party/angle depends on it.
10+
group("runtime_libs") {
11+
data = []
12+
}

build_overrides/angle.gni

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@ import("//build/toolchain/toolchain.gni")
77

88
# The ANGLE build requires this file to point to the location of third-party
99
# dependencies.
10-
1110
angle_root = "//third_party/angle"
1211

1312
# Flutter's buildroot looks enough like Chromium to satisfy Angle, and enough
1413
# to cause GN variable collisions if we don't set this.
1514
angle_has_build = true
1615

16+
# Overrides for ANGLE's dependencies.
1717
angle_googletest_dir = "//third_party/googletest/src"
18-
angle_libpng_dir = "//third_party/libpng"
1918
# Note: This path doesn't actually exist; see
2019
# //build/secondary/third_party/jsoncpp/BUILD.gn
2120
angle_jsoncpp_dir = "//third_party/jsoncpp"
21+
angle_libpng_dir = "//third_party/libpng"
22+
angle_spirv_headers_dir = "//third_party/spirv_headers"
23+
angle_spirv_tools_dir = "//third_party/spirv_tools_flutter"
2224

2325
# This is a general Chromium flag, but in the Flutter build only ANGLE needs it
2426
# so it is defined here.

build_overrides/spirv_tools.gni

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright 2019 The Flutter Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
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"
10+
spirv_tools_spirv_headers_dir = "//third_party/spirv_headers"

build_overrides/swiftshader.gni

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright 2019 The Flutter Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
# We are building SwiftShader in Flutter.
6+
swiftshader_standalone = false
7+
8+
# Path to SwiftShader.
9+
swiftshader_dir = "//third_party/swiftshader"

0 commit comments

Comments
 (0)