| # 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 |
| |
| library("libc") { |
| kernel = true |
| sources = [ |
| "atexit.c", |
| "atoi.c", |
| "bsearch.c", |
| "cxa_atexit.cpp", |
| "eabi.c", |
| "errno.c", |
| "printf.c", |
| "qsort.c", |
| "rand.c", |
| "stdio.c", |
| "strtol.c", |
| "strtoll.c", |
| ] |
| deps = [ |
| ":ctype", |
| "$zx/kernel/lib/heap", |
| "$zx/kernel/lib/io", |
| "string", |
| ] |
| public_deps = [ |
| # stdio.h has #include <lib/io.h>. |
| "$zx/kernel/lib/io:headers", |
| |
| # malloc.h has #include <lib/heap.h>. |
| "$zx/kernel/lib/heap:headers", |
| ] |
| |
| if (toolchain.environment == "kernel") { |
| # Avoid circularity. |
| configs -= [ get_label_info(":headers", "label_no_toolchain") ] |
| } |
| } |
| |
| source_set("ctype") { |
| sources = [ |
| "ctype.c", |
| ] |
| } |