blob: f66a0f6ad19bda1774f51c0676a8a377e91b1a63 [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/cpp/library_headers.gni")
if (!is_kernel) {
import("//build/components.gni")
import("//build/config/linker.gni")
import("//build/test.gni")
group("tests") {
testonly = true
deps = [
":zircon-internal-tests",
":zircon-internal-unittests($host_toolchain)",
]
}
test("zircon-internal-unittests") {
sources = [ "unique-backtrace-tests.cc" ]
# Ensure aggressive ICF is enabled regardless of optimization defaults.
_icf = [ "//build/config:icf" ]
if (configs + _icf - _icf == configs) {
configs += [ "//build/config:icf" ]
}
# The code-generation switches required for linker GC are also required for
# ICF, so make sure those are also enabled.
_linker_gc = [ "//build/config:linker_gc" ]
if (configs + _linker_gc - _linker_gc == configs) {
configs += [ "//build/config:linker_gc" ]
}
# Instrumentation can prevent ICF that would otherwise happen in normal
# compilation, so the test code needs to know whether to test that ICF
# actually happened when expected or not. (It tests that as a baseline to
# verify that its test of preventing ICF is actually meaningful.)
icf_works =
(linker == "lld" || linker == "gold") && !toolchain_variant.instrumented
defines = [ "ICF_WORKS=$icf_works" ]
deps = [
":zircon-internal",
"//zircon/system/ulib/zxtest",
]
if (is_fuchsia) {
deps += [
"//src/lib/elfldltl",
"//zircon/system/ulib/zx",
]
}
}
fuchsia_unittest_package("zircon-internal-tests") {
deps = [ ":zircon-internal-unittests" ]
}
}
## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ##
#
# ________ _________ ________ ________
# |\ ____\|\___ ___\\ __ \|\ __ \
# \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \
# \ \_____ \ \ \ \ \ \ \\\ \ \ ____\
# \|____|\ \ \ \ \ \ \ \\\ \ \ \___|
# ____\_\ \ \ \__\ \ \_______\ \__\
# |\_________\ \|__| \|_______|\|__|
# \|_________|
#
#
# AUTO-GENERATED - DO NOT EDIT
#
# The targets below are auto-generated based on the targets defined in the
# BUILD.bazel file from the same directory. If you made changes to targets in
# Bazel, instead of editing this file manually, run:
#
# > fx bazel2gn
#
# Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and
# rerun bazel2gn.
import("//build/tools/bazel2gn/bazel_migration.gni")
# A self-verification target for generated content in this file.
if (is_host) {
verify_bazel2gn("verify_bazel2gn") {
}
}
library_headers("headers") {
public = [
"include/lib/zircon-internal/align.h",
"include/lib/zircon-internal/default_stack_size.h",
"include/lib/zircon-internal/device/cpu-trace/goldmont-pm-events.inc",
"include/lib/zircon-internal/device/cpu-trace/intel-pm-events.inc",
"include/lib/zircon-internal/device/cpu-trace/intel-pm.h",
"include/lib/zircon-internal/device/cpu-trace/perf-mon.h",
"include/lib/zircon-internal/device/cpu-trace/skylake-misc-events.inc",
"include/lib/zircon-internal/device/cpu-trace/skylake-pm-events.inc",
"include/lib/zircon-internal/e820.h",
"include/lib/zircon-internal/fnv1hash.h",
"include/lib/zircon-internal/ktrace.h",
"include/lib/zircon-internal/macros.h",
"include/lib/zircon-internal/mtrace.h",
"include/lib/zircon-internal/paths.h",
"include/lib/zircon-internal/thread_annotations.h",
"include/lib/zircon-internal/unique-backtrace.h",
"include/lib/zircon-internal/xorshiftrand.h",
]
visibility = [ "*" ]
}
source_set("zircon-internal") {
visibility = [ "*" ]
public_deps = [ ":headers" ]
}