blob: 5c4076bbc773c33ddbb0484696de49a3ca40b6dd [file] [log] [blame]
# Copyright 2020 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/zircon/migrated_targets.gni")
# Used by both the zx_library target directly and unit tests.
source_set("relocation_h") {
visibility = [ ":*" ]
public = [ "relocation.h" ]
public_deps = [
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/hwreg",
]
}
# Public library.
zx_library("static-pie") {
sdk = "source"
sdk_headers = [ "lib/static-pie/static-pie.h" ]
sdk_migrated = true
host = true
kernel = true
static = true
sources = [
"relocation.cc",
"static_pie.cc",
]
deps = [ ":relocation_h" ]
if (is_kernel) {
deps += [
"//zircon/kernel/lib/ktl",
"//zircon/kernel/lib/libc",
]
}
}
import("//build/components.gni")
import("//build/test.gni")
test("static_pie_test") {
sources = [ "relocation_test.cc" ]
deps = [
":relocation_h",
":static-pie",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
}
fuchsia_unittest_package("static-pie-test") {
deps = [ ":static_pie_test" ]
}
group("tests") {
testonly = true
deps = [
":static-pie-test",
":static_pie_test($host_toolchain)",
]
}