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

Unified Diff: webrtc/modules/audio_coding/BUILD.gn

Issue 1181373004: Add a [rtc_]build_with_neon variable to unify conditions. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove gn config and consolidate build_with_neon condition. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/BUILD.gn
diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn
index 7b7acd34d8b93e6c3b3dd50e6f3dc366e26b99ab..70129e628113c6b160e463a06b63aa0e04f45431 100644
--- a/webrtc/modules/audio_coding/BUILD.gn
+++ b/webrtc/modules/audio_coding/BUILD.gn
@@ -498,6 +498,7 @@ source_set("isac_fix") {
"codecs/isac/fix/source/initialize.c",
"codecs/isac/fix/source/isacfix.c",
"codecs/isac/fix/source/lattice.c",
+ "codecs/isac/fix/source/lattice_c.c",
"codecs/isac/fix/source/lpc_masking_model.c",
"codecs/isac/fix/source/lpc_masking_model.h",
"codecs/isac/fix/source/lpc_tables.c",
@@ -536,27 +537,19 @@ source_set("isac_fix") {
"../../system_wrappers",
]
- if (current_cpu == "arm64") {
+ if (rtc_build_with_neon) {
deps += [ ":isac_neon" ]
}
- if (rtc_build_armv7_neon) {
- deps += [ ":isac_neon" ]
-
- # Enable compilation for the ARM v7 Neon instruction set. This is needed
- # since //build/config/arm.gni only enables Neon for iOS, not Android.
- # This provides the same functionality as webrtc/build/arm_neon.gypi.
- # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
- # //build/config/arm.gni instead, to reduce code duplication.
- # Remove the -mfpu=vfpv3-d16 cflag.
- configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
- cflags = [ "-mfpu=neon" ]
-
+ if (current_cpu == "arm" && arm_version >= 7) {
sources += [
"codecs/isac/fix/source/lattice_armv7.S",
"codecs/isac/fix/source/pitch_filter_armv6.S",
]
- sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ]
+ sources -= [
kjellander_webrtc 2015/06/18 09:06:23 I don't like the minus-entries for source listings
+ "codecs/isac/fix/source/lattice_c.c",
+ "codecs/isac/fix/source/pitch_filter_c.c",
+ ]
}
if (current_cpu == "mipsel") {
@@ -567,7 +560,10 @@ source_set("isac_fix") {
"codecs/isac/fix/source/pitch_estimator_mips.c",
"codecs/isac/fix/source/transform_mips.c",
]
- sources -= [ "codecs/isac/fix/source/pitch_estimator_c.c" ]
+ sources -= [
+ "codecs/isac/fix/source/lattice_c.c",
+ "codecs/isac/fix/source/pitch_estimator_c.c",
+ ]
if (mips_dsp_rev > 0) {
sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
}
@@ -579,13 +575,9 @@ source_set("isac_fix") {
sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ]
}
}
-
- if (!rtc_build_armv7_neon && current_cpu != "mipsel") {
- sources += [ "codecs/isac/fix/source/lattice_c.c" ]
- }
}
-if (rtc_build_armv7_neon || current_cpu == "arm64") {
+if (rtc_build_with_neon) {
source_set("isac_neon") {
sources = [
"codecs/isac/fix/source/entropy_coding_neon.c",
@@ -593,26 +585,22 @@ if (rtc_build_armv7_neon || current_cpu == "arm64") {
"codecs/isac/fix/source/lattice_neon.c",
"codecs/isac/fix/source/transform_neon.c",
]
-
- if (rtc_build_armv7_neon) {
- # Enable compilation for the ARM v7 Neon instruction set. This is needed
- # since //build/config/arm.gni only enables Neon for iOS, not Android.
- # This provides the same functionality as webrtc/build/arm_neon.gypi.
- # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
- # //build/config/arm.gni instead, to reduce code duplication.
- # Remove the -mfpu=vfpv3-d16 cflag.
- configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
- cflags = [ "-mfpu=neon" ]
- }
-
if (current_cpu != "arm64" || !is_clang) {
kjellander_webrtc 2015/06/18 09:06:23 This was fixed in Clang r235243 and we're currentl
zhongwei 2015/06/19 08:21:03 I've posted the patch at: https://codereview.webrt
# Disable AllpassFilter2FixDec16Neon function due to a clang bug.
- # Refer more details at:
+ # For more details refer to:
# https://code.google.com/p/webrtc/issues/detail?id=4567
sources += [ "codecs/isac/fix/source/filterbanks_neon.c" ]
}
- # Disable LTO in audio_processing_neon target due to compiler bug.
+ if (current_cpu != "arm64") {
+ # Enable compilation for the NEON instruction set. This is needed
+ # since //build/config/arm.gni only enables NEON for iOS, not Android.
+ # This provides the same functionality as webrtc/build/arm_neon.gypi.
+ configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
+ cflags = [ "-mfpu=neon" ]
+ }
+
+ # Disable LTO due to compiler bug.
kjellander_webrtc 2015/06/18 09:06:23 Please link to the bug etc, similar to my previous
Andrew MacDonald 2015/06/25 01:09:09 Done.
if (rtc_use_lto) {
cflags -= [
"-flto",

Powered by Google App Engine
This is Rietveld 408576698