| OLD | NEW |
| 1 # Copyright 2014 The LibYuv Project Authors. All rights reserved. | 1 # Copyright 2014 The LibYuv Project Authors. All rights reserved. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
| 4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
| 5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 | 8 |
| 9 import("libyuv.gni") | 9 import("libyuv.gni") |
| 10 import("//testing/test.gni") | 10 import("//testing/test.gni") |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 deps += [ ":libyuv_msa" ] | 115 deps += [ ":libyuv_msa" ] |
| 116 } | 116 } |
| 117 | 117 |
| 118 # Always enable optimization for Release and NaCl builds (to workaround | 118 # Always enable optimization for Release and NaCl builds (to workaround |
| 119 # crbug.com/538243). | 119 # crbug.com/538243). |
| 120 if (!is_debug || is_nacl) { | 120 if (!is_debug || is_nacl) { |
| 121 configs -= [ "//build/config/compiler:default_optimization" ] | 121 configs -= [ "//build/config/compiler:default_optimization" ] |
| 122 # Enable optimize for speed (-O2) over size (-Os). | 122 # Enable optimize for speed (-O2) over size (-Os). |
| 123 configs += [ "//build/config/compiler:optimize_max" ] | 123 configs += [ "//build/config/compiler:optimize_max" ] |
| 124 } | 124 } |
| 125 |
| 126 # To enable AVX2 or other cpu optimization, pass flag here |
| 127 # cflags = [ "-mavx2" ] |
| 128 |
| 125 } | 129 } |
| 126 | 130 |
| 127 if (libyuv_use_neon) { | 131 if (libyuv_use_neon) { |
| 128 static_library("libyuv_neon") { | 132 static_library("libyuv_neon") { |
| 129 sources = [ | 133 sources = [ |
| 130 # ARM Source Files | 134 # ARM Source Files |
| 131 "source/compare_neon.cc", | 135 "source/compare_neon.cc", |
| 132 "source/compare_neon64.cc", | 136 "source/compare_neon64.cc", |
| 133 "source/rotate_neon.cc", | 137 "source/rotate_neon.cc", |
| 134 "source/rotate_neon64.cc", | 138 "source/rotate_neon64.cc", |
| 135 "source/row_neon.cc", | 139 "source/row_neon.cc", |
| 136 "source/row_neon64.cc", | 140 "source/row_neon64.cc", |
| 137 "source/scale_neon.cc", | 141 "source/scale_neon.cc", |
| 138 "source/scale_neon64.cc", | 142 "source/scale_neon64.cc", |
| 139 ] | 143 ] |
| 140 | 144 |
| 141 public_configs = [ ":libyuv_config" ] | 145 public_configs = [ ":libyuv_config" ] |
| 142 | 146 |
| 147 # Always enable optimization for Release and NaCl builds (to workaround |
| 148 # crbug.com/538243). |
| 149 if (!is_debug) { |
| 150 configs -= [ "//build/config/compiler:default_optimization" ] |
| 151 # Enable optimize for speed (-O2) over size (-Os). |
| 152 configs += [ "//build/config/compiler:optimize_max" ] |
| 153 } |
| 154 |
| 143 if (current_cpu != "arm64") { | 155 if (current_cpu != "arm64") { |
| 144 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 156 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] |
| 145 cflags = [ "-mfpu=neon" ] | 157 cflags = [ "-mfpu=neon" ] |
| 146 } | 158 } |
| 147 } | 159 } |
| 148 } | 160 } |
| 149 | 161 |
| 150 if (libyuv_use_msa) { | 162 if (libyuv_use_msa) { |
| 151 static_library("libyuv_msa") { | 163 static_library("libyuv_msa") { |
| 152 sources = [ | 164 sources = [ |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } | 295 } |
| 284 | 296 |
| 285 executable("cpuid") { | 297 executable("cpuid") { |
| 286 sources = [ | 298 sources = [ |
| 287 # sources | 299 # sources |
| 288 "util/cpuid.c" | 300 "util/cpuid.c" |
| 289 ] | 301 ] |
| 290 deps = [ ":libyuv" ] | 302 deps = [ ":libyuv" ] |
| 291 } | 303 } |
| 292 } | 304 } |
| OLD | NEW |