commit | 767ccd235023de9d859321727e75cc4451fb70ba | [log] [tgz] |
---|---|---|
author | Li-Yu Yu <aaronyu@google.com> | Thu Jun 15 06:20:54 2023 |
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Jun 15 13:38:04 2023 |
tree | 9968650f80898498a22879c71e2d6a494227107c | |
parent | 6d3cefafde1cb99f2a012ec10bd17beab3ef3cd8 [diff] |
Use c_metrics_library instead of metrics_library This is to workaround the problem where: webrtc-apm brings its own abseil-cpp (absl), but https://crrev.com/c/4600810/16 also makes metrics_library depend on system absl. Dependency chain: 1. webrtc_apm.cc 2. metrics/metrics_library.h (since https://crrev.com/c/4600810/16) 3. metrics/metrics_writer.h (since https://crrev.com/c/4600810/16) 4. base/task/sequenced_task_runner.h 5. base/functional/callback.h 6. base/functional/function_ref.h 7. third_party/abseil-cpp/absl/functional/function_ref.h 8. absl/functional/function_ref.h 9. external/com_google_absl/absl/functional/internal/function_ref.h (the vendored one) The include path `absl/...` is ambiguous. It may refer to the system `/build/amd64-generic/usr/include/absl/` or the vendored `external/com_google_absl/absl`. In step 9, the libchrome headers should really be seeing `/build/amd64-generic/usr/include/absl/functional/internal/function_ref.h`, but the vendored one won on the path search, so Bazel complains. This CL makes webrtc_apm.cc depend on the C version c_metrics_library, which does not pull in libchrome in the headers, as a workaround. BUG=b:287190935 TEST=FEATURES=test emerge-amd64-generic adhd # with https://crrev.com/c/4600810/16 and https://crrev.com/c/4607841/1 TEST=bazel test //... --config=asan --config=local-clang --//:apm # in src/third_party/adhd TEST=bazel test //:tests # in src/third_party/webrtc-apm Change-Id: I084c20cb181dd75cde191fc68151eb8d23a61c7c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/webrtc-apm/+/4615387 Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Shin Kawamura <kawasin@google.com> Tested-by: Li-Yu Yu <aaronyu@google.com> Commit-Queue: Shin Kawamura <kawasin@google.com>
APM is the audio processing module of WebRTC project in charge of effects like echo cancellation, noise suppression, etc. The purpose of this project is to build a standalone library for Chrome OS system side audio processing.
To update this package to latest upstream WebRC:
./script/sync-apm.sh path/to/webrtc-checkout/src .
emerge-${BOARD} adhd
to see if anything breaks.There are three ways to build/test this package:
The first one is the easiest to iterate with, and the last one is closest to the way ChromiumOS infra actually use to build OS images. The second one is somewhere in-between.
In the directory same as this README file, run:
bazel test //:tests
If you see pkg-config errors you are missing some system dependencies. (Googlers: follow go/cras-dev#prerequisites to install dependencies on gLinux)
Clone https://chromium.googlesource.com/chromiumos/third_party/adhd/ to the directory adjacent to this directory, so that adhd
and webrtc-apm
(this repository) are in the same directory.
NOTE: If you use repo
to set up a ChromiumOS checkout, the directory tree is already set up this way.
In the adhd
directory, run:
bazel test //... @webrtc_apm//:tests
There are some configs you can use, such as --config=local-clang
and --config=asan
. Refer to adhd's bazelrc for details.
If you see pkg-config errors you are missing some system dependencies. (Googlers: follow go/cras-dev#prerequisites to install dependencies on gLinux)
Example:
FEATURES=test USE=asan emerge-${BOARD} adhd