summaryrefslogtreecommitdiffstats
path: root/third_party/opus
diff options
context:
space:
mode:
authorajm <ajm@chromium.org>2014-11-03 10:20:48 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-03 18:21:44 +0000
commitcf18ab2e346a590462e6e1c3676845d4476c4261 (patch)
treebc459319faa432031dfc651fadeca25cb6b70493 /third_party/opus
parenteb95a5e08fd48facc54857b658df063acf0df8a7 (diff)
downloadchromium_src-cf18ab2e346a590462e6e1c3676845d4476c4261.zip
chromium_src-cf18ab2e346a590462e6e1c3676845d4476c4261.tar.gz
chromium_src-cf18ab2e346a590462e6e1c3676845d4476c4261.tar.bz2
Remove obsoleted target_arch==armv7 from opus.gyp.
- Modify rtcd usage to match the conditions in armcpu.c. - Make gyp and gn consistent. TBR=sergeyu BUG=webrtc:3906 Review URL: https://codereview.chromium.org/636083002 Cr-Commit-Position: refs/heads/master@{#302449}
Diffstat (limited to 'third_party/opus')
-rw-r--r--third_party/opus/BUILD.gn14
-rw-r--r--third_party/opus/opus.gyp10
2 files changed, 16 insertions, 8 deletions
diff --git a/third_party/opus/BUILD.gn b/third_party/opus/BUILD.gn
index 686a6b9..2e95756 100644
--- a/third_party/opus/BUILD.gn
+++ b/third_party/opus/BUILD.gn
@@ -5,14 +5,15 @@
import("//build/config/arm.gni")
# If fixed point implementation shall be used (otherwise float).
-use_opus_fixed_point = ((is_android || is_chromeos ||
- (is_ios && arm_version == 7)) && cpu_arch == "arm")
+use_opus_fixed_point = (cpu_arch == "arm" || cpu_arch == "arm64")
# If ARM optimizations shall be used to accelerate performance.
-use_opus_arm_optimization = use_opus_fixed_point
+use_opus_arm_optimization = (cpu_arch == "arm")
# If OPUS Run Time CPU Detections (RTCD) shall be used.
-use_opus_rtcd = ((is_android || is_chromeos) && cpu_arch == "arm")
+# Based on the conditions in celt/arm/armcpu.c:
+# defined(_MSC_VER) || defined(__linux__).
+use_opus_rtcd = (cpu_arch == "arm" && (is_win || is_android || is_linux))
config("opus_config") {
include_dirs = [
@@ -83,6 +84,11 @@ source_set("opus") {
]
}
+ if (!is_debug && is_posix && (cpu_arch == "arm" || cpu_arch == "arm64")) {
+ configs -= [ "//build/config/compiler:optimize" ]
+ configs += [ "//build/config/compiler:optimize_max" ]
+ }
+
if (use_opus_fixed_point) {
sources += gypi_values.opus_fixed_sources
diff --git a/third_party/opus/opus.gyp b/third_party/opus/opus.gyp
index bc25921..2668fea 100644
--- a/third_party/opus/opus.gyp
+++ b/third_party/opus/opus.gyp
@@ -5,17 +5,19 @@
{
'variables': {
'conditions': [
- ['target_arch=="arm" or target_arch=="armv7" or target_arch=="arm64"', {
+ ['target_arch=="arm" or target_arch=="arm64"', {
'use_opus_fixed_point%': 1,
}, {
'use_opus_fixed_point%': 0,
}],
- ['target_arch=="arm" or target_arch=="armv7"', {
+ ['target_arch=="arm"', {
'use_opus_arm_optimization%': 1,
}, {
'use_opus_arm_optimization%': 0,
}],
- ['target_arch=="arm"', {
+ ['target_arch=="arm" and (OS=="win" or OS=="android" or OS=="linux")', {
+ # Based on the conditions in celt/arm/armcpu.c:
+ # defined(_MSC_VER) || defined(__linux__).
'use_opus_rtcd%': 1,
}, {
'use_opus_rtcd%': 0,
@@ -81,7 +83,7 @@
],
},
}],
- ['os_posix==1 and (target_arch=="arm" or target_arch=="armv7" or target_arch=="arm64")', {
+ ['os_posix==1 and (target_arch=="arm" or target_arch=="arm64")', {
'cflags!': ['-Os'],
'cflags': ['-O3'],
}],