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") { | 130 # Uncomment when enabling AVX2 |
131 configs += [ ":libvpx_config" ] | 131 #static_library("libvpx_intrinsics_avx2") { |
132 configs -= [ "//build/config/compiler:chromium_code" ] | 132 # configs += [ ":libvpx_config" ] |
133 configs += [ "//build/config/compiler:no_chromium_code" ] | 133 # configs -= [ "//build/config/compiler:chromium_code" ] |
134 if (is_win) { | 134 # configs += [ "//build/config/compiler:no_chromium_code" ] |
135 cflags = [ "/arch:AVX2" ] | 135 # if (is_win) { |
136 } else { | 136 # cflags = [ "/arch:AVX2" ] |
137 cflags = [ "-mavx2" ] | 137 # } else { |
138 } | 138 # cflags = [ "-mavx2" ] |
139 if (cpu_arch == "x86") { | 139 # } |
140 sources = libvpx_srcs_x86_avx2 | 140 # if (cpu_arch == "x86") { |
141 } else if (cpu_arch == "x64") { | 141 # sources = libvpx_srcs_x86_avx2 |
142 sources = libvpx_srcs_x86_64_avx2 | 142 # } else if (cpu_arch == "x64") { |
143 } | 143 # sources = libvpx_srcs_x86_64_avx2 |
144 } | 144 # } |
| 145 #} |
145 | 146 |
146 if (cpu_arch_full == "arm-neon-cpu-detect") { | 147 if (cpu_arch_full == "arm-neon-cpu-detect") { |
147 static_library("libvpx_intrinsics_neon") { | 148 static_library("libvpx_intrinsics_neon") { |
148 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 149 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] |
149 configs += [ ":libvpx_config" ] | 150 configs += [ ":libvpx_config" ] |
150 cflags = [ "-mfpu=neon" ] | 151 cflags = [ "-mfpu=neon" ] |
151 sources = libvpx_srcs_arm_neon_cpu_detect_neon | 152 sources = libvpx_srcs_arm_neon_cpu_detect_neon |
152 } | 153 } |
153 } | 154 } |
154 | 155 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 configs += [ "//build/config/compiler:no_chromium_code" ] | 230 configs += [ "//build/config/compiler:no_chromium_code" ] |
230 configs += [ ":libvpx_warnings" ] | 231 configs += [ ":libvpx_warnings" ] |
231 deps = [] | 232 deps = [] |
232 if (cpu_arch == "x86" || (cpu_arch == "x64" && !is_msan)) { | 233 if (cpu_arch == "x86" || (cpu_arch == "x64" && !is_msan)) { |
233 deps += [ | 234 deps += [ |
234 ":libvpx_yasm", | 235 ":libvpx_yasm", |
235 ":libvpx_intrinsics_mmx", | 236 ":libvpx_intrinsics_mmx", |
236 ":libvpx_intrinsics_sse2", | 237 ":libvpx_intrinsics_sse2", |
237 ":libvpx_intrinsics_ssse3", | 238 ":libvpx_intrinsics_ssse3", |
238 ":libvpx_intrinsics_sse4_1", | 239 ":libvpx_intrinsics_sse4_1", |
239 ":libvpx_intrinsics_avx2", | 240 #":libvpx_intrinsics_avx2", |
240 ] | 241 ] |
241 } | 242 } |
242 if (cpu_arch_full == "arm-neon-cpu-detect") { | 243 if (cpu_arch_full == "arm-neon-cpu-detect") { |
243 deps += [ ":libvpx_intrinsics_neon" ] | 244 deps += [ ":libvpx_intrinsics_neon" ] |
244 } | 245 } |
245 if (is_android) { | 246 if (is_android) { |
246 deps += [ "//third_party/android_tools:cpu_features" ] | 247 deps += [ "//third_party/android_tools:cpu_features" ] |
247 } | 248 } |
248 if (cpu_arch == "arm") { | 249 if (cpu_arch == "arm") { |
249 deps += [ ":libvpx_assembly_arm" ] | 250 deps += [ ":libvpx_assembly_arm" ] |
250 } | 251 } |
251 | 252 |
252 public_configs = [ ":libvpx_external_config" ] | 253 public_configs = [ ":libvpx_external_config" ] |
253 } | 254 } |
OLD | NEW |