| # 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("//build/sdk/sdk_noop_atom.gni") |
| import("//build/toolchain/ifs_shared_library.gni") |
| import("//build/toolchain/toolchain_environment.gni") |
| |
| # The vDSO ABI is provided at link time by a stub. The actual runtime image |
| # comes from the kernel and is not part of the build or SDK for userland at |
| # all. The kernel's internal build of the vDSO verifies that the ABI matches. |
| if (is_fuchsia && toolchain_base_environment != "kernel") { |
| ifs_shared_library("zircon") { |
| abi = "zircon.ifs" |
| public_deps = [ ":headers" ] |
| } |
| } else { |
| # References from other environments only get the headers. This |
| # makes it easy to have "//src/zircon/lib/zircon" deps in common |
| # libraries that need to link against it in userland but that in |
| # other contexts like kernel or userboot are just using the headers. |
| group("zircon") { |
| public_deps = [ ":headers" ] |
| } |
| } |
| |
| group("headers") { |
| public_deps = [ |
| ":zircon-headers", |
| "//zircon/vdso:public($default_toolchain)", |
| ] |
| public_configs = [ "//zircon/vdso:public.config($default_toolchain)" ] |
| if (!is_fuchsia && !is_kernel) { |
| public_deps += [ "//zircon/system/public" ] |
| } |
| } |
| |
| # These headers can be used in host binaries. |
| source_set("zircon-headers") { |
| configs = [] |
| public = [ |
| "include/zircon/exception.h", |
| "include/zircon/status.h", |
| ] |
| public_configs = [ ":zircon-headers.config" ] |
| } |
| |
| config("zircon-headers.config") { |
| include_dirs = [ "include" ] |
| } |
| |
| # The zircon library is not a real SDK atom since it is provided |
| # directly as part of the SDK sysroot. |
| sdk_noop_atom("zircon_sdk") { |
| } |