Skip to content

Commit

Permalink
Move ANGLE to flutter/third_party
Browse files Browse the repository at this point in the history
This moves Flutter out of the buildroot's third_party directory and into
//flutter/third_party and updates all BUILD and gni files.

Issue: flutter/flutter#144786
Part of: flutter/flutter#67373
  • Loading branch information
cbracken committed Mar 7, 2024
1 parent 80cd798 commit 78ee3f1
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ deps = {
'src/flutter/third_party/swiftshader':
Var('swiftshader_git') + '/SwiftShader.git' + '@' + '2fa7e9b99ae4e70ea5ae2cc9c8d3afb43391384f',

'src/third_party/angle':
'src/flutter/third_party/angle':
Var('chromium_git') + '/angle/angle.git' + '@' + '6a09e41ce6ea8c93524faae1a925eb01562f53b1',

'src/third_party/vulkan_memory_allocator':
Expand Down
2 changes: 1 addition & 1 deletion build_overrides/angle.gni
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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"
angle_root = "//flutter/third_party/angle"

angle_vma_version = 30000001

Expand Down
4 changes: 2 additions & 2 deletions impeller/golden_tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ if (is_mac) {
"//flutter/impeller/aiks",
"//flutter/impeller/aiks:aiks_unittests_golden",
"//flutter/impeller/fixtures",
"//flutter/third_party/angle:libEGL",
"//flutter/third_party/angle:libGLESv2",
"//flutter/third_party/googletest:gtest",
"//flutter/third_party/swiftshader",
"//third_party/angle:libEGL",
"//third_party/angle:libGLESv2",
]
}
}
6 changes: 3 additions & 3 deletions impeller/renderer/backend/gles/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import("../../../tools/impeller.gni")
config("gles_config") {
# Generic GL/GLES/EGL/Vulkan headers. Any will do. We just pick one from Angle
# because they are there.
include_dirs = [ "//third_party/angle/include" ]
include_dirs = [ "//flutter/third_party/angle/include" ]
}

