Skip to content

Commit eb6af3d

Browse files
Get et working for local web engine builds. (#161825)
This PR makes a few different changes to make building the web engine via `et` a bit smoother: * Adds a few build steps to `local_engine.json` so that et can build `wasm_release` and `wasm_debug_unopt` builds on Linux and Mac locally. * Removed the part of our `generate_builder_json` step which generates the `linux_web_engine_build.json` file. This previously used to be generated based off of the contents of `felt_config.yaml` but now it's just not parameterized at all, so there is no benefit to generating it and we can just manually maintain the file now. * Fixed an issue where the skwasm debug build was failing due to a wrong output file being specified in the gn rule.
1 parent cfb8522 commit eb6af3d

File tree

4 files changed

+103
-34
lines changed

4 files changed

+103
-34
lines changed

engine/src/flutter/ci/builders/linux_web_engine_build.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"_comment": "THIS IS A GENERATED FILE. Do not edit this file directly.",
3-
"_comment2": "See `generate_builder_json.dart` for the generator code",
42
"builds": [
53
{
64
"name": "ci/wasm_release",

engine/src/flutter/ci/builders/local_engine.json

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,108 @@
948948
"config": "host_release",
949949
"targets": []
950950
}
951+
},
952+
{
953+
"name": "linux/wasm_release",
954+
"drone_dimensions": [
955+
"device_type=none",
956+
"os=Linux"
957+
],
958+
"gclient_variables": {
959+
"download_android_deps": false,
960+
"download_jdk": false,
961+
"download_emsdk": true
962+
},
963+
"gn": [
964+
"--web",
965+
"--runtime-mode=release",
966+
"--no-rbe",
967+
"--no-goma"
968+
],
969+
"ninja": {
970+
"config": "wasm_release",
971+
"targets": [
972+
"flutter/web_sdk:flutter_web_sdk_archive"
973+
]
974+
},
975+
"cas_archive": false
976+
},
977+
{
978+
"name": "linux/wasm_debug_unopt",
979+
"drone_dimensions": [
980+
"device_type=none",
981+
"os=Linux"
982+
],
983+
"gclient_variables": {
984+
"download_android_deps": false,
985+
"download_jdk": false,
986+
"download_emsdk": true
987+
},
988+
"gn": [
989+
"--web",
990+
"--runtime-mode=debug",
991+
"--unoptimized",
992+
"--no-rbe",
993+
"--no-goma"
994+
],
995+
"ninja": {
996+
"config": "wasm_debug_unopt",
997+
"targets": [
998+
"flutter/web_sdk:flutter_web_sdk_archive"
999+
]
1000+
},
1001+
"cas_archive": false
1002+
},
1003+
{
1004+
"name": "macos/wasm_release",
1005+
"drone_dimensions": [
1006+
"device_type=none",
1007+
"os=Mac"
1008+
],
1009+
"gclient_variables": {
1010+
"download_android_deps": false,
1011+
"download_jdk": false,
1012+
"download_emsdk": true
1013+
},
1014+
"gn": [
1015+
"--web",
1016+
"--runtime-mode=release",
1017+
"--no-rbe",
1018+
"--no-goma"
1019+
],
1020+
"ninja": {
1021+
"config": "wasm_release",
1022+
"targets": [
1023+
"flutter/web_sdk:flutter_web_sdk_archive"
1024+
]
1025+
},
1026+
"cas_archive": false
1027+
},
1028+
{
1029+
"name": "macos/wasm_debug_unopt",
1030+
"drone_dimensions": [
1031+
"device_type=none",
1032+
"os=Mac"
1033+
],
1034+
"gclient_variables": {
1035+
"download_android_deps": false,
1036+
"download_jdk": false,
1037+
"download_emsdk": true
1038+
},
1039+
"gn": [
1040+
"--web",
1041+
"--runtime-mode=debug",
1042+
"--unoptimized",
1043+
"--no-rbe",
1044+
"--no-goma"
1045+
],
1046+
"ninja": {
1047+
"config": "wasm_debug_unopt",
1048+
"targets": [
1049+
"flutter/web_sdk:flutter_web_sdk_archive"
1050+
]
1051+
},
1052+
"cas_archive": false
9511053
}
9521054
]
9531055
}

engine/src/flutter/lib/web_ui/dev/generate_builder_json.dart

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ class GenerateBuilderJsonCommand extends Command<bool> {
2828
final FeltConfig config = FeltConfig.fromFile(
2929
path.join(environment.webUiTestDir.path, 'felt_config.yaml'),
3030
);
31-
_writeBuilderJson(
32-
_generateBuilderJson([_getArtifactBuildStep()], []),
33-
'linux_web_engine_build.json',
34-
);
3531
_writeBuilderJson(
3632
_generateBuilderJson(
3733
config.testBundles.map((TestBundle bundle) => _getBundleBuildStep(bundle)).toList(),
@@ -63,33 +59,6 @@ class GenerateBuilderJsonCommand extends Command<bool> {
6359
return const JsonEncoder.withIndent(' ').convert(outputJson);
6460
}
6561

66-
Map<String, dynamic> _getArtifactBuildStep() {
67-
return <String, dynamic>{
68-
'name': 'ci/wasm_release',
69-
'drone_dimensions': <String>['device_type=none', 'os=Linux', 'cores=32'],
70-
'gclient_variables': <String, dynamic>{
71-
'download_android_deps': false,
72-
'download_jdk': false,
73-
'download_emsdk': true,
74-
},
75-
'gn': <String>['--web', '--runtime-mode=release', '--no-rbe', '--no-goma'],
76-
'ninja': <String, dynamic>{
77-
'config': 'wasm_release',
78-
'targets': <String>['flutter/web_sdk:flutter_web_sdk_archive'],
79-
},
80-
'archives': <dynamic>[
81-
<String, dynamic>{
82-
'name': 'wasm_release',
83-
'base_path': 'out/wasm_release/zip_archives/',
84-
'type': 'gcs',
85-
'include_paths': <String>['out/wasm_release/zip_archives/flutter-web-sdk.zip'],
86-
'realm': 'production',
87-
},
88-
],
89-
'cas_archive': false,
90-
};
91-
}
92-
9362
Map<String, dynamic> _getBundleBuildStep(TestBundle bundle) {
9463
return <String, dynamic>{
9564
'name': 'web_tests/test_bundles/${bundle.name}',

engine/src/flutter/third_party/canvaskit/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ copy("skwasm_st_group") {
143143
]
144144
if (is_debug) {
145145
if (!wasm_use_dwarf) {
146-
sources += [ "$root_out_dir/skwasm_st/skwasm.wasm.map" ]
146+
sources += [ "$root_out_dir/skwasm_st/skwasm_st.wasm.map" ]
147147
}
148148
}
149149
outputs = [ "$root_out_dir/flutter_web_sdk/canvaskit/{{source_file_part}}" ]

0 commit comments

Comments
 (0)