
This reverts commit 2b242d8fba59ccf67e4c5bcf5a1ea80917a23e1c. Reason for revert: Breaks downstream project. Original change's description: > Merge cpu_features build targets into //system_wrappers. > > Before this CL, functions declared in cpu_features_wrapper.h where > not defined in the same build target, causing brittle builds that > might fail at link time if the binary was not depending on > //system_wrappers (the target with the definitions), violating [1]. > > This CL moves everything into //system_wrappers and also moves > cpu_features_wrapper.h definitions from C to C++ (in order to be able > to add the definitions to a C++ build target like //system_wrappers). > > [1] - https://webrtc.googlesource.com/src/+/refs/heads/master/style-guide.md#h-cc-pairs > > Bug: None > Change-Id: I5a0009cddb17206b19f2a71eeba722faacc4bcae > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183380 > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#32039} TBR=mbonadei@webrtc.org,kwiberg@webrtc.org Change-Id: I4daa7582e55a0343eef72f08ed023c73e0b6456b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: None Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183443 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32040}
59 lines
1.5 KiB
Plaintext
59 lines
1.5 KiB
Plaintext
# Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license
|
|
# that can be found in the ../../../LICENSE file in the root of the source
|
|
# tree. An additional intellectual property rights grant can be found
|
|
# in the file PATENTS. All contributing project authors may
|
|
# be found in the AUTHORS file in the root of the source tree.
|
|
|
|
import("../../../webrtc.gni")
|
|
|
|
rtc_library("fft_size_128") {
|
|
sources = [
|
|
"fft_size_128/ooura_fft.cc",
|
|
"fft_size_128/ooura_fft.h",
|
|
"fft_size_128/ooura_fft_tables_common.h",
|
|
]
|
|
deps = [
|
|
"../../../rtc_base/system:arch",
|
|
"../../../system_wrappers:cpu_features_api",
|
|
]
|
|
cflags = []
|
|
|
|
if (current_cpu == "x86" || current_cpu == "x64") {
|
|
sources += [
|
|
"fft_size_128/ooura_fft_sse2.cc",
|
|
"fft_size_128/ooura_fft_tables_neon_sse2.h",
|
|
]
|
|
if (is_posix || is_fuchsia) {
|
|
cflags += [ "-msse2" ]
|
|
}
|
|
}
|
|
|
|
if (rtc_build_with_neon) {
|
|
sources += [
|
|
"fft_size_128/ooura_fft_neon.cc",
|
|
"fft_size_128/ooura_fft_tables_neon_sse2.h",
|
|
]
|
|
|
|
deps += [ "../../../common_audio" ]
|
|
|
|
if (current_cpu != "arm64") {
|
|
# Enable compilation for the NEON instruction set.
|
|
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
|
|
cflags += [ "-mfpu=neon" ]
|
|
}
|
|
}
|
|
|
|
if (current_cpu == "mipsel" && mips_float_abi == "hard") {
|
|
sources += [ "fft_size_128/ooura_fft_mips.cc" ]
|
|
}
|
|
}
|
|
|
|
rtc_library("fft_size_256") {
|
|
sources = [
|
|
"fft_size_256/fft4g.cc",
|
|
"fft_size_256/fft4g.h",
|
|
]
|
|
}
|