| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # TODO(MA-488): Add ddk support. |
| |
| # This special config allows "common" to locate the library's headers. |
| # 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" ] |
| |
| include_dirs = [ |
| "include", |
| "../trace/include", |
| "../trace-engine/include", |
| ] |
| } |
| |
| # Common pieces. |
| source_set("common") { |
| visibility = [ ":*" ] |
| sources = [ "event_vthread.cc" ] |
| deps = [ "$zx/system/ulib/zircon" ] |
| public_configs = [ ":library_headers_config" ] |
| } |
| |
| # The default version for the normal case. |
| zx_library("trace-vthread") { |
| sdk = "static" |
| sdk_headers = [ |
| "trace-vthread/internal/event_vthread.h", |
| "trace-vthread/event_vthread.h", |
| ] |
| sources = [] |
| public_deps = [ |
| # <trace-vthread/internal/event_vthread.h> has #include <trace/event_args.h>. |
| "$zx/system/ulib/trace:headers", |
| |
| # <trace-vthread/internal/event_vthread.h> has #include <trace-engine/instrumentation.h>. |
| "$zx/system/ulib/trace-engine:headers", |
| ] |
| deps = [ |
| ":common", |
| "$zx/system/ulib/trace", |
| ] |
| } |
| |
| # A special version for programs and shared libraries that can't use |
| # libtrace-engine.so. |
| # N.B. Please verify that you really need this before using it. |
| # Generally you DON'T want to use this. |
| zx_library("trace-vthread-with-static-engine") { |
| sdk = "static" |
| sdk_headers = [ |
| "trace-vthread/internal/event_vthread.h", |
| "trace-vthread/event_vthread.h", |
| ] |
| sources = [] |
| public_deps = [ |
| # <trace-vthread/internal/event_vthread.h> has #include <trace/event_args.h>. |
| "$zx/system/ulib/trace:trace-with-static-engine.headers", |
| |
| # <trace-vthread/internal/event_vthread.h> has #include <trace-engine/instrumentation.h>. |
| "$zx/system/ulib/trace-engine:trace-engine-static.headers", |
| ] |
| deps = [ |
| ":common", |
| "$zx/system/ulib/trace:trace-with-static-engine", |
| ] |
| } |