| load("@rules_cc//cc:cc_library.bzl", "cc_library") | |
| package(default_visibility = ["//visibility:public"]) | |
| cc_library( | |
| name = "bintool", | |
| srcs = [ | |
| "bintool.cpp", | |
| "mbedtls_wrapper.c", | |
| ], | |
| hdrs = [ | |
| "bintool.h", | |
| "mbedtls_wrapper.h", | |
| "metadata.h", | |
| ], | |
| copts = select({ | |
| "@rules_cc//cc/compiler:msvc-cl": ["/std:c++20"], | |
| "@platforms//os:windows": [], | |
| "//conditions:default": [ | |
| "-Wno-unused-variable", | |
| ], | |
| }), | |
| defines = [ | |
| "HAS_MBEDTLS=1", # Bazel build always has mbedtls. | |
| ], | |
| includes = ["."], | |
| deps = [ | |
| "//elf", | |
| "//errors", | |
| "@mbedtls", | |
| "@pico-sdk//src/common/boot_picobin_headers", | |
| ], | |
| ) |