impeller_component("gles_unittests") {
Expand Down Expand Up @@ -85,11 +85,11 @@ impeller_component("gles") {
if (!is_android && !is_fuchsia) {
public_configs = [ ":gles_config" ]
sources += [
"//third_party/angle/include/GLES2/gl2ext.h",
"//flutter/third_party/angle/include/GLES2/gl2ext.h",

# The GLES3 API is a superset of GLES2. Although we target GLES2, we use
# some GLES3 features if the driver supports them.
"//third_party/angle/include/GLES3/gl3.h",
"//flutter/third_party/angle/include/GLES3/gl3.h",
]
}

Expand Down
4 changes: 2 additions & 2 deletions shell/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ if (enable_unittests) {

if (shell_enable_gl) {
deps += [
"//flutter/third_party/angle:libEGL_static",
"//flutter/third_party/angle:libGLESv2_static",
"//flutter/third_party/swiftshader",
"//third_party/angle:libEGL_static",
"//third_party/angle:libGLESv2_static",
]
}
}
Expand Down
16 changes: 8 additions & 8 deletions shell/platform/windows/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ _public_headers = [ "public/flutter_windows.h" ]
_internal_headers = [ "flutter_windows_internal.h" ]

config("relative_angle_headers") {
include_dirs = [ "//third_party/angle/include" ]
include_dirs = [ "//flutter/third_party/angle/include" ]
}

# Any files that are built by clients (client_wrapper code, library headers for
Expand Down Expand Up @@ -138,7 +138,7 @@ source_set("flutter_windows_source") {

configs += [
"//flutter/shell/platform/common:desktop_library_implementation",
"//third_party/angle:gl_prototypes",
"//flutter/third_party/angle:gl_prototypes",
]

public_configs = [ ":relative_angle_headers" ]
Expand All @@ -161,13 +161,13 @@ source_set("flutter_windows_source") {
"//flutter/shell/platform/common/client_wrapper:client_wrapper",
"//flutter/shell/platform/embedder:embedder_as_internal_library",
"//flutter/shell/platform/windows/client_wrapper:client_wrapper_windows",

# libEGL_static MUST be ordered before libGLESv2_static in this list. If
# reversed, a linker error will occur, reporting DllMain already defined in
# LIBCMTD.lib
"//flutter/third_party/angle:libEGL_static",
"//flutter/third_party/angle:libGLESv2_static",
"//flutter/third_party/rapidjson",
"//third_party/angle:libEGL_static", # the order of libEGL_static and
# libGLESv2_static is important.. if
# reversed, will cause a linker error
# DllMain already defined in
# LIBCMTD.lib
"//third_party/angle:libGLESv2_static",
]
}

Expand Down
6 changes: 3 additions & 3 deletions testing/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,13 @@ if (use_swiftshader) {

configs -= [ "//build/config/clang:extra_warnings" ]
configs += [
"//third_party/angle:gl_prototypes",
"//flutter/third_party/angle:gl_prototypes",
"//flutter/third_party/swiftshader:swiftshader_config",
]
deps += [
"//flutter/third_party/angle:libEGL_static",
"//flutter/third_party/angle:libGLESv2_static",
"//flutter/third_party/swiftshader",
"//third_party/angle:libEGL_static",
"//third_party/angle:libGLESv2_static",
]
}
}
24 changes: 12 additions & 12 deletions tools/licenses/lib/paths.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ final Set<String> skippedPaths = <String>{
r'flutter/lib/web_ui/dev', // these are build tools; they do not end up in Engine artifacts
r'flutter/prebuilts',
r'flutter/sky/packages/sky_engine/LICENSE',
r'flutter/third_party/angle/android',
r'flutter/third_party/angle/doc',
r'flutter/third_party/angle/extensions',
r'flutter/third_party/angle/infra',
r'flutter/third_party/angle/scripts',
r'flutter/third_party/angle/src/libANGLE/renderer/metal/doc',
r'flutter/third_party/angle/src/libANGLE/renderer/vulkan/doc',
r'flutter/third_party/angle/src/third_party/volk', // We don't use Vulkan in our ANGLE build.
r'flutter/third_party/angle/third_party', // Unused by Flutter: BUILD files with forwarding targets (but no code).
r'flutter/third_party/angle/tools', // These are build-time tools, and aren't shipped.
r'flutter/third_party/angle/util',
r'flutter/third_party/benchmark', // only used by tests
r'flutter/third_party/boringssl/src/crypto/err/err_data_generate.go',
r'flutter/third_party/boringssl/src/fuzz', // testing tools, not shipped
Expand Down Expand Up @@ -161,17 +172,6 @@ final Set<String> skippedPaths = <String>{
r'out', // output of build
r'third_party/android_embedding_dependencies', // Not shipped. Used only for the build-time classpath, and for the in-tree testing framework for Android
r'third_party/android_tools', // excluded on advice
r'third_party/angle/android',
r'third_party/angle/doc',
r'third_party/angle/extensions',
r'third_party/angle/infra',
r'third_party/angle/scripts',
r'third_party/angle/src/libANGLE/renderer/metal/doc',
r'third_party/angle/src/libANGLE/renderer/vulkan/doc',
r'third_party/angle/src/third_party/volk', // We don't use Vulkan in our ANGLE build.
r'third_party/angle/third_party', // Unused by Flutter: BUILD files with forwarding targets (but no code).
r'third_party/angle/tools', // These are build-time tools, and aren't shipped.
r'third_party/angle/util',
r'third_party/dart/benchmarks', // not shipped in binary
r'third_party/dart/build', // not shipped in binary
r'third_party/dart/docs', // not shipped in binary
Expand Down Expand Up @@ -461,11 +461,11 @@ final List<Pattern> skippedFilePatterns = <Pattern>[
RegExp(r'^flutter/lib/web_ui/lib/assets/ahem\.ttf$', expectNoMatch: true), // this gitignored file exists only for testing purposes
RegExp(r'^flutter/sky/packages/sky_engine/LICENSE$'), // that is the output of this script
RegExp(r'^flutter/third_party/abseil-cpp/(?:.+/)*[^/]+_test\.[^/]+$'),
RegExp(r'^flutter/third_party/angle/(?:.+/)*[^/]+_unittest\.[^/]+$'),
RegExp(r'^flutter/third_party/boringssl/(?:.+/)*[^/]+_test\.[^/]+$'),
RegExp(r'^flutter/third_party/boringssl/src/crypto/fipsmodule/bn/[^/]+.go$'),
RegExp(r'^flutter/third_party/boringssl/src/crypto/fipsmodule/ec/[^/]+.go$'),
RegExp(r'^flutter/third_party/freetype2/docs/(?!FTL\.TXT$).+'), // ignore all documentation except the license
RegExp(r'^third_party/angle/(?:.+/)*[^/]+_unittest\.[^/]+$'),
RegExp(r'^third_party/dart/(?:.+/)*[^/]+_test\.[^/]+$'),
RegExp(r'^third_party/zlib/(?:.+/)*[^/]+_unittest\.[^/]+$'),
];

0 comments on commit 78ee3f1

Please sign in to comment.