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

Commit 477cf38

Browse files
Merge branch 'master' into angle-roll-warning-fixes
2 parents 4364505 + f27729e commit 477cf38

File tree

483 files changed

+25401
-6878
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

483 files changed

+25401
-6878
lines changed

.cirrus.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -111,24 +111,7 @@ task:
111111
- name: web_tests-3_last-linux # last Web shard must end with _last
112112
<< : *WEB_SHARD_TEMPLATE
113113

114-
- name: web_engine_analysis
115-
compile_host_script: |
116-
cd $ENGINE_PATH/src
117-
./flutter/tools/gn --unoptimized --full-dart-sdk
118-
ninja -C out/host_debug_unopt
119-
script:
120-
- cd $ENGINE_PATH/src/flutter/lib/web_ui
121-
- $ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
122-
- $ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/dartanalyzer --enable-experiment=non-nullable --fatal-warnings --fatal-hints dev/ lib/ test/ tool/
123-
124-
- name: format_and_dart_test
125-
format_script: |
126-
cd $ENGINE_PATH/src/flutter
127-
./ci/format.sh
114+
- name: build_test
128115
build_script: |
129116
cd $ENGINE_PATH/src/flutter
130117
./ci/build.sh
131-
- name: lint_test
132-
lint_script: |
133-
cd $ENGINE_PATH/src
134-
./flutter/ci/lint.sh

BUILD.gn

Lines changed: 89 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,62 @@
44

55
import("//flutter/common/config.gni")
66
import("//flutter/shell/platform/config.gni")
7-
8-
if (is_fuchsia) {
9-
import("//build/fuchsia/sdk.gni")
10-
}
7+
import("//flutter/testing/testing.gni")
118

129
# Whether to build the dartdevc sdk, libraries, and source files
1310
# required for the flutter web sdk.
1411
declare_args() {
1512
full_dart_sdk = false
1613
}
1714

