diff options
author | Ben <benlawson@google.com> | 2023-10-06 19:34:24 +0000 |
---|---|---|
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-10-06 19:34:24 +0000 |
commit | 006513d01a260eaf304c1cb7b0f2eaedd778a8d9 (patch) | |
tree | 9681b95c182d65af12916e027512de7593fa4c9a /pw_async_basic | |
parent | 0431f5cf0934387d83de9121ff0f3b605d1eac82 (diff) | |
download | pigweed-006513d01a260eaf304c1cb7b0f2eaedd778a8d9.tar.gz |
pw_async_basic: Fix build error when using pw_async:heap_dispatcher
GN/Ninja compiles heap_dispatcher.cc to
pw_async/{target_name}.heap_dispatcher.cc.o, even if the target is not
in pw_async. Thus, using the same target name in pw_async_basic
creates a naming conflict caught by Ninja. This is fixed by using a
different target name in pw_async_basic.
Change-Id: I1167ef20e3fcb0f549728f53b528511fa2618d79
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/173480
Commit-Queue: Ben Lawson <benlawson@google.com>
Reviewed-by: Taylor Cramer <cramertj@google.com>
Diffstat (limited to 'pw_async_basic')
-rw-r--r-- | pw_async_basic/BUILD.gn | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pw_async_basic/BUILD.gn b/pw_async_basic/BUILD.gn index f72be3805..e4fca69fb 100644 --- a/pw_async_basic/BUILD.gn +++ b/pw_async_basic/BUILD.gn @@ -122,8 +122,15 @@ pw_test("dispatcher_test") { sources = [ "dispatcher_test.cc" ] } -pw_async_heap_dispatcher_source_set("heap_dispatcher") { +# This target cannot be labeled "heap_dispatcher" or else the outpath Ninja uses +# for heap_dispatcher.cc will collide with $dir_pw_async:heap_dispatcher. +pw_async_heap_dispatcher_source_set("heap_dispatcher_basic") { task_backend = ":task" + visibility = [ ":*" ] +} + +group("heap_dispatcher") { + public_deps = [ ":heap_dispatcher_basic" ] visibility = [ ":*" ] + pw_async_EXPERIMENTAL_MODULE_VISIBILITY } |