blob: 3928b9d3adc3097dec06ca3014c506e175a3dfd6 [file] [log] [blame] [edit]
# 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("//zircon/vdso/vdso.gni")
# This file defines the sysroot entries corresponding to the Zircon VDSO
# (a.k.a. libzircon.so). More details about how these are used are in
# //zircon/system/ulib/c/sysroot_entries.gni.
import("vdso_toolchain.gni")
sysroot_vdso_stripped = zircon_vdso_stripped
sysroot_vdso_unstripped = zircon_vdso_unstripped
sysroot_vdso_target = zircon_vdso_target
_rebased_vdso_stripped = rebase_path(sysroot_vdso_stripped, root_build_dir)
_rebased_vdso_unstripped = rebase_path(sysroot_vdso_unstripped, root_build_dir)
_vdso_generated_headers_dep = "//zircon/vdso:public($default_toolchain)"
_gen_include_dir =
get_label_info(_vdso_generated_headers_dep, "root_gen_dir") + "/include"
_rebased_include_dir =
rebase_path("//zircon/system/ulib/zircon/include", root_build_dir)
_rebased_gen_include_dir = rebase_path(_gen_include_dir, root_build_dir)
sysroot_vdso_entries = [
{
vdso = _rebased_vdso_unstripped
},
{
include_dirs = []
include_dirs = [
_rebased_include_dir,
_rebased_gen_include_dir,
]
},
{
sdk = {
include_dir = _rebased_gen_include_dir
headers = [
"zircon/syscalls/internal/cdecls.inc",
# Note not included in SDK: "zircon/syscalls/definitions.rs",
]
deps = [ _vdso_generated_headers_dep ]
}
},
{
sdk = {
include_dir = _rebased_gen_include_dir
no_export = true # Never export these to the SDK.
headers = []
if (!exclude_testonly_syscalls) {
headers += [ "zircon/syscalls/internal/testonly-cdecls.inc" ]
}
}
},
{
sdk = {
include_dir = _rebased_include_dir
headers = [ "zircon/status.h" ]
}
},
{
sdk = {
include_dir = _rebased_include_dir
headers = [ "zircon/exception.h" ]
}
},
{
sdk = {
source = _rebased_vdso_unstripped
link = "lib/libzircon.so"
deps = [ sysroot_vdso_target ]
}
},
{
sdk = {
source = _rebased_vdso_unstripped
debug = "debug/libzircon.so"
}
},
]