blob: e2418a1b2d6620db4ec0ba305b48edd40fb0e778 [file] [log] [blame]
# 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/unification/zx_library.gni")
# TODO(fxbug.dev/13096): 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 = [ ":*" ]
include_dirs = [
"include",
"../trace/include",
"../trace-engine/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",
]
sources = [ "event_vthread.cc" ]
public_deps = [
# <trace-vthread/internal/event_vthread.h> has #include <lib/trace/event_args.h>.
"//zircon/system/ulib/trace",
# <trace-vthread/internal/event_vthread.h> has #include <trace-engine/instrumentation.h>.
"//zircon/system/ulib/trace-engine",
]
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
# 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>.
"//zircon/system/ulib/trace-engine:trace-engine-static",
]
deps = [ "//zircon/system/ulib/trace:trace-with-static-engine" ]
public = [ "include/trace-vthread/event_vthread.h" ]
public_configs = [ ":library_headers_config" ]
}
group("tests") {
testonly = true
deps = [ "test:tests" ]
}