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("//testing/test.gni") | 6 import("//testing/test.gni") |
7 | 7 |
8 # If fixed point implementation shall be used (otherwise float). | 8 # If fixed point implementation shall be used (otherwise float). |
9 use_opus_fixed_point = current_cpu == "arm" || current_cpu == "arm64" | 9 use_opus_fixed_point = current_cpu == "arm" || current_cpu == "arm64" |
10 | 10 |
11 # If ARM optimizations shall be used to accelerate performance. | 11 # If ARM optimizations shall be used to accelerate performance. |
12 use_opus_arm_optimization = current_cpu == "arm" | 12 use_opus_arm_optimization = current_cpu == "arm" |
13 | 13 |
14 # If OPUS Run Time CPU Detections (RTCD) shall be used. | 14 # If OPUS Run Time CPU Detections (RTCD) shall be used. |
15 # Based on the conditions in celt/arm/armcpu.c: | 15 # Based on the conditions in celt/arm/armcpu.c: |
16 # defined(_MSC_VER) || defined(__linux__). | 16 # defined(_MSC_VER) || defined(__linux__). |
17 use_opus_rtcd = current_cpu == "arm" && (is_win || is_android || is_linux) | 17 use_opus_rtcd = current_cpu == "arm" && (is_win || is_android || is_linux) |
18 | 18 |
19 config("opus_config") { | 19 config("opus_config") { |
20 include_dirs = [ "src/include" ] | 20 include_dirs = [ "src/include" ] |
21 | |
22 defines = [] | |
23 if (use_opus_fixed_point) { | |
24 defines += [ "OPUS_FIXED_POINT" ] | |
minyue
2015/10/15 08:20:24
The corresponding switch in gyp is configured this
Tima Vaisburd
2015/10/15 18:11:49
Unfortunately I'm not an expert in GN either. Here
minyue
2015/10/15 18:32:15
Thank you for pointing out the doc. That is quite
Tima Vaisburd
2015/10/15 18:51:50
Yes, that seems to work too. Modified the way you
| |
25 } | |
21 } | 26 } |
22 | 27 |
23 config("opus_test_config") { | 28 config("opus_test_config") { |
24 include_dirs = [ | 29 include_dirs = [ |
25 "src/celt", | 30 "src/celt", |
26 "src/silk", | 31 "src/silk", |
27 ] | 32 ] |
28 | 33 |
29 if (is_win) { | 34 if (is_win) { |
30 defines = [ "inline=__inline" ] | 35 defines = [ "inline=__inline" ] |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
254 configs -= [ "//build/config/compiler:chromium_code" ] | 259 configs -= [ "//build/config/compiler:chromium_code" ] |
255 configs += [ | 260 configs += [ |
256 "//build/config/compiler:no_chromium_code", | 261 "//build/config/compiler:no_chromium_code", |
257 ":opus_test_config", | 262 ":opus_test_config", |
258 ] | 263 ] |
259 | 264 |
260 deps = [ | 265 deps = [ |
261 ":opus", | 266 ":opus", |
262 ] | 267 ] |
263 } | 268 } |
OLD | NEW |