1- {
2- "id" : " flutter-engine" ,
3- "load" : false ,
4- "supported_archs" : [
5- " aarch64" ,
6- " arm64" ,
7- " x86_64"
8- ],
9- "supported_host_types" : [
10- " ubuntu" ,
11- " fedora"
12- ],
13- "type" : " dependency" ,
14- "env" : {
15- "PATH" : " ${FLUTTER_WORKSPACE}/app/depot_tools:${PATH}" ,
16- "RUNTIME_MODE" : " debug" ,
17- "DEPOT_TOOLS" : " ${FLUTTER_WORKSPACE}/app/depot_tools" ,
18- "ENGINE_ROOT" : " ${FLUTTER_WORKSPACE}/app/engine" ,
19- "VPYTHON_VIRTUALENV_ROOT" : " ${ENGINE_ROOT}/.vpython" ,
20- "ENGINE_SRC_DIR_RELATIVE" : " src" ,
21- "ENGINE_SRC_DIR" : " ${ENGINE_ROOT}/${ENGINE_SRC_DIR_RELATIVE}" ,
22- "ENGINE_BUILD_FLAGS" : " --runtime-mode=${RUNTIME_MODE} --embedder-for-target --enable-fontconfig --disable-desktop-embeddings --no-build-embedder-examples --enable-impeller-3d --no-lto --no-goma --no-rbe --no-stripped --no-enable-unittests" ,
23- "ENGINE_BUILD_DIR" : " ${ENGINE_SRC_DIR}/out/host_debug" ,
24- "GN_ARGS_FILE" : " ${ENGINE_BUILD_DIR}/args.gn" ,
25- "GN_ARGS_APPEND" : " " ,
26- "PATCH_FOLDER" : " ${FLUTTER_WORKSPACE}/patches/flutter-engine"
27- },
28- "src" : [],
29- "runtime" : {
30- "gclient_config" : {
31- "path" : " ${ENGINE_ROOT}" ,
32- "managed" : false ,
33- "name" : " src/flutter" ,
34- "url" : " https://github.com/flutter/engine.git" ,
35- "custom_vars" : {
36- "download_android_deps" : false ,
37- "download_windows_deps" : false ,
38- "download_linux_deps" : true ,
39- "download_emsdk" : false
40- },
41- "deps_file" : " DEPS" ,
42- "safesync_url" : " "
43- },
44- "pre-requisites" : {
45- "aarch64" : {
46- "ubuntu" : {
47- "cmds" : [
48- " sudo apt-get install -yq pkg-config libfreetype-dev git"
49- ]
50- }
51- },
52- "x86_64" : {
53- "ubuntu" : {
54- "cmds" : [
55- " sudo apt-get install -yq pkg-config libfreetype-dev git"
56- ]
57- },
58- "fedora" : {
59- "cmds" : [
60- " sudo dnf install -y pkg-config freetype-devel git"
61- ]
62- }
63- }
64- },
65- "post_cmds" : [
66- {
67- "cwd" : " ${ENGINE_SRC_DIR}" ,
68- "cmds" : [
69- " git reset --hard" ,
70- " git apply ${PATCH_FOLDER}/0001-clang-toolchain.patch"
71- ]
72- },
73- {
74- "cwd" : " ${ENGINE_ROOT}" ,
75- "cmds" : [
76- " gclient sync -D -R --revision ${FLUTTER_ENGINE_VERSION} -j${HARDWARE_THREADS} -v"
77- ]
78- },
79- {
80- "cwd" : " ${ENGINE_SRC_DIR}/flutter" ,
81- "cmds" : [
82- " git reset --hard"
83- ]
84- },
85- {
86- "cwd" : " ${ENGINE_SRC_DIR}" ,
87- "cmds" : [
88- " ./flutter/tools/gn ${ENGINE_BUILD_FLAGS}" ,
89- " echo ${GN_ARGS_APPEND} >> ${GN_ARGS_FILE}" ,
90- " ${AUTONINJA} -C ${ENGINE_BUILD_DIR}"
91- ]
92- },
93- {
94- "cwd" : " ${ENGINE_BUILD_DIR}" ,
95- "cmds" : [
96- " rm -rf ${PLATFORM_ID_DIR}/bundle | true" ,
97- " mkdir -p ${PLATFORM_ID_DIR}/bundle/data/" ,
98- " mkdir -p ${PLATFORM_ID_DIR}/bundle/lib/" ,
99- " cp ${ENGINE_BUILD_DIR}/icudtl.dat ${PLATFORM_ID_DIR}/bundle/data/" ,
100- " cp ${ENGINE_BUILD_DIR}/libflutter_engine.so ${PLATFORM_ID_DIR}/bundle/lib/"
101- ]
102- }
103- ],
104- "do_clean" : [
105- {
106- "cwd" : " ${ENGINE_BUILD_DIR}" ,
107- "cmds" : [
108- " ninja -t clean"
109- ]
110- }
111- ]
112- }
1+ {
2+ "id" : " flutter-engine" ,
3+ "load" : false ,
4+ "supported_archs" : [
5+ " aarch64" ,
6+ " arm64" ,
7+ " x86_64"
8+ ],
9+ "supported_host_types" : [
10+ " ubuntu" ,
11+ " fedora"
12+ ],
13+ "type" : " dependency" ,
14+ "env" : {
15+ "PATH" : " ${FLUTTER_WORKSPACE}/app/depot_tools:${PATH}" ,
16+ "RUNTIME_MODE" : " debug" ,
17+ "DEPOT_TOOLS" : " ${FLUTTER_WORKSPACE}/app/depot_tools" ,
18+ "ENGINE_ROOT" : " ${FLUTTER_WORKSPACE}/flutter" ,
19+ "VPYTHON_VIRTUALENV_ROOT" : " ${ENGINE_ROOT}/.vpython" ,
20+ "ENGINE_SRC_DIR_RELATIVE" : " engine/src" ,
21+ "ENGINE_SRC_DIR" : " ${ENGINE_ROOT}/${ENGINE_SRC_DIR_RELATIVE}" ,
22+ "ENGINE_BUILD_FLAGS" : " --unoptimized --runtime-mode=${RUNTIME_MODE} --no-prebuilt-dart-sdk --embedder-for-target --enable-fontconfig --disable-desktop-embeddings --no-build-embedder-examples --no-lto --no-goma --no-rbe --no-stripped --no-enable-unittests" ,
23+ "ENGINE_BUILD_DIR" : " ${ENGINE_SRC_DIR}/out/host_debug_unopt" ,
24+ "GN_ARGS_FILE" : " ${ENGINE_BUILD_DIR}/args.gn" ,
25+ "GN_ARGS_APPEND" : " " ,
26+ "PATCH_FOLDER" : " ${FLUTTER_WORKSPACE}/patches/flutter-engine"
27+ },
28+ "src" : [],
29+ "runtime" : {
30+ "gclient_config" : {
31+ "path" : " ${ENGINE_ROOT}" ,
32+ "managed" : false ,
33+ "name" : " ." ,
34+ "url" : " https://github.com/flutter/flutter.git" ,
35+ "custom_deps" : {},
36+ "custom_vars" : {
37+ "download_android_deps" : false ,
38+ "download_windows_deps" : false ,
39+ "download_linux_deps" : true ,
40+ "download_emsdk" : false
41+ },
42+ "deps_file" : " DEPS" ,
43+ "safesync_url" : " "
44+ },
45+ "pre-requisites" : {
46+ "aarch64" : {
47+ "ubuntu" : {
48+ "cmds" : [
49+ " sudo apt-get install -yq pkg-config libfreetype-dev git"
50+ ]
51+ }
52+ },
53+ "x86_64" : {
54+ "ubuntu" : {
55+ "cmds" : [
56+ " sudo apt-get install -yq pkg-config libfreetype-dev git"
57+ ]
58+ },
59+ "fedora" : {
60+ "cmds" : [
61+ " sudo dnf install -y pkg-config freetype-devel git"
62+ ]
63+ }
64+ }
65+ },
66+ "post_cmds" : [
67+ {
68+ "cwd" : " ${ENGINE_ROOT}" ,
69+ "cmds" : [
70+ " gclient sync -R --jobs=${HARDWARE_THREADS}"
71+ ]
72+ },
73+ {
74+ "cwd" : " ${ENGINE_SRC_DIR}" ,
75+ "cmds" : [
76+ " git reset --hard" ,
77+ " git apply ${PATCH_FOLDER}/0001-clang-toolchain.patch" ,
78+ " git apply ${PATCH_FOLDER}/0002-fml-build-config-add-riscv.patch" ,
79+ " git apply ${PATCH_FOLDER}/0003-gn-riscv32-and-riscv64.patch" ,
80+ " git apply ${PATCH_FOLDER}/0004-Add-risc-v-32-64-support-to-native-assets.patch" ,
81+ " git apply ${PATCH_FOLDER}/0005-tonic-riscv-support.patch"
82+ ]
83+ },
84+ {
85+ "cwd" : " ${ENGINE_SRC_DIR}/flutter/third_party/abseil-cpp" ,
86+ "cmds" : [
87+ " git reset --hard" ,
88+ " git apply ${PATCH_FOLDER}/flutter/third_party/abseil-cpp/0001-flutter-third_party-abseil-cpp-clang-compiler-warnin.patch"
89+ ]
90+ },
91+ {
92+ "cwd" : " ${ENGINE_SRC_DIR}/flutter/third_party/skia" ,
93+ "cmds" : [
94+ " git reset --hard" ,
95+ " git apply ${PATCH_FOLDER}/flutter/third_party/skia/0001-flutter-third_party-skia-memcpy-void-cast.patch"
96+ ]
97+ },
98+ {
99+ "cwd" : " ${ENGINE_SRC_DIR}/flutter/third_party/swiftshader" ,
100+ "cmds" : [
101+ " git reset --hard" ,
102+ " git apply ${PATCH_FOLDER}/flutter/third_party/swiftshader/0001-flutter-third_party-swiftshader-pointer-cast-to-void.patch" ,
103+ " git apply ${PATCH_FOLDER}/flutter/third_party/swiftshader/0002-flutter-third_party-swiftshader-llvm-16.0-required-f.patch"
104+ ]
105+ },
106+ {
107+ "cwd" : " ${ENGINE_SRC_DIR}" ,
108+ "cmds" : [
109+ " ./flutter/tools/gn ${ENGINE_BUILD_FLAGS}" ,
110+ " echo ${GN_ARGS_APPEND} >> ${GN_ARGS_FILE}" ,
111+ " ${AUTONINJA} -C ${ENGINE_BUILD_DIR}"
112+ ]
113+ },
114+ {
115+ "cwd" : " ${ENGINE_BUILD_DIR}" ,
116+ "cmds" : [
117+ " rm -rf ${PLATFORM_ID_DIR}/bundle | true" ,
118+ " mkdir -p ${PLATFORM_ID_DIR}/bundle/data/" ,
119+ " mkdir -p ${PLATFORM_ID_DIR}/bundle/lib/" ,
120+ " cp ${ENGINE_BUILD_DIR}/icudtl.dat ${PLATFORM_ID_DIR}/bundle/data/" ,
121+ " cp ${ENGINE_BUILD_DIR}/libflutter_engine.so ${PLATFORM_ID_DIR}/bundle/lib/"
122+ ]
123+ }
124+ ],
125+ "do_clean" : [
126+ {
127+ "cwd" : " ${ENGINE_BUILD_DIR}" ,
128+ "cmds" : [
129+ " ninja -t clean"
130+ ]
131+ }
132+ ]
133+ }
113134}
0 commit comments