| # 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") |
| |
| 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($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", |
| "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/console", |
| "//zircon/kernel/lib/counters", |
| "//zircon/kernel/lib/crashlog", |
| "//zircon/kernel/lib/crypto", |
| "//zircon/kernel/lib/fbl", |
| "//zircon/kernel/lib/gfxconsole", |
| "//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/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/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", |
| ] |
| } |
| } |