| # Copyright 2025 The Pigweed Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| # use this file except in compliance with the License. You may obtain a copy of |
| # the License at |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| # License for the specific language governing permissions and limitations under |
| # the License. |
| |
| load("//:cc.bzl", "zephyr_cc_library") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| cc_library( |
| name = "stdbool", |
| hdrs = ["include/stdbool.h"], |
| includes = ["include"], |
| ) |
| |
| genrule( |
| name = "strerror_table_h", |
| srcs = [":include/errno.h"], |
| outs = ["libc/minimal/strerror_table.h"], |
| cmd = "$(location //scripts/build:gen_strerror_table) -i $(location :include/errno.h) -o $@", |
| tools = ["//scripts/build:gen_strerror_table"], |
| ) |
| |
| zephyr_cc_library( |
| name = "minimal", |
| srcs = [ |
| "source/math/sqrt.c", |
| "source/math/sqrtf.c", |
| "source/stdlib/atoi.c", |
| "source/stdlib/bsearch.c", |
| "source/stdlib/exit.c", |
| "source/stdlib/qsort.c", |
| "source/stdlib/strtol.c", |
| "source/stdlib/strtoll.c", |
| "source/stdlib/strtoul.c", |
| "source/stdlib/strtoull.c", |
| "source/stdout/fprintf.c", |
| "source/stdout/sprintf.c", |
| "source/stdout/stdout_console.c", |
| "source/string/strerror.c", |
| "source/string/string.c", |
| "source/string/strncasecmp.c", |
| "source/string/strspn.c", |
| "source/string/strstr.c", |
| ], |
| hdrs = glob(["include/**/*.h"]) + [ |
| ":strerror_table_h", |
| ], |
| includes = [ |
| ".", |
| "include", |
| ], |
| deps = [ |
| "//:offsets_header_lib", |
| "//modules/cmsis", |
| "//soc/atmel/sam:samx7x", |
| ], |
| ) |