diff options
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/chromium/0010-chromium-icu-use-system-library-only-targets.patch')
-rw-r--r-- | recipes-qt/qt5/qtwebengine/chromium/0010-chromium-icu-use-system-library-only-targets.patch | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-icu-use-system-library-only-targets.patch b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-icu-use-system-library-only-targets.patch new file mode 100644 index 00000000..355ff4fa --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-icu-use-system-library-only-targets.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From acdb51541e4eb73177b28c79d395d8d6964ed161 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrej Valek <andrej.valek@siemens.com> | ||
3 | Date: Fri, 17 Apr 2020 09:43:32 +0200 | ||
4 | Subject: [PATCH] chromium: icu: use system library only targets | ||
5 | |||
6 | - use bundled one for native/v8 internal builds | ||
7 | |||
8 | Complete system ICU library using requires ICU dev package | ||
9 | be installed on host. Enabling dependency on native package | ||
10 | is not enough due to V8 hosttools toolchain. V8 toolchain | ||
11 | is not using native sysroot, only a host packages. | ||
12 | On the other hand webenegine does not produce external | ||
13 | native artifacts. So external system ICU linking is not | ||
14 | needed. | ||
15 | |||
16 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | ||
17 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
18 | --- | ||
19 | chromium/third_party/icu/BUILD.gn | 18 ++++++++++++++---- | ||
20 | 1 file changed, 14 insertions(+), 4 deletions(-) | ||
21 | |||
22 | diff --git a/chromium/third_party/icu/BUILD.gn b/chromium/third_party/icu/BUILD.gn | ||
23 | index 2430d3e48e5..5d00226667d 100644 | ||
24 | --- a/chromium/third_party/icu/BUILD.gn | ||
25 | +++ b/chromium/third_party/icu/BUILD.gn | ||
26 | @@ -8,9 +8,13 @@ import("//build/config/linux/pkg_config.gni") | ||
27 | import("//build/shim_headers.gni") | ||
28 | import("//third_party/icu/config.gni") | ||
29 | import("//third_party/icu/sources.gni") | ||
30 | +import("//v8/gni/snapshot_toolchain.gni") | ||
31 | |||
32 | declare_args() { | ||
33 | use_system_icu = false | ||
34 | + | ||
35 | + # Use only target icu library, when system using is enabled | ||
36 | + use_system_icu_target_only = false | ||
37 | } | ||
38 | |||
39 | if (is_android) { | ||
40 | @@ -24,6 +28,12 @@ if (is_mac && !icu_is_in_fuchsia) { | ||
41 | assert(!icu_disable_thin_archive || !is_component_build, | ||
42 | "icu_disable_thin_archive only works in static library builds") | ||
43 | |||
44 | +if (use_system_icu) { | ||
45 | + # Use system library only for target, otherwise use bundled | ||
46 | + if ((current_toolchain != host_toolchain) && (current_toolchain != v8_snapshot_toolchain)) { | ||
47 | + use_system_icu_target_only = true | ||
48 | + } | ||
49 | +} | ||
50 | # Meta target that includes both icuuc and icui18n. Most targets want both. | ||
51 | # You can depend on the individually if you need to. | ||
52 | group("icu") { | ||
53 | @@ -413,7 +423,7 @@ config("system_icu_config") { | ||
54 | } | ||
55 | } | ||
56 | |||
57 | -if (use_system_icu) { | ||
58 | +if (use_system_icu_target_only) { | ||
59 | pkg_config("system_icui18n") { | ||
60 | packages = [ "icu-i18n" ] | ||
61 | } | ||
62 | @@ -626,7 +636,7 @@ shim_headers("icuuc_shim") { | ||
63 | } | ||
64 | |||
65 | config("icu_config") { | ||
66 | - if (use_system_icu) { | ||
67 | + if (use_system_icu_target_only) { | ||
68 | configs = [ ":system_icu_config"] | ||
69 | } else { | ||
70 | configs = [ ":bundled_icu_config"] | ||
71 | @@ -634,7 +644,7 @@ config("icu_config") { | ||
72 | } | ||
73 | |||
74 | group("icuuc") { | ||
75 | - if (use_system_icu) { | ||
76 | + if (use_system_icu_target_only) { | ||
77 | deps = [ ":icuuc_shim" ] | ||
78 | public_configs = [ | ||
79 | ":system_icu_config", | ||
80 | @@ -646,7 +656,7 @@ group("icuuc") { | ||
81 | } | ||
82 | |||
83 | group("icui18n") { | ||
84 | - if (use_system_icu) { | ||
85 | + if (use_system_icu_target_only) { | ||
86 | deps = [ ":icui18n_shim" ] | ||
87 | public_configs = [ | ||
88 | ":system_icu_config", | ||