| # 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. |
| |
| import("//build/cpp/sdk_source_set.gni") |
| import("//build/zircon/zx_library.gni") |
| |
| config("trace_vthread_include") { |
| include_dirs = [ "include" ] |
| } |
| |
| sdk_source_set("trace-vthread-headersonly") { |
| sdk_name = "trace-vthread-headersonly" |
| category = "partner" |
| public = [ |
| "include/trace-vthread/event_vthread.h", |
| "include/trace-vthread/internal/event_vthread.h", |
| ] |
| |
| sdk_headers_for_internal_use = |
| [ "include/trace-vthread/internal/event_vthread.h" ] |
| |
| public_deps = [ |
| # <trace-vthread/internal/event_vthread.h> has #include <lib/trace/event_args.h>. |
| "//zircon/system/ulib/trace:trace-headersonly", |
| |
| # <trace-vthread/internal/event_vthread.h> has #include <trace-engine/instrumentation.h>. |
| "//zircon/system/ulib/trace-engine:trace-engine-headersonly", |
| ] |
| public_configs = [ ":trace_vthread_include" ] |
| } |
| |
| # 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", |
| ] |
| sdk_publishable = "partner" |
| sources = [ "event_vthread.cc" ] |
| sdk_headers_for_internal_use = [ "trace-vthread/internal/event_vthread.h" ] |
| public_deps = [ |
| ":trace-vthread-headersonly", |
| "//zircon/system/ulib/trace", |
| "//zircon/system/ulib/trace-engine", |
| ] |
| deps = [ "//zircon/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 = [ "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", |
| |
| # <trace-vthread/internal/event_vthread.h> has #include <trace-engine/instrumentation.h>. |
| ":trace-vthread-headersonly", |
| "//zircon/system/ulib/trace-engine:trace-engine-static", |
| ] |
| deps = [ "//zircon/system/ulib/trace:trace-with-static-engine" ] |
| public = [ "include/trace-vthread/event_vthread.h" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ "test:tests" ] |
| } |