blob: 0ce9e7e968e8fac4c654241627a9d7dc272fe14b [file] [log] [blame] [edit]
# 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/zircon_cpu.gni")
import("//build/zircon/zx_library.gni")
import("//zircon/kernel/params.gni")
assert(is_kernel, current_toolchain)
zx_library("syscalls") {
visibility = [ "//zircon/kernel/*" ]
# This can be used for headers only by the vDSO and test code.
sources = []
# Depend on the files generated from the syscall IDL.
public_deps = [ "//zircon/vdso:private" ]
if (!kernel_no_userabi) {
deps = [ ":impl" ]
}
}
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",
"iob.cc",
"object.cc",
"object_wait.cc",
"pager.cc",
"port.cc",
"profile.cc",
"resource.cc",
"restricted.cc",
"sampler.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/lib/boot-options",
"//zircon/kernel/lib/console",
"//zircon/kernel/lib/counters",
"//zircon/kernel/lib/crashlog",
"//zircon/kernel/lib/crypto",
"//zircon/kernel/lib/fbl",
"//zircon/kernel/lib/heap",
"//zircon/kernel/lib/io",
"//zircon/kernel/lib/kpci",
"//zircon/kernel/lib/ktl",
"//zircon/kernel/lib/ktrace",
"//zircon/kernel/lib/mtrace",
"//zircon/kernel/lib/persistent-debuglog",
"//zircon/kernel/lib/power-management",
"//zircon/kernel/lib/thread_sampler",
"//zircon/kernel/lib/user_copy",
"//zircon/kernel/lib/userabi:headers",
"//zircon/kernel/object",
"//zircon/system/ulib/explicit-memory",
"//zircon/system/ulib/region-alloc",
]
if (current_cpu == "x64") {
deps += [
"//zircon/kernel/lib/acpi_lite",
"//zircon/kernel/platform/pc",
]
}
}
# Only this file depends on vdso-valid-sysret.h.
source_set("dispatch") {
sources = [ "syscalls.cc" ]
deps = [
":headers",
"//zircon/kernel/lib/boot-options",
"//zircon/kernel/lib/ktl",
"//zircon/kernel/lib/userabi:headers",
]
}