18-
group("flutter") {
19-
testonly = true
15+
config("config") {
16+
include_dirs = [ ".." ]
17+
if (is_win) {
18+
if (current_cpu != "x86") {
19+
cflags = [ "/WX" ] # Treat warnings as errors.
20+
}
21+
}
22+
}
2023

21-
public_deps = []
24+
# This "fuchsia_legacy" configuration includes old, non-embedder API sources and
25+
# defines the LEGACY_FUCHSIA_EMBEDDER symbol. This config and its associated
26+
# template are both transitional and will be removed after the embedder API
27+
# transition is complete.
28+
#
29+
# See `source_set_maybe_fuchsia_legacy` in //flutter/common/config.gni
30+
#
31+
# TODO(fxb/54041): Remove when no longer neccesary.
32+
config("fuchsia_legacy") {
33+
if (is_fuchsia) {
34+
defines = [ "LEGACY_FUCHSIA_EMBEDDER" ]
35+
}
36+
}
2237

23-
if (!is_fuchsia) {
24-
public_deps += [
25-
"//flutter/lib/snapshot:generate_snapshot_bin",
26-
"//flutter/lib/snapshot:kernel_platform_files",
38+
config("export_dynamic_symbols") {
39+
if (is_linux || is_fuchsia) {
40+
inputs = [
41+
"//flutter/common/exported_symbols.sym",
2742
]
43+
ldflags = [ "-Wl,--dynamic-list=" + rebase_path(inputs[0], root_build_dir) ]
2844
}
45+
}
2946

30-
public_deps += [
47+
group("flutter") {
48+
testonly = true
49+
50+
# Compile the engine.
51+
public_deps = [
3152
"//flutter/shell/platform/embedder:flutter_engine",
3253
"//flutter/sky",
3354
]
3455

35-
if (current_toolchain == host_toolchain) {
36-
public_deps += [ "//flutter/tools/font-subset" ]
37-
}
38-
39-
if (current_toolchain == host_toolchain) {
40-
public_deps += [ "//flutter/shell/testing" ]
41-
public_deps += [ "//flutter/tools/const_finder" ]
42-
}
43-
44-
if (is_fuchsia) {
56+
# If enbaled, compile the SDK / snapshot.
57+
if (!is_fuchsia) {
4558
public_deps += [
46-
"//flutter/shell/platform/fuchsia",
47-
"//flutter/shell/testing($host_toolchain)",
59+
"//flutter/lib/snapshot:generate_snapshot_bin",
60+
"//flutter/lib/snapshot:kernel_platform_files",
4861
]
49-
}
5062

51-
if (!is_fuchsia) {
5263
if (current_toolchain == host_toolchain) {
5364
public_deps += [
5465
"//flutter/flutter_frontend_server:frontend_server",
@@ -61,93 +72,95 @@ group("flutter") {
6172
}
6273
}
6374

64-
# If on the host, compile all unittests targets.
75+
# If on the host, compile tools.
6576
if (current_toolchain == host_toolchain) {
66-
if (is_mac) {
67-
public_deps +=
68-
[ "//flutter/shell/platform/darwin:flutter_channels_unittests" ]
69-
}
77+
public_deps += [
78+
"//flutter/shell/testing",
79+
"//flutter/tools/const_finder",
80+
"//flutter/tools/font-subset",
81+
]
82+
}
83+
84+
# Compile all benchmark targets if enabled.
85+
if (enable_unittests && !is_win) {
86+
public_deps += [
87+
"//flutter/fml:fml_benchmarks",
88+
"//flutter/lib/ui:ui_benchmarks",
89+
"//flutter/shell/common:shell_benchmarks",
90+
"//flutter/third_party/txt:txt_benchmarks",
91+
]
92+
}
7093

94+
# Compile all unittests targets if enabled.
95+
if (enable_unittests) {
7196
public_deps += [
7297
"//flutter/flow:flow_unittests",
7398
"//flutter/fml:fml_unittests",
7499
"//flutter/lib/ui:ui_unittests",
75100
"//flutter/runtime:runtime_unittests",
76101
"//flutter/shell/common:shell_unittests",
77-
"//flutter/shell/platform/embedder:embedder_unittests",
78102
"//flutter/testing:testing_unittests",
79103
"//flutter/third_party/txt:txt_unittests",
80104
]
81105

82-
if (!is_win) {
106+
if (is_fuchsia) {
107+
public_deps += [ "//flutter/shell/platform/fuchsia:tests" ]
108+
}
109+
110+
if (is_mac) {
111+
public_deps +=
112+
[ "//flutter/shell/platform/darwin:flutter_channels_unittests" ]
113+
}
114+
115+
if (!is_win && !is_fuchsia) {
83116
public_deps += [
84-
"//flutter/fml:fml_benchmarks",
85-
"//flutter/lib/ui:ui_benchmarks",
86-
"//flutter/shell/common:shell_benchmarks",
87117
"//flutter/shell/platform/android/external_view_embedder:android_external_view_embedder_unittests",
88118
"//flutter/shell/platform/android/jni:jni_unittests",
89-
"//flutter/third_party/txt:txt_benchmarks",
90119
]
91120
}
92121

122+
# TODO(): Enable embedder_unittests on fucsia.
123+
if (!is_fuchsia) {
124+
public_deps += [ "//flutter/shell/platform/embedder:embedder_unittests" ]
125+
}
126+
93127
# Unit tests for desktop embeddings should only be built if the desktop
94128
# embeddings are being built.
95129
if (enable_desktop_embeddings) {
96130
public_deps += [
97131
"//flutter/shell/platform/common/cpp:common_cpp_core_unittests",
98-
"//flutter/shell/platform/common/cpp:common_cpp_unittests",
99132
"//flutter/shell/platform/common/cpp/client_wrapper:client_wrapper_unittests",
100-
"//flutter/shell/platform/glfw/client_wrapper:client_wrapper_glfw_unittests",
101133
]
134+
135+
if (!is_fuchsia) {
136+
# These tests require the embedder and thus cannot run on fuchsia.
137+
# TODO(): Enable when embedder works on fuchsia.
138+
public_deps +=
139+
[ "//flutter/shell/platform/common/cpp:common_cpp_unittests" ]
140+
141+
# These tests require GLFW and thus cannot run on fuchsia.
142+
public_deps += [ "//flutter/shell/platform/glfw/client_wrapper:client_wrapper_glfw_unittests" ]
143+
}
144+
145+
if (is_linux) {
146+
public_deps +=
147+
[ "//flutter/shell/platform/linux:flutter_linux_unittests" ]
148+
}
149+
102150
if (is_mac) {
103151
public_deps += [ "//flutter/shell/platform/darwin/macos:flutter_desktop_darwin_unittests" ]
104152
}
153+
105154
if (is_win) {
106155
public_deps += [
107156
"//flutter/shell/platform/windows:flutter_windows_unittests",
108157
"//flutter/shell/platform/windows/client_wrapper:client_wrapper_windows_unittests",
109158
]
110159
}
111-
if (is_linux) {
112-
public_deps +=
113-
[ "//flutter/shell/platform/linux:flutter_linux_unittests" ]
114-
}
115160
}
116161
}
117162
}
118163

119-
config("config") {
120-
include_dirs = [ ".." ]
121-
if (is_win) {
122-
if (current_cpu != "x86") {
123-
cflags = [ "/WX" ] # Treat warnings as errors.
124-
}
125-
}
126-
}
127-
128-
# This "fuchsia_legacy" configuration includes old, non-embedder API sources and
129-
# defines the LEGACY_FUCHSIA_EMBEDDER symbol. This config and its associated
130-
# template are both transitional and will be removed after the embedder API
131-
# transition is complete.
132-
#
133-
# See `source_set_maybe_fuchsia_legacy` in //flutter/common/config.gni
134-
#
135-
# TODO(fxb/54041): Remove when no longer neccesary.
136-
config("fuchsia_legacy") {
137-
if (is_fuchsia) {
138-
defines = [ "LEGACY_FUCHSIA_EMBEDDER" ]
139-
}
140-
}
141-
142-
config("export_dynamic_symbols") {
143-
if (is_linux || is_fuchsia) {
144-
inputs = [
145-
"//flutter/common/exported_symbols.sym",
146-
]
147-
ldflags = [ "-Wl,--dynamic-list=" + rebase_path(inputs[0], root_build_dir) ]
148-
}
149-
}
150-
151164
group("dist") {
152165
testonly = true
153166

@@ -156,23 +169,12 @@ group("dist") {
156169
]
157170
}
158171

159-
# Fuchsia currently only supports a subset of our unit tests
160-
# When adding a new dep here, please also ensure the dep is added to
161-
# testing/fuchsia/run_tests.sh and testing/fuchsia/test_fars
162172
if (is_fuchsia) {
163173
group("fuchsia_tests") {
164174
testonly = true
165175

166176
deps = [
167-
"//flutter/flow:flow_tests",
168-
"//flutter/flow:flow_tests_next",
169-
"//flutter/fml:fml_tests",
170-
"//flutter/runtime:runtime_tests",
171-
"//flutter/runtime:runtime_tests_next",
172-
"//flutter/shell/common:shell_tests",
173-
"//flutter/shell/common:shell_tests_next",
174-
"//flutter/shell/platform/fuchsia/flutter:flutter_runner_scenic_tests",
175-
"//flutter/shell/platform/fuchsia/flutter:flutter_runner_tests",
177+
"//flutter/shell/platform/fuchsia:tests",
176178
]
177179
}
178180
}

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ C++ and Objective-C/C++ files are formatted with `clang-format`, and GN files wi
3131
[contrib_guide]: https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md
3232
[engine_dev_setup]: https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment
3333

34+
3435
### Fuchsia Contributions from Googlers
3536

3637
Googlers contributing to Fuchsia should follow the additional steps at: go/flutter-fuchsia-pr-policy.

0 commit comments

Comments
 (0)