OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 if (current_cpu == "arm" || current_cpu == "arm64") { |
| 6 declare_args() { |
| 7 # Version of the ARM processor when compiling on ARM. Ignored on non-ARM |
| 8 # platforms. |
| 9 if (current_cpu == "arm") { |
| 10 arm_version = 7 |
| 11 } else if(current_cpu == "arm64") { |
| 12 arm_version = 8 |
| 13 } else { |
| 14 assert(false, "Unconfigured arm version") |
| 15 } |
| 16 |
| 17 # The ARM floating point mode. This is either the string "hard", "soft", or |
| 18 # "softfp". An empty string means to use the default one for the |
| 19 # arm_version. |
| 20 arm_float_abi = "" |
| 21 |
| 22 # The ARM variant-specific tuning mode. This will be a string like "armv6" |
| 23 # or "cortex-a15". An empty string means to use the default for the |
| 24 # arm_version. |
| 25 arm_tune = "" |
| 26 |
| 27 # Whether to use the neon FPU instruction set or not. |
| 28 arm_use_neon = true |
| 29 |
| 30 # Whether to enable optional NEON code paths. |
| 31 arm_optionally_use_neon = false |
| 32 |
| 33 if (is_android) { |
| 34 arm_use_neon = false |
| 35 arm_optionally_use_neon = true |
| 36 } |
| 37 |
| 38 if (is_ios) { |
| 39 arm_use_neon = false |
| 40 arm_optionally_use_neon = false |
| 41 } |
| 42 } |
| 43 |
| 44 assert(arm_float_abi == "" || arm_float_abi == "hard" || |
| 45 arm_float_abi == "soft" || arm_float_abi == "softfp") |
| 46 |
| 47 if (arm_version == 6) { |
| 48 arm_arch = "armv6" |
| 49 if (arm_tune != "") { |
| 50 arm_tune = "" |
| 51 } |
| 52 if (arm_float_abi == "") { |
| 53 arm_float_abi = "softfp" |
| 54 } |
| 55 arm_fpu = "vfp" |
| 56 |
| 57 # Thumb is a reduced instruction set available on some ARM processors that |
| 58 # has increased code density. |
| 59 arm_use_thumb = false |
| 60 } else if (arm_version == 7) { |
| 61 arm_arch = "armv7-a" |
| 62 if (arm_tune == "") { |
| 63 arm_tune = "generic-armv7-a" |
| 64 } |
| 65 |
| 66 if (arm_float_abi == "") { |
| 67 arm_float_abi = "softfp" |
| 68 } |
| 69 |
| 70 arm_use_thumb = true |
| 71 |
| 72 if (arm_use_neon) { |
| 73 arm_fpu = "neon" |
| 74 } else { |
| 75 arm_fpu = "vfpv3-d16" |
| 76 } |
| 77 } |
| 78 } |
OLD | NEW |