forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
arm.gni
72 lines (59 loc) · 1.79 KB
/
arm.gni
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
if (current_cpu == "arm") {
declare_args() {
# Version of the ARM processor when compiling on ARM. Ignored on non-ARM
# platforms.
arm_version = 7
# The ARM floating point mode. This is either the string "hard", "soft", or
# "softfp". An empty string means to use the default one for the
# arm_version.
arm_float_abi = ""
# The ARM variant-specific tuning mode. This will be a string like "armv6"
# or "cortex-a15". An empty string means to use the default for the
# arm_version.
arm_tune = ""
# Whether to use the neon FPU instruction set or not.
arm_use_neon = true
# Whether to enable optional NEON code paths.
arm_optionally_use_neon = false
if (is_android) {
arm_use_neon = false
arm_optionally_use_neon = true
}
if (is_ios) {
arm_use_neon = false
arm_optionally_use_neon = false
}
}
assert(arm_float_abi == "" || arm_float_abi == "hard" ||
arm_float_abi == "soft" || arm_float_abi == "softfp")
if (arm_version == 6) {
arm_arch = "armv6"
if (arm_tune != "") {
arm_tune = ""
}
if (arm_float_abi == "") {
arm_float_abi = "softfp"
}
arm_fpu = "vfp"
# Thumb is a reduced instruction set available on some ARM processors that
# has increased code density.
arm_use_thumb = false
} else if (arm_version == 7) {
arm_arch = "armv7-a"
if (arm_tune == "") {
arm_tune = "generic-armv7-a"
}
if (arm_float_abi == "") {
arm_float_abi = "softfp"
}
arm_use_thumb = true
if (arm_use_neon) {
arm_fpu = "neon"
} else {
arm_fpu = "vfpv3-d16"
}
}
}