Skip to content

Commit 0a5fb2a

Browse files
patch fix for engine.patch from last comment
Signed-off-by: GeneralKaos666 <xkiller1177@gmail.com>
1 parent 033e05b commit 0a5fb2a

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

patches/engine.patch

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ index 596fd4fef78..84ae714527c 100644
1616
- "//build/config/compiler:runtime_library",
1717
+ "//build/config/termux:runtime_library",
1818
]
19-
19+
2020
if (use_flutter_cxx) {
2121
@@ -406,7 +406,11 @@ if (is_posix) {
2222
]
2323
}
24-
24+
2525
-if (is_linux) {
2626
+import("//build/config/termux/termux.gni")
2727
+
@@ -43,7 +43,7 @@ index 596fd4fef78..84ae714527c 100644
4343
@@ -550,7 +554,10 @@ import("//build/toolchain/custom/custom.gni")
4444
# shlib_toolchain is a Fuchsia-specific symbol and not used by Flutter.
4545
shlib_toolchain = false
46-
46+
4747
-if (custom_toolchain != "") {
4848
+if (is_termux) {
4949
+ host_toolchain = "//build/toolchain/linux:clang_$host_cpu"
@@ -59,7 +59,7 @@ index 596fd4fef78..84ae714527c 100644
5959
+if (is_termux_host) {
6060
+ host_toolchain = "//build/toolchain/termux:$host_cpu"
6161
+}
62-
62+
6363
# Sets default dependencies for executable and shared_library targets.
6464
#
6565
diff --git a/engine/src/build/config/compiler/BUILD.gn b/engine/src/build/config/compiler/BUILD.gn
@@ -73,7 +73,7 @@ index 50f1b60eab1..cd1d7bcca5f 100644
7373
+import("//build/config/termux/termux.gni")
7474
import("//build/toolchain/toolchain.gni")
7575
import("//build/toolchain/wasm.gni")
76-
76+
7777
@@ -228,7 +229,7 @@ config("compiler") {
7878
} else if (current_cpu == "x86") {
7979
cflags += [ "-m32" ]
@@ -93,18 +93,18 @@ index 50f1b60eab1..cd1d7bcca5f 100644
9393
cflags += [ "-m32" ]
9494
} else if (current_cpu == "x64") {
9595
@@ -406,7 +407,7 @@ config("compiler") {
96-
96+
9797
# Clang-specific compiler flags setup.
9898
# ------------------------------------
9999
- if (is_clang) {
100100
+ if (is_clang && !is_termux) {
101101
cflags += [ "-fcolor-diagnostics" ]
102102
}
103-
103+
104104
@@ -514,7 +515,7 @@ config("cxx_version_default") {
105105
# a newer version. Targets that have explicitly opted into the newer version
106106
# must fix the errors they run into.
107-
107+
108108
- if (is_clang) {
109109
+ if (is_clang && !is_termux) {
110110
extra_warning_flags_cc = [
@@ -122,23 +122,23 @@ index 50f1b60eab1..cd1d7bcca5f 100644
122122
@@ -767,21 +768,21 @@ if (is_win) {
123123
"-Wno-psabi",
124124
]
125-
125+
126126
- if (is_clang) {
127127
+ if (is_clang) {
128128
default_warning_flags += [
129129
"-Wno-implicit-int-float-conversion",
130130
"-Wno-deprecated-copy",
131131
]
132132
}
133-
133+
134134
- if (!is_android && is_clang) {
135135
+ if (!is_android && is_clang && !is_termux) {
136136
default_warning_flags += [
137137
# Needed for nlohmann/json.
138138
"-Wno-deprecated-literal-operator",
139139
]
140140
}
141-
141+
142142
- if (!is_wasm && is_clang) {
143143
+ if (!is_wasm && is_clang && !is_termux) {
144144
default_warning_flags += [
@@ -147,7 +147,7 @@ index 50f1b60eab1..cd1d7bcca5f 100644
147147
@@ -867,7 +868,7 @@ config("no_chromium_code") {
148148
cflags += [ "-Wno-deprecated-non-prototype" ]
149149
}
150-
150+
151151
- if (is_clang) {
152152
+ if (is_clang && !is_termux) {
153153
cflags += [
@@ -176,7 +176,7 @@ index 12c8df99f44..5e87f79075c 100644
176176
--- a/engine/src/build/config/sysroot.gni
177177
+++ b/engine/src/build/config/sysroot.gni
178178
@@ -17,6 +17,8 @@ declare_args() {
179-
179+
180180
if (current_toolchain == default_toolchain && target_sysroot != "") {
181181
sysroot = target_sysroot
182182
+} else if (is_termux && custom_sysroot != "") {
@@ -438,7 +438,7 @@ index 28a19c75d1b..7b8e5e66e9f 100644
438438
if (impeller_supports_rendering) {
439439
deps += [
440440
":tester_gpu_configuration",
441-
- "//flutter/third_party/swiftshader/src/Vulkan:swiftshader_libvulkan_static",
441+
--- "//flutter/third_party/swiftshader/src/Vulkan:swiftshader_libvulkan_static",
442442
]
443443
+ if (is_termux) {
444444
+ deps += [ "vk_swiftshader" ]
@@ -447,7 +447,6 @@ index 28a19c75d1b..7b8e5e66e9f 100644
447447
+ }
448448
sources += [ "tester_context_vk_factory.cc" ]
449449
}
450-
451450
diff --git a/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn b/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn
452451
--- a/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn
453452
+++ b/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn
@@ -459,7 +458,6 @@ diff --git a/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn b/engi
459458
+ "-Wno-deprecated-literal-operator",
460459
]
461460
}
462-
463461
diff --git a/engine/src/flutter/third_party/vulkan-deps/spirv-cross/src/gn/BUILD.gn b/engine/src/flutter/third_party/vulkan-deps/spirv-cross/src/gn/BUILD.gn
464462
--- a/engine/src/flutter/third_party/vulkan-deps/spirv-cross/src/gn/BUILD.gn
465463
+++ b/engine/src/flutter/third_party/vulkan-deps/spirv-cross/src/gn/BUILD.gn
@@ -477,7 +475,6 @@ diff --git a/engine/src/flutter/build/secondary/third_party/spirv_cross_flutter/
477475
@@ -13,5 +13,23 @@
478476
source_set("spirv_cross_flutter") {
479477
public_configs = [ ":spirv_cross_public" ]
480-
481478
+ if (!is_win) {
482479
+ cflags = [ "-fno-exceptions" ]
483480
+ }

0 commit comments

Comments
 (0)