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

Side by Side Diff: BUILD.gn

Issue 880513003: Disable AVX2 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: forgot to comment one more spot - not sure if GN allows empty rules and this is even necessary but … Created 5 years, 11 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 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
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 }
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