[check-system] Make trace-vthread check-system clean
e.g.:
ERROR at //zircon/system/ulib/trace-vthread/event_vthread.cc:7:11: Include not allowed.
#include <lib/trace/event.h>
^----------------
It is not in any dependency of
//zircon/system/ulib/trace-vthread:common
The include file is in the target(s):
//zircon/system/ulib/trace:trace
//zircon/system/ulib/trace:trace-driver
//zircon/system/ulib/trace:trace-with-static-engine
at least one of which should somehow be reachable.
and
ERROR at //zircon/system/ulib/trace-vthread/include/trace-vthread/event_vthread.h:17:11: Include not allowed.
#include <trace-vthread/internal/event_vthread.h>
^-------------------------------------
It is not in any dependency of
//zircon/system/ulib/trace-vthread:common
The include file is in the target(s):
//zircon/system/ulib/trace-vthread:trace-vthread
//zircon/system/ulib/trace-vthread:trace-vthread-with-static-engine
at least one of which should somehow be reachable.
Bug: 55166
Change-Id: I94c5af35ec7f73c2ad0ed526d283809b7f1f726a
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/404979
Commit-Queue: Scott Graham <scottmg@google.com>
Reviewed-by: Fadi Meawad <fmeawad@google.com>
diff --git a/zircon/system/ulib/trace-vthread/BUILD.gn b/zircon/system/ulib/trace-vthread/BUILD.gn
index 5d149b0..3a904e4 100644
--- a/zircon/system/ulib/trace-vthread/BUILD.gn
+++ b/zircon/system/ulib/trace-vthread/BUILD.gn
@@ -20,7 +20,7 @@
# Not relying on the "headers" target generated by the library below
# allows this file to be reused in the Fuchsia GN build.
config("library_headers_config") {
- visibility = [ ":common" ]
+ visibility = [ ":*" ]
include_dirs = [
"include",
@@ -29,14 +29,6 @@
]
}
-# Common pieces.
-source_set("common") {
- visibility = [ ":*" ]
- sources = [ "event_vthread.cc" ]
- public = [ "include/trace-vthread/event_vthread.h" ]
- public_configs = [ ":library_headers_config" ]
-}
-
# The default version for the normal case.
zx_library("trace-vthread") {
sdk = "static"
@@ -44,7 +36,7 @@
"trace-vthread/internal/event_vthread.h",
"trace-vthread/event_vthread.h",
]
- sources = []
+ sources = [ "event_vthread.cc" ]
public_deps = [
# <trace-vthread/internal/event_vthread.h> has #include <lib/trace/event_args.h>.
"//zircon/system/ulib/trace",
@@ -52,10 +44,9 @@
# <trace-vthread/internal/event_vthread.h> has #include <trace-engine/instrumentation.h>.
"//zircon/system/ulib/trace-engine",
]
- deps = [
- ":common",
- "//zircon/system/ulib/trace",
- ]
+ deps = [ "//zircon/system/ulib/trace" ]
+ public = [ "include/trace-vthread/event_vthread.h" ]
+ public_configs = [ ":library_headers_config" ]
}
# A special version for programs and shared libraries that can't use
@@ -68,7 +59,7 @@
"trace-vthread/internal/event_vthread.h",
"trace-vthread/event_vthread.h",
]
- sources = []
+ sources = [ "event_vthread.cc" ]
public_deps = [
# <trace-vthread/internal/event_vthread.h> has #include <lib/trace/event_args.h>.
"//zircon/system/ulib/trace:trace-with-static-engine",
@@ -76,8 +67,7 @@
# <trace-vthread/internal/event_vthread.h> has #include <trace-engine/instrumentation.h>.
"//zircon/system/ulib/trace-engine:trace-engine-static",
]
- deps = [
- ":common",
- "//zircon/system/ulib/trace:trace-with-static-engine",
- ]
+ deps = [ "//zircon/system/ulib/trace:trace-with-static-engine" ]
+ public = [ "include/trace-vthread/event_vthread.h" ]
+ public_configs = [ ":library_headers_config" ]
}