1load("//bazel/util:sdk_define.bzl", "pico_sdk_define") 2load("//src/common/pico_binary_info:binary_info.bzl", "custom_pico_binary_info") 3 4package(default_visibility = ["//visibility:public"]) 5 6# This is exposed so that custom_pico_binary_info targets can find the required 7# source files. 8filegroup( 9 name = "binary_info_srcs", 10 srcs = ["standard_binary_info.c"], 11) 12 13# PICO_BUILD_DEFINE: PICO_CMAKE_BUILD_TYPE, The type of build (e.g. Debug or Release) to embed in binary info, type=string, default=pico, group=build 14pico_sdk_define( 15 name = "PICO_BAZEL_BUILD_TYPE", 16 # WARNING: The actual define is named after CMake, so that define 17 # is reused for compatibility. 18 define_name = "PICO_CMAKE_BUILD_TYPE", 19 from_flag = "//bazel/config:PICO_BAZEL_BUILD_TYPE", 20) 21 22# With custom_pico_binary_info, it's possible to set binary info globally or 23# on a per-binary basis. 24# 25# Setting globally: 26# * Set --@pico-sdk//bazel/config:PICO_DEFAULT_BINARY_INFO to point to your 27# custom custom_pico_binary_info. 28# 29# Setting per-binary: 30# * Set --@pico-sdk//bazel/config:PICO_DEFAULT_BINARY_INFO=@pico-sdk//bazel:empty_cc_lib 31# * Copy this cc_library, and manually set the values as you wish. 32# * Add custom_pico_binary_info to each cc_binary individually. 33custom_pico_binary_info( 34 name = "default_binary_info", 35 program_description = None, 36 program_name = None, 37 program_url = None, 38 program_version_string = None, 39) 40