Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: BUILD.gn

Issue 884013006: Enable AVX2 in libvpx (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | generate_gypi.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 # Uncomment when enabling AVX2 130 static_library("libvpx_intrinsics_avx2") {
131 #static_library("libvpx_intrinsics_avx2") { 131 configs += [ ":libvpx_config" ]
132 # configs += [ ":libvpx_config" ] 132 configs -= [ "//build/config/compiler:chromium_code" ]
133 # configs -= [ "//build/config/compiler:chromium_code" ] 133 configs += [ "//build/config/compiler:no_chromium_code" ]
134 # configs += [ "//build/config/compiler:no_chromium_code" ] 134 if (is_win) {
135 # if (is_win) { 135 cflags = [ "/arch:AVX2" ]
136 # cflags = [ "/arch:AVX2" ] 136 } else {
137 # } else { 137 cflags = [ "-mavx2" ]
138 # cflags = [ "-mavx2" ] 138 }
139 # } 139 if (cpu_arch == "x86") {
140 # if (cpu_arch == "x86") { 140 sources = libvpx_srcs_x86_avx2
141 # sources = libvpx_srcs_x86_avx2 141 } else if (cpu_arch == "x64") {
142 # } else if (cpu_arch == "x64") { 142 sources = libvpx_srcs_x86_64_avx2
143 # sources = libvpx_srcs_x86_64_avx2 143 }
144 # } 144 }
145 #}
146 145
147 if (cpu_arch_full == "arm-neon-cpu-detect") { 146 if (cpu_arch_full == "arm-neon-cpu-detect") {
148 static_library("libvpx_intrinsics_neon") { 147 static_library("libvpx_intrinsics_neon") {
149 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] 148 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
150 configs += [ ":libvpx_config" ] 149 configs += [ ":libvpx_config" ]
151 cflags = [ "-mfpu=neon" ] 150 cflags = [ "-mfpu=neon" ]
152 sources = libvpx_srcs_arm_neon_cpu_detect_neon 151 sources = libvpx_srcs_arm_neon_cpu_detect_neon
153 } 152 }
154 } 153 }
155 154
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 configs += [ "//build/config/compiler:no_chromium_code" ] 229 configs += [ "//build/config/compiler:no_chromium_code" ]
231 configs += [ ":libvpx_warnings" ] 230 configs += [ ":libvpx_warnings" ]
232 deps = [] 231 deps = []
233 if (cpu_arch == "x86" || (cpu_arch == "x64" && !is_msan)) { 232 if (cpu_arch == "x86" || (cpu_arch == "x64" && !is_msan)) {
234 deps += [ 233 deps += [
235 ":libvpx_yasm", 234 ":libvpx_yasm",
236 ":libvpx_intrinsics_mmx", 235 ":libvpx_intrinsics_mmx",
237 ":libvpx_intrinsics_sse2", 236 ":libvpx_intrinsics_sse2",
238 ":libvpx_intrinsics_ssse3", 237 ":libvpx_intrinsics_ssse3",
239 ":libvpx_intrinsics_sse4_1", 238 ":libvpx_intrinsics_sse4_1",
240 #":libvpx_intrinsics_avx2", 239 ":libvpx_intrinsics_avx2",
241 ] 240 ]
242 } 241 }
243 if (cpu_arch_full == "arm-neon-cpu-detect") { 242 if (cpu_arch_full == "arm-neon-cpu-detect") {
244 deps += [ ":libvpx_intrinsics_neon" ] 243 deps += [ ":libvpx_intrinsics_neon" ]
245 } 244 }
246 if (is_android) { 245 if (is_android) {
247 deps += [ "//third_party/android_tools:cpu_features" ] 246 deps += [ "//third_party/android_tools:cpu_features" ]
248 } 247 }
249 if (cpu_arch == "arm") { 248 if (cpu_arch == "arm") {
250 deps += [ ":libvpx_assembly_arm" ] 249 deps += [ ":libvpx_assembly_arm" ]
251 } 250 }
252 251
253 public_configs = [ ":libvpx_external_config" ] 252 public_configs = [ ":libvpx_external_config" ]
254 } 253 }
OLDNEW
« no previous file with comments | « no previous file | generate_gypi.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698