blob: ef0e187d80838d2f6841e613d7720bc254d611bb [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/components.gni")
import("//build/test.gni")
fuchsia_component("crasher_v1") {
component_name = "cpp_crasher"
manifest = "meta/crasher.cmx"
deps = [ ":crasher_exe" ]
}
fuchsia_component("crasher_v2") {
component_name = "cpp_crasher"
manifest = "meta/crasher.cml"
deps = [ ":crasher_exe" ]
}
executable("crasher_exe") {
output_name = "crasher"
configs += [ "//build/config:all_source" ]
sources = [
"cpp_specific.cc",
"crasher.c",
]
cflags = [ "-fstack-protector-all" ]
deps = [
"//sdk/fidl/fuchsia.feedback:fuchsia.feedback_cpp_wire",
"//sdk/lib/fdio",
"//sdk/lib/syslog/cpp:cpp-macros",
"//src/zircon/lib/zircon",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
# TODO(fxbug.dev/94768): This target uses mutable tables which are deprecated,
# rather than builders.
configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ]
}
fuchsia_unittest_component("cpp_crasher_test") {
deps = [ ":crasher_test" ]
}
test("crasher_test") {
sources = [ "crasher_test.cc" ]
deps = [
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
}