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

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

Issue 888963002: Revert of Add build targets for Opus tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 | third_party/opus/opus.gyp » ('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/mips.gni") 6 import("//build/config/mips.gni")
7 import("//testing/test.gni")
8 7
9 # If fixed point implementation shall be used (otherwise float). 8 # If fixed point implementation shall be used (otherwise float).
10 # TODO(wtc): change "mipselx" to "mipsel" in this file when the compilation 9 # TODO(wtc): change "mipselx" to "mipsel" in this file when the compilation
11 # errors in the MIPS optimizations are fixed. 10 # errors in the MIPS optimizations are fixed.
12 use_opus_fixed_point = 11 use_opus_fixed_point =
13 cpu_arch == "arm" || cpu_arch == "arm64" || cpu_arch == "mipselx" 12 cpu_arch == "arm" || cpu_arch == "arm64" || cpu_arch == "mipselx"
14 13
15 # If ARM optimizations shall be used to accelerate performance. 14 # If ARM optimizations shall be used to accelerate performance.
16 use_opus_arm_optimization = cpu_arch == "arm" 15 use_opus_arm_optimization = cpu_arch == "arm"
17 16
18 # If MIPS optimizations shall be used to accelerate performance. 17 # If MIPS optimizations shall be used to accelerate performance.
19 use_opus_mips_optimization = cpu_arch == "mipselx" 18 use_opus_mips_optimization = cpu_arch == "mipselx"
20 19
21 # If OPUS Run Time CPU Detections (RTCD) shall be used. 20 # If OPUS Run Time CPU Detections (RTCD) shall be used.
22 # Based on the conditions in celt/arm/armcpu.c: 21 # Based on the conditions in celt/arm/armcpu.c:
23 # defined(_MSC_VER) || defined(__linux__). 22 # defined(_MSC_VER) || defined(__linux__).
24 use_opus_rtcd = cpu_arch == "arm" && (is_win || is_android || is_linux) 23 use_opus_rtcd = cpu_arch == "arm" && (is_win || is_android || is_linux)
25 24
26 config("opus_config") { 25 config("opus_config") {
27 include_dirs = [ "src/include" ] 26 include_dirs = [ "src/include" ]
28 } 27 }
29 28
30 config("opus_test_config") {
31 include_dirs = [
32 "src/celt",
33 "src/silk",
34 ]
35
36 if (is_win) {
37 defines = [ "inline=__inline" ]
38 }
39 if (is_android) {
40 libs = [ "log" ]
41 }
42 if (is_clang) {
43 cflags = [ "-Wno-absolute-value" ]
44 }
45 }
46
47 if (use_opus_rtcd) { 29 if (use_opus_rtcd) {
48 action("convert_rtcd_assembler") { 30 action("convert_rtcd_assembler") {
49 script = "convert_rtcd_assembler.py" 31 script = "convert_rtcd_assembler.py"
50 outputs = [ 32 outputs = [
51 "$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", 33 "$target_gen_dir/celt_pitch_xcorr_arm_gnu.S",
52 ] 34 ]
53 args = [ 35 args = [
54 rebase_path("//third_party/opus/src/celt/arm/arm2gnu.pl", root_build_dir), 36 rebase_path("//third_party/opus/src/celt/arm/arm2gnu.pl", root_build_dir),
55 rebase_path("//third_party/opus/src/celt/arm/celt_pitch_xcorr_arm.s", 37 rebase_path("//third_party/opus/src/celt/arm/celt_pitch_xcorr_arm.s",
56 root_build_dir), 38 root_build_dir),
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 ] 166 ]
185 } 167 }
186 } 168 }
187 169
188 executable("opus_compare") { 170 executable("opus_compare") {
189 sources = [ 171 sources = [
190 "src/src/opus_compare.c", 172 "src/src/opus_compare.c",
191 ] 173 ]
192 174
193 configs -= [ "//build/config/compiler:chromium_code" ] 175 configs -= [ "//build/config/compiler:chromium_code" ]
194 configs += [ 176 configs += [ "//build/config/compiler:no_chromium_code" ]
195 "//build/config/compiler:no_chromium_code", 177
196 ":opus_test_config", 178 include_dirs = [
179 "src/celt",
180 "src/silk",
197 ] 181 ]
198 182
183 if (is_win) {
184 defines = [ "inline=__inline" ]
185 }
186 if (is_android) {
187 libs = [ "log" ]
188 }
189 if (is_clang) {
190 cflags = [ "-Wno-absolute-value" ]
191 }
192
199 deps = [ 193 deps = [
200 ":opus", 194 ":opus",
201 ] 195 ]
202 } 196 }
203 197
204 executable("opus_demo") { 198 executable("opus_demo") {
205 sources = [ 199 sources = [
206 "src/src/opus_demo.c", 200 "src/src/opus_demo.c",
207 ] 201 ]
208 202
209 configs -= [ "//build/config/compiler:chromium_code" ] 203 configs -= [ "//build/config/compiler:chromium_code" ]
210 configs += [ 204 configs += [ "//build/config/compiler:no_chromium_code" ]
211 "//build/config/compiler:no_chromium_code", 205
212 ":opus_test_config", 206 include_dirs = [
207 "src/celt",
208 "src/silk",
213 ] 209 ]
214 210
211 if (is_win) {
212 defines = [ "inline=__inline" ]
213 }
214 if (is_android) {
215 libs = [ "log" ]
216 }
217 if (is_clang) {
218 cflags = [ "-Wno-absolute-value" ]
219 }
220
215 deps = [ 221 deps = [
216 ":opus", 222 ":opus",
217 ] 223 ]
218 } 224 }
219
220 test("test_opus_api") {
221 sources = [
222 "src/tests/test_opus_api.c",
223 ]
224
225 configs -= [ "//build/config/compiler:chromium_code" ]
226 configs += [
227 "//build/config/compiler:no_chromium_code",
228 ":opus_test_config",
229 ]
230
231 deps = [
232 ":opus",
233 ]
234 }
235
236 test("test_opus_encode") {
237 sources = [
238 "src/tests/test_opus_encode.c",
239 ]
240
241 configs -= [ "//build/config/compiler:chromium_code" ]
242 configs += [
243 "//build/config/compiler:no_chromium_code",
244 ":opus_test_config",
245 ]
246
247 deps = [
248 ":opus",
249 ]
250 }
251
252 test("test_opus_decode") {
253 sources = [
254 "src/tests/test_opus_decode.c",
255 ]
256
257 configs -= [ "//build/config/compiler:chromium_code" ]
258 configs += [
259 "//build/config/compiler:no_chromium_code",
260 ":opus_test_config",
261 ]
262
263 deps = [
264 ":opus",
265 ]
266 }
267
268 test("test_opus_padding") {
269 sources = [
270 "src/tests/test_opus_padding.c",
271 ]
272
273 configs -= [ "//build/config/compiler:chromium_code" ]
274 configs += [
275 "//build/config/compiler:no_chromium_code",
276 ":opus_test_config",
277 ]
278
279 deps = [
280 ":opus",
281 ]
282 }
OLDNEW
« no previous file with comments | « no previous file | third_party/opus/opus.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698