1 From 55fe851951b11c30e010b5f3df618addf606e3d4 Mon Sep 17 00:00:00 2001
2 From: Roger Zanoni <rzanoni@igalia.com>
3 Date: Wed, 8 Nov 2023 14:35:21 -0300
4 Subject: [PATCH 30/33] [M118-fix] Only default arm_use_neon to true if its
5 value wasn't already set
7 arm_use_neon was always being set causing the build to fail.
9 Upstream-Status: Needs checking
10 Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
12 build/config/arm.gni | 58 +++++++++++++++++++++-----------------------
13 1 file changed, 27 insertions(+), 31 deletions(-)
15 diff --git a/build/config/arm.gni b/build/config/arm.gni
16 index 5b404c1ca94f0..575871c287c80 100644
17 --- a/build/config/arm.gni
18 +++ b/build/config/arm.gni
19 @@ -9,36 +9,39 @@ import("//build/config/v8_target_cpu.gni")
20 # ARM code is being compiled. But they can also be relevant in the
21 # other contexts when the code will change its behavior based on the
22 # cpu it wants to generate code for.
23 -if (current_cpu == "arm" || v8_current_cpu == "arm") {
25 - # Version of the ARM processor when compiling on ARM. Ignored on non-ARM
29 + # Version of the ARM processor when compiling on ARM. Ignored on non-ARM
33 - # The ARM architecture. This will be a string like "armv6" or "armv7-a".
34 - # An empty string means to use the default for the arm_version.
36 + # The ARM architecture. This will be a string like "armv6" or "armv7-a".
37 + # An empty string means to use the default for the arm_version.
40 - # The ARM floating point hardware. This will be a string like "neon" or
41 - # "vfpv3". An empty string means to use the default for the arm_version.
43 + # The ARM floating point hardware. This will be a string like "neon" or
44 + # "vfpv3". An empty string means to use the default for the arm_version.
47 - # The ARM variant-specific tuning mode. This will be a string like "armv6"
48 - # or "cortex-a15". An empty string means to use the default for the
51 + # The ARM variant-specific tuning mode. This will be a string like "armv6"
52 + # or "cortex-a15". An empty string means to use the default for the
56 - # Whether to use the neon FPU instruction set or not.
58 + # Whether to use the neon FPU instruction set or not.
61 - # Whether to enable optional NEON code paths.
62 - arm_optionally_use_neon = false
63 + # Whether to enable optional NEON code paths.
64 + arm_optionally_use_neon = false
66 - # Thumb is a reduced instruction set available on some ARM processors that
67 - # has increased code density.
68 - arm_use_thumb = true
70 + # Thumb is a reduced instruction set available on some ARM processors that
71 + # has increased code density.
72 + arm_use_thumb = true
74 + arm_control_flow_integrity = "none"
78 +if (current_cpu == "arm" || v8_current_cpu == "arm") {
79 # For lacros build, we use ARM v8 by default.
80 if (is_chromeos_lacros && arm_arch == "") {
81 # TODO(crbug.com/1467681) Enable i8mm and dotprod instructions for ffmpeg
82 @@ -49,13 +52,6 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") {
84 if (current_os == "android" || target_os == "android") {
85 arm_float_abi = "softfp"
88 - # The ARM floating point mode. This is either the string "hard", "soft",
89 - # or "softfp". An empty string means to use the default one for the
94 assert(arm_float_abi == "" || arm_float_abi == "hard" ||
95 arm_float_abi == "soft" || arm_float_abi == "softfp")
96 @@ -126,7 +122,7 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") {
100 -} else if (current_cpu == "arm64" || v8_current_cpu == "arm64") {
101 +} else if (arm_use_neon == "" && (current_cpu == "arm64" || v8_current_cpu == "arm64")) {
102 # arm64 supports only "hard".
103 arm_float_abi = "hard"