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

Side by Side Diff: third_party/libvpx/BUILD.gn

Issue 2113333002: Change the x86{,_64} intrinsic targets in //third_party/libvpx to be source_sets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | no next file » | 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("//build/config/sanitizers/sanitizers.gni") 7 import("//build/config/sanitizers/sanitizers.gni")
8 import("//third_party/libvpx/libvpx_srcs.gni") 8 import("//third_party/libvpx/libvpx_srcs.gni")
9 import("//third_party/yasm/yasm_assemble.gni") 9 import("//third_party/yasm/yasm_assemble.gni")
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 include_dirs = [ 107 include_dirs = [
108 platform_include_dir, 108 platform_include_dir,
109 "//third_party/libvpx/source/config", 109 "//third_party/libvpx/source/config",
110 "//third_party/libvpx/source/libvpx", 110 "//third_party/libvpx/source/libvpx",
111 target_gen_dir, 111 target_gen_dir,
112 ] 112 ]
113 } 113 }
114 } 114 }
115 115
116 if (current_cpu == "x86" || current_cpu == "x64") { 116 if (current_cpu == "x86" || current_cpu == "x64") {
117 static_library("libvpx_intrinsics_mmx") { 117 # The following targets are deliberately source_set rather than
118 # static_library. The :libvpx target exposes these intrinsic implementations
119 # via global function pointer symbols, which hides the object dependency at
120 # link time. On Mac, this results in undefined references to the intrinsic
121 # symbols.
122
123 source_set("libvpx_intrinsics_mmx") {
118 configs += [ ":libvpx_config" ] 124 configs += [ ":libvpx_config" ]
119 configs -= [ "//build/config/compiler:chromium_code" ] 125 configs -= [ "//build/config/compiler:chromium_code" ]
120 configs += [ "//build/config/compiler:no_chromium_code" ] 126 configs += [ "//build/config/compiler:no_chromium_code" ]
121 configs += [ ":libvpx_warnings" ] 127 configs += [ ":libvpx_warnings" ]
122 if (!is_win) { 128 if (!is_win) {
123 cflags = [ "-mmmx" ] 129 cflags = [ "-mmmx" ]
124 } 130 }
125 if (current_cpu == "x86") { 131 if (current_cpu == "x86") {
126 sources = libvpx_srcs_x86_mmx 132 sources = libvpx_srcs_x86_mmx
127 } else if (current_cpu == "x64") { 133 } else if (current_cpu == "x64") {
128 sources = libvpx_srcs_x86_64_mmx 134 sources = libvpx_srcs_x86_64_mmx
129 } 135 }
130 } 136 }
131 137
132 static_library("libvpx_intrinsics_sse2") { 138 source_set("libvpx_intrinsics_sse2") {
133 configs += [ ":libvpx_config" ] 139 configs += [ ":libvpx_config" ]
134 configs -= [ "//build/config/compiler:chromium_code" ] 140 configs -= [ "//build/config/compiler:chromium_code" ]
135 configs += [ "//build/config/compiler:no_chromium_code" ] 141 configs += [ "//build/config/compiler:no_chromium_code" ]
136 configs += [ ":libvpx_warnings" ] 142 configs += [ ":libvpx_warnings" ]
137 if (!is_win || is_clang) { 143 if (!is_win || is_clang) {
138 cflags = [ "-msse2" ] 144 cflags = [ "-msse2" ]
139 } 145 }
140 if (current_cpu == "x86") { 146 if (current_cpu == "x86") {
141 sources = libvpx_srcs_x86_sse2 147 sources = libvpx_srcs_x86_sse2
142 } else if (current_cpu == "x64") { 148 } else if (current_cpu == "x64") {
143 sources = libvpx_srcs_x86_64_sse2 149 sources = libvpx_srcs_x86_64_sse2
144 } 150 }
145 } 151 }
146 152
147 static_library("libvpx_intrinsics_ssse3") { 153 source_set("libvpx_intrinsics_ssse3") {
148 configs += [ ":libvpx_config" ] 154 configs += [ ":libvpx_config" ]
149 configs -= [ "//build/config/compiler:chromium_code" ] 155 configs -= [ "//build/config/compiler:chromium_code" ]
150 configs += [ "//build/config/compiler:no_chromium_code" ] 156 configs += [ "//build/config/compiler:no_chromium_code" ]
151 configs += [ ":libvpx_warnings" ] 157 configs += [ ":libvpx_warnings" ]
152 if (!is_win || is_clang) { 158 if (!is_win || is_clang) {
153 cflags = [ "-mssse3" ] 159 cflags = [ "-mssse3" ]
154 } 160 }
155 if (current_cpu == "x86") { 161 if (current_cpu == "x86") {
156 sources = libvpx_srcs_x86_ssse3 162 sources = libvpx_srcs_x86_ssse3
157 } else if (current_cpu == "x64") { 163 } else if (current_cpu == "x64") {
158 sources = libvpx_srcs_x86_64_ssse3 164 sources = libvpx_srcs_x86_64_ssse3
159 } 165 }
160 } 166 }
161 167
162 static_library("libvpx_intrinsics_sse4_1") { 168 source_set("libvpx_intrinsics_sse4_1") {
163 configs += [ ":libvpx_config" ] 169 configs += [ ":libvpx_config" ]
164 configs -= [ "//build/config/compiler:chromium_code" ] 170 configs -= [ "//build/config/compiler:chromium_code" ]
165 configs += [ "//build/config/compiler:no_chromium_code" ] 171 configs += [ "//build/config/compiler:no_chromium_code" ]
166 configs += [ ":libvpx_warnings" ] 172 configs += [ ":libvpx_warnings" ]
167 if (!is_win || is_clang) { 173 if (!is_win || is_clang) {
168 cflags = [ "-msse4.1" ] 174 cflags = [ "-msse4.1" ]
169 } 175 }
170 if (current_cpu == "x86") { 176 if (current_cpu == "x86") {
171 sources = libvpx_srcs_x86_sse4_1 177 sources = libvpx_srcs_x86_sse4_1
172 } else if (current_cpu == "x64") { 178 } else if (current_cpu == "x64") {
173 sources = libvpx_srcs_x86_64_sse4_1 179 sources = libvpx_srcs_x86_64_sse4_1
174 } 180 }
175 } 181 }
176 182
177 static_library("libvpx_intrinsics_avx") { 183 source_set("libvpx_intrinsics_avx") {
178 configs += [ ":libvpx_config" ] 184 configs += [ ":libvpx_config" ]
179 configs -= [ "//build/config/compiler:chromium_code" ] 185 configs -= [ "//build/config/compiler:chromium_code" ]
180 configs += [ "//build/config/compiler:no_chromium_code" ] 186 configs += [ "//build/config/compiler:no_chromium_code" ]
181 configs += [ ":libvpx_warnings" ] 187 configs += [ ":libvpx_warnings" ]
182 if (is_win) { 188 if (is_win) {
183 cflags = [ "/arch:AVX" ] 189 cflags = [ "/arch:AVX" ]
184 } else { 190 } else {
185 cflags = [ "-mavx" ] 191 cflags = [ "-mavx" ]
186 } 192 }
187 if (current_cpu == "x86") { 193 if (current_cpu == "x86") {
188 sources = libvpx_srcs_x86_avx 194 sources = libvpx_srcs_x86_avx
189 } else if (current_cpu == "x64") { 195 } else if (current_cpu == "x64") {
190 sources = libvpx_srcs_x86_64_avx 196 sources = libvpx_srcs_x86_64_avx
191 } 197 }
192 } 198 }
193 199
194 static_library("libvpx_intrinsics_avx2") { 200 source_set("libvpx_intrinsics_avx2") {
195 configs += [ ":libvpx_config" ] 201 configs += [ ":libvpx_config" ]
196 configs -= [ "//build/config/compiler:chromium_code" ] 202 configs -= [ "//build/config/compiler:chromium_code" ]
197 configs += [ "//build/config/compiler:no_chromium_code" ] 203 configs += [ "//build/config/compiler:no_chromium_code" ]
198 configs += [ ":libvpx_warnings" ] 204 configs += [ ":libvpx_warnings" ]
199 if (is_win) { 205 if (is_win) {
200 cflags = [ "/arch:AVX2" ] 206 cflags = [ "/arch:AVX2" ]
201 } else { 207 } else {
202 cflags = [ "-mavx2" ] 208 cflags = [ "-mavx2" ]
203 } 209 }
204 if (current_cpu == "x86") { 210 if (current_cpu == "x86") {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 315 }
310 if (is_android) { 316 if (is_android) {
311 deps += [ "//third_party/android_tools:cpu_features" ] 317 deps += [ "//third_party/android_tools:cpu_features" ]
312 } 318 }
313 if (current_cpu == "arm") { 319 if (current_cpu == "arm") {
314 deps += [ ":libvpx_assembly_arm" ] 320 deps += [ ":libvpx_assembly_arm" ]
315 } 321 }
316 322
317 public_configs = [ ":libvpx_external_config" ] 323 public_configs = [ ":libvpx_external_config" ]
318 } 324 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698