mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2026-03-14 21:19:43 +01:00
Some checks are pending
Bazel presubmit checks / bazel-build-check (macos-latest) (push) Waiting to run
Bazel presubmit checks / bazel-build-check (ubuntu-latest) (push) Waiting to run
Bazel presubmit checks / other-bazel-checks (push) Waiting to run
Check Configs / check-configs (push) Waiting to run
CMake / build (push) Waiting to run
Build on macOS / build (push) Waiting to run
Build on Windows / build (push) Waiting to run
This is an automated change with the following commands:
$ find . -name "BUILD.bazel" -o -name "*.bzl" \
-exec buildifier -lint=fix {} \;
* Add missing `load()` statements for things provided by @rules_cc. This
is required for Bazel >9.
* Sort attributes on build targets.
* Add missing trailing commas where applicable.
41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
load("@rules_cc//cc/toolchains:args.bzl", "cc_args")
|
|
load("@rules_cc//cc/toolchains:args_list.bzl", "cc_args_list")
|
|
load("@rules_cc//cc/toolchains:feature.bzl", "cc_feature")
|
|
|
|
def configurable_toolchain_feature(name, copts = [], cxxopts = [], linkopts = []):
|
|
all_args = []
|
|
|
|
if copts:
|
|
cc_args(
|
|
name = name + "_cc_args",
|
|
actions = ["@rules_cc//cc/toolchains/actions:compile_actions"],
|
|
args = copts,
|
|
)
|
|
all_args.append(name + "_cc_args")
|
|
|
|
if cxxopts:
|
|
cc_args(
|
|
name = name + "_cxx_args",
|
|
actions = ["@rules_cc//cc/toolchains/actions:cpp_compile_actions"],
|
|
args = cxxopts,
|
|
)
|
|
all_args.append(name + "_cxx_args")
|
|
|
|
if linkopts:
|
|
cc_args(
|
|
name = name + "_link_args",
|
|
actions = ["@rules_cc//cc/toolchains/actions:link_actions"],
|
|
args = linkopts,
|
|
)
|
|
all_args.append(name + "_link_args")
|
|
|
|
cc_args_list(
|
|
name = name + "_args",
|
|
args = all_args,
|
|
)
|
|
|
|
cc_feature(
|
|
name = name,
|
|
feature_name = name,
|
|
args = [":{}_args".format(name)],
|
|
)
|