OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # These are primarily relevant in current_cpu == "arm" contexts, where | 5 # These are primarily relevant in current_cpu == "arm" contexts, where |
6 # ARM code is being compiled. But they can also be relevant in the | 6 # ARM code is being compiled. But they can also be relevant in the |
7 # host toolchain context when target_cpu == "arm", where a host-side | 7 # host toolchain context when target_cpu == "arm", where a host-side |
8 # build tool being built will change its behavior depending on the | 8 # build tool being built will change its behavior depending on the |
9 # details of the target configuration. | 9 # details of the target configuration. |
10 if (target_cpu == "arm" || current_cpu == "arm") { | 10 if (target_cpu == "arm" || current_cpu == "arm") { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 # Thumb is a reduced instruction set available on some ARM processors that | 46 # Thumb is a reduced instruction set available on some ARM processors that |
47 # has increased code density. | 47 # has increased code density. |
48 arm_use_thumb = false | 48 arm_use_thumb = false |
49 } else if (arm_version == 7) { | 49 } else if (arm_version == 7) { |
50 arm_arch = "armv7-a" | 50 arm_arch = "armv7-a" |
51 if (arm_tune == "") { | 51 if (arm_tune == "") { |
52 arm_tune = "generic-armv7-a" | 52 arm_tune = "generic-armv7-a" |
53 } | 53 } |
54 | 54 |
55 if (arm_float_abi == "") { | 55 if (arm_float_abi == "") { |
56 if (is_android) { | 56 if (current_os == "android" || target_os == "android") { |
57 arm_float_abi = "softfp" | 57 arm_float_abi = "softfp" |
58 } else { | 58 } else { |
59 arm_float_abi = "hard" | 59 arm_float_abi = "hard" |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 arm_use_thumb = true | 63 arm_use_thumb = true |
64 | 64 |
65 if (arm_use_neon) { | 65 if (arm_use_neon) { |
66 arm_fpu = "neon" | 66 arm_fpu = "neon" |
67 } else { | 67 } else { |
68 arm_fpu = "vfpv3-d16" | 68 arm_fpu = "vfpv3-d16" |
69 } | 69 } |
70 } else if (arm_version == 8) { | 70 } else if (arm_version == 8) { |
71 arm_arch = "armv8-a" | 71 arm_arch = "armv8-a" |
72 if (arm_tune == "") { | 72 if (arm_tune == "") { |
73 arm_tune = "generic-armv8-a" | 73 arm_tune = "generic-armv8-a" |
74 } | 74 } |
75 | 75 |
76 if (arm_float_abi == "") { | 76 if (arm_float_abi == "") { |
77 if (is_android) { | 77 if (current_os == "android" || target_os == "android") { |
78 arm_float_abi = "softfp" | 78 arm_float_abi = "softfp" |
79 } else { | 79 } else { |
80 arm_float_abi = "hard" | 80 arm_float_abi = "hard" |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 arm_use_thumb = true | 84 arm_use_thumb = true |
85 | 85 |
86 if (arm_use_neon) { | 86 if (arm_use_neon) { |
87 arm_fpu = "neon" | 87 arm_fpu = "neon" |
88 } else { | 88 } else { |
89 arm_fpu = "vfpv3-d16" | 89 arm_fpu = "vfpv3-d16" |
90 } | 90 } |
91 } | 91 } |
92 } else if (current_cpu == "arm64") { | 92 } else if (current_cpu == "arm64" || target_cpu == "arm64") { |
93 # arm64 supports only "hard". | 93 # arm64 supports only "hard". |
94 arm_float_abi = "hard" | 94 arm_float_abi = "hard" |
95 } | 95 } |
OLD | NEW |