blob: 84d35f31a44a2da5e1f6f3a034f5003c51657f99 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
import("//build/zircon/migrated_targets.gni")
zx_library("syscalls") {
visibility = [ "//zircon/kernel/*" ]
# This can be used for headers only by the vDSO and test code.
kernel = true
static = true
sources = []
# Depend on the files generated from the syscall IDL.
public_deps = [ "//zircon/vdso:private($default_toolchain)" ]
# The line above does not work in the Fuchsia build because its default
# toolchain does not propagate configs (see `gn help toolchain` for details).
public_configs = [ "//zircon/vdso:private.config($default_toolchain)" ]
if (is_kernel) {
deps = [ ":impl" ]
}
}
if (is_kernel) {
source_set("impl") {
visibility = [ ":*" ]
sources = [
"channel.cc",
"clock.cc",
"ddk.cc",
"ddk_${zircon_cpu}.cc",
"ddk_pci.cc",
"debug.cc",
"exceptions.cc",
"fifo.cc",
"futex.cc",
"handle_ops.cc",
"hypervisor.cc",
"object.cc",
"object_wait.cc",
"pager.cc",
"port.cc",
"priv.cc",
"profile.cc",
"resource.cc",
"socket.cc",
"stream.cc",
"system.cc",
"system_${zircon_cpu}.cc",
"task.cc",
"test.cc",
"timer.cc",
"vmar.cc",
"vmo.cc",
"zircon.cc",
]
deps = [
":dispatch",
":headers",
"//zircon/kernel/dev/udisplay",
"//zircon/kernel/lib/boot-options",
"//zircon/kernel/lib/cmdline",
"//zircon/kernel/lib/console",
"//zircon/kernel/lib/counters",
"//zircon/kernel/lib/crashlog",
"//zircon/kernel/lib/crypto",
"//zircon/kernel/lib/fbl",
"//zircon/kernel/lib/gfxconsole",
"//zircon/kernel/lib/kpci",
"//zircon/kernel/lib/ktl",
"//zircon/kernel/lib/ktrace",
"//zircon/kernel/lib/mtrace",
"//zircon/kernel/lib/user_copy",
"//zircon/kernel/lib/userabi:headers",
"//zircon/kernel/object",
"//zircon/system/ulib/explicit-memory",
"//zircon/system/ulib/region-alloc",
"//zircon/system/ulib/zbitl",
]
if (current_cpu == "x64") {
deps += [ "//zircon/kernel/platform/pc" ]
}
}
# Only this file depends on vdso-valid-sysret.h.
source_set("dispatch") {
sources = [ "syscalls.cc" ]
deps = [
":headers",
"//zircon/kernel/lib/userabi:headers",
]
}
}