| # Copyright 2018 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("$zx/public/gn/host_tool_action.gni") |
| |
| source_set("syscalls") { |
| sources = [ |
| "channel.cpp", |
| "ddk.cpp", |
| "ddk_${zircon_cpu}.cpp", |
| "ddk_pci.cpp", |
| "debug.cpp", |
| "exceptions.cpp", |
| "fifo.cpp", |
| "futex.cpp", |
| "handle_ops.cpp", |
| "hypervisor.cpp", |
| "object.cpp", |
| "object_wait.cpp", |
| "port.cpp", |
| "profile.cpp", |
| "resource.cpp", |
| "socket.cpp", |
| "syscalls.cpp", |
| "system.cpp", |
| "system_${zircon_cpu}.cpp", |
| "task.cpp", |
| "test.cpp", |
| "timer.cpp", |
| "vmar.cpp", |
| "vmo.cpp", |
| "zircon.cpp", |
| ] |
| deps += [ |
| ":syscall-numbers", |
| |
| #":generate-vdso-valid-sysret", |
| |
| "$zx/kernel/dev/udisplay", |
| "$zx/kernel/lib/console", |
| "$zx/kernel/lib/crypto", |
| "$zx/kernel/lib/fbl", |
| "$zx/kernel/lib/pci", |
| "$zx/kernel/lib/user_copy", |
| "$zx/kernel/lib/vdso", |
| "$zx/kernel/object", |
| "$zx/system/ulib/explicit-memory", |
| "$zx/system/ulib/libzbi", |
| "$zx/system/ulib/region-alloc", |
| ] |
| if (current_cpu == "x64") { |
| deps += [ "$zx/kernel/platform/pc" ] |
| } |
| } |
| |
| config_group("syscall-numbers") { |
| visibility = [ |
| ":*", |
| "$zx/kernel/arch/$zircon_cpu", |
| "$zx/system/ulib/zircon", |
| "$zx/system/utest/core/bad-syscall", |
| ] |
| |
| include_dirs = [ target_gen_dir ] |
| |
| deps = [ |
| ":generate-syscall-numbers", |
| ] |
| } |
| |
| host_tool_action("generate-syscall-numbers") { |
| visibility = [ ":syscall-numbers" ] |
| tool = "$zx/system/host/abigen" |
| sources = [ |
| "$zx/system/public/zircon/syscalls.abigen", |
| ] |
| outputs = [ |
| "$target_gen_dir/zircon/zx-syscall-numbers.h", |
| ] |
| args = [ |
| "-numbers", |
| rebase_path(outputs[0], root_build_dir), |
| rebase_path(sources[0], root_build_dir), |
| ] |
| } |