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

Commit 238adab

Browse files
authored
Revert "Remove android_jit_release_x86." (#56634)
Reverts #56548 Failing roll to the framework, the tool is still looking for these artifacts.
1 parent f3df1fb commit 238adab

File tree

3 files changed

+101
-0
lines changed

3 files changed

+101
-0
lines changed

ci/builders/linux_android_debug_engine.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,46 @@
88
"definition files."
99
],
1010
"builds": [
11+
{
12+
"archives": [
13+
{
14+
"name": "ci/android_jit_release_x86",
15+
"type": "gcs",
16+
"base_path": "out/ci/android_jit_release_x86/zip_archives/",
17+
"include_paths": [
18+
"out/ci/android_jit_release_x86/zip_archives/android-x86-jit-release/artifacts.zip",
19+
"out/ci/android_jit_release_x86/zip_archives/download.flutter.io"
20+
],
21+
"realm": "production"
22+
}
23+
],
24+
"drone_dimensions": [
25+
"device_type=none",
26+
"os=Linux"
27+
],
28+
"gclient_variables": {
29+
"use_rbe": true
30+
},
31+
"gn": [
32+
"--target-dir",
33+
"ci/android_jit_release_x86",
34+
"--android",
35+
"--android-cpu=x86",
36+
"--runtime-mode=jit_release",
37+
"--rbe",
38+
"--no-goma"
39+
],
40+
"name": "ci/android_jit_release_x86",
41+
"description": "Produces jit-release mode artifacts to target x86 Android from a Linux host.",
42+
"ninja": {
43+
"config": "ci/android_jit_release_x86",
44+
"targets": [
45+
"flutter",
46+
"flutter/shell/platform/android:embedding_jars",
47+
"flutter/shell/platform/android:abi_jars"
48+
]
49+
}
50+
},
1151
{
1252
"archives": [
1353
{

ci/builders/linux_unopt.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,52 @@
270270
}
271271
]
272272
},
273+
{
274+
"cas_archive": false,
275+
"drone_dimensions": [
276+
"device_type=none",
277+
"os=Linux"
278+
],
279+
"gclient_variables": {
280+
"use_rbe": true
281+
},
282+
"gn": [
283+
"--target-dir",
284+
"ci/android_jit_release_x86_test",
285+
"--android",
286+
"--android-cpu=x86",
287+
"--runtime-mode=jit_release",
288+
"--rbe",
289+
"--no-goma"
290+
],
291+
"name": "ci/android_jit_release_x86_test",
292+
"description": "Produces jit-release mode artifacts to target x86 Android from a Linux host.",
293+
"ninja": {
294+
"config": "ci/android_jit_release_x86_test",
295+
"targets": [
296+
"flutter",
297+
"flutter/shell/platform/android:embedding_jars",
298+
"flutter/shell/platform/android:abi_jars",
299+
"flutter/shell/platform/android:robolectric_tests"
300+
]
301+
},
302+
"tests": [
303+
{
304+
"language": "python3",
305+
"name": "Host Tests for android_jit_release_x86_test",
306+
"script": "flutter/testing/run_tests.py",
307+
"parameters": [
308+
"--variant",
309+
"ci/android_jit_release_x86_test",
310+
"--type",
311+
"java",
312+
"--engine-capture-core-dump",
313+
"--android-variant",
314+
"ci/android_jit_release_x86_test"
315+
]
316+
}
317+
]
318+
},
273319
{
274320
"cas_archive": false,
275321
"drone_dimensions": [

docs/JIT-Release-Modes.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Normally Flutter runs in JIT for faster compilation/debugging support in `debug` mode and AOT mode for better performance in `profile` and `release` mode. For platforms that Flutter cannot produce AOT artifacts for, such as Android x86 (32 bit), a JIT release build may be used instead. The advantage of this mode over a regular debug build is that it removes debugging support and disables assertions which makes the final artifact smaller and more performant, though less so than a full AOT build.
2+
3+
4+
JIT release mode can be used with a local engine configuration. For example, to setup an Android x86 jit_release and host build you can use the GN command below. Both device and host artifacts need to be built, except in cases where they are the same such as the Desktop shells.
5+
6+
```shell
7+
./flutter/tools/gn --runtime-mode=jit_release --android --android-cpu=x86
8+
ninja -C out/android_jit_release_x86
9+
./flutter/tools/gn --runtime-mode=jit_release
10+
ninja -C out/host_jit_release
11+
```
12+
13+
This can be used with the flutter tool [via the `--local-engine`](Debugging-the-engine.md#running-a-flutter-app-with-a-local-engine) flag to produce a bundle containing the jit release artifacts using the `flutter assemble` command. By default, flutter.gradle does not know how to package this artifacts so it requires custom integration into a build pipeline. Nevertheless, the artifact structure should be identical to a debug build, but with asserts disabled and product mode enabled.
14+
15+
jit_release is not supported on iOS devices. Applications built in JIT mode cannot be distributed on the Apple App Store.

0 commit comments

Comments
 (0)