Chromium Code Reviews| 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 import("//build/config/arm.gni") | 5 import("//build/config/arm.gni") |
| 6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
| 7 import("//third_party/libvpx/libvpx_srcs.gni") | 7 import("//third_party/libvpx/libvpx_srcs.gni") |
| 8 import("//third_party/yasm/yasm_assemble.gni") | 8 import("//third_party/yasm/yasm_assemble.gni") |
| 9 | 9 |
| 10 if (is_posix && !is_mac) { | 10 if (is_posix && !is_mac) { |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 if (!is_win) { | 120 if (!is_win) { |
| 121 cflags = [ "-msse4.1" ] | 121 cflags = [ "-msse4.1" ] |
| 122 } | 122 } |
| 123 if (cpu_arch == "x86") { | 123 if (cpu_arch == "x86") { |
| 124 sources = libvpx_srcs_x86_sse4_1 | 124 sources = libvpx_srcs_x86_sse4_1 |
| 125 } else if (cpu_arch == "x64") { | 125 } else if (cpu_arch == "x64") { |
| 126 sources = libvpx_srcs_x86_64_sse4_1 | 126 sources = libvpx_srcs_x86_64_sse4_1 |
| 127 } | 127 } |
| 128 } | 128 } |
| 129 | 129 |
| 130 static_library("libvpx_intrinsics_avx2") { | |
| 131 configs += [ ":libvpx_config" ] | |
| 132 configs -= [ "//build/config/compiler:chromium_code" ] | |
| 133 configs += [ "//build/config/compiler:no_chromium_code" ] | |
| 134 if (!is_win) { | |
| 135 cflags = [ "-mavx2" ] | |
|
ckocagil
2015/01/22 18:25:13
This should be:
if (is_win) {
cflags = [ "/
| |
| 136 } | |
| 137 if (cpu_arch == "x86") { | |
| 138 sources = libvpx_srcs_x86_avx2 | |
| 139 } else if (cpu_arch == "x64") { | |
| 140 sources = libvpx_srcs_x86_64_avx2 | |
| 141 } | |
| 142 } | |
| 143 | |
| 130 if (cpu_arch_full == "arm-neon-cpu-detect") { | 144 if (cpu_arch_full == "arm-neon-cpu-detect") { |
| 131 static_library("libvpx_intrinsics_neon") { | 145 static_library("libvpx_intrinsics_neon") { |
| 132 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 146 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] |
| 133 configs += [ ":libvpx_config" ] | 147 configs += [ ":libvpx_config" ] |
| 134 cflags = [ "-mfpu=neon" ] | 148 cflags = [ "-mfpu=neon" ] |
| 135 sources = libvpx_srcs_arm_neon_cpu_detect_neon | 149 sources = libvpx_srcs_arm_neon_cpu_detect_neon |
| 136 } | 150 } |
| 137 } | 151 } |
| 138 | 152 |
| 139 # Converts ARM assembly files to GAS style. | 153 # Converts ARM assembly files to GAS style. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 configs += [ "//build/config/compiler:no_chromium_code" ] | 227 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 214 configs += [ ":libvpx_warnings" ] | 228 configs += [ ":libvpx_warnings" ] |
| 215 deps = [] | 229 deps = [] |
| 216 if (cpu_arch == "x86" || (cpu_arch == "x64" && !is_msan)) { | 230 if (cpu_arch == "x86" || (cpu_arch == "x64" && !is_msan)) { |
| 217 deps += [ | 231 deps += [ |
| 218 ":libvpx_yasm", | 232 ":libvpx_yasm", |
| 219 ":libvpx_intrinsics_mmx", | 233 ":libvpx_intrinsics_mmx", |
| 220 ":libvpx_intrinsics_sse2", | 234 ":libvpx_intrinsics_sse2", |
| 221 ":libvpx_intrinsics_ssse3", | 235 ":libvpx_intrinsics_ssse3", |
| 222 ":libvpx_intrinsics_sse4_1", | 236 ":libvpx_intrinsics_sse4_1", |
| 237 ":libvpx_intrinsics_avx2", | |
| 223 ] | 238 ] |
| 224 } | 239 } |
| 225 if (cpu_arch_full == "arm-neon-cpu-detect") { | 240 if (cpu_arch_full == "arm-neon-cpu-detect") { |
| 226 deps += [ ":libvpx_intrinsics_neon" ] | 241 deps += [ ":libvpx_intrinsics_neon" ] |
| 227 } | 242 } |
| 228 if (is_android) { | 243 if (is_android) { |
| 229 deps += [ "//third_party/android_tools:cpu_features" ] | 244 deps += [ "//third_party/android_tools:cpu_features" ] |
| 230 } | 245 } |
| 231 if (cpu_arch == "arm") { | 246 if (cpu_arch == "arm") { |
| 232 deps += [ ":libvpx_assembly_arm" ] | 247 deps += [ ":libvpx_assembly_arm" ] |
| 233 } | 248 } |
| 234 | 249 |
| 235 public_configs = [ ":libvpx_external_config" ] | 250 public_configs = [ ":libvpx_external_config" ] |
| 236 } | 251 } |
| OLD | NEW |