mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-04-16 23:43:15 +00:00
For completness add the fastbuild default options, and override flag
This commit is contained in:
parent
525aa94142
commit
e346e6da5b
@ -306,3 +306,9 @@ bool_flag(
|
||||
name = "PICO_COMPILATION_DEBUG_OVERRIDE",
|
||||
build_setting_default = False,
|
||||
)
|
||||
|
||||
# PICO_BAZEL_CONFIG: PICO_COMPILATION_FASTBUILD_OVERRIDE, Override the default fastbuild compilation mode arguments to none, type=bool, default=0, group=build
|
||||
bool_flag(
|
||||
name = "PICO_COMPILATION_FASTBUILD_OVERRIDE",
|
||||
build_setting_default = False,
|
||||
)
|
@ -261,4 +261,9 @@ config_setting(
|
||||
config_setting(
|
||||
name = "pico_compiliation_debug_override",
|
||||
flag_values = {"//bazel/config:PICO_COMPILATION_DEBUG_OVERRIDE": "True"},
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "pico_compiliation_fastbuild_override",
|
||||
flag_values = {"//bazel/config:PICO_COMPILATION_FASTBUILD_OVERRIDE": "True"},
|
||||
)
|
@ -118,6 +118,22 @@ cc_args(
|
||||
})
|
||||
)
|
||||
|
||||
cc_args(
|
||||
name = "fastbuild_args",
|
||||
actions = [
|
||||
"@rules_cc//cc/toolchains/actions:compile_actions",
|
||||
"@rules_cc//cc/toolchains/actions:link_actions",
|
||||
],
|
||||
args = select({
|
||||
"//bazel/constraint:pico_compiliation_fastbuild_override": [],
|
||||
"//conditions:default": [
|
||||
"-gmlt",
|
||||
"-Wl",
|
||||
"-S",
|
||||
],
|
||||
})
|
||||
)
|
||||
|
||||
configurable_toolchain_feature(
|
||||
name = "gc_sections",
|
||||
copts = [
|
||||
@ -163,6 +179,12 @@ cc_feature(
|
||||
overrides = "@rules_cc//cc/toolchains/features:opt",
|
||||
)
|
||||
|
||||
cc_feature(
|
||||
name = "fastbuild",
|
||||
args = [":fastbuild_args"],
|
||||
overrides = "@rules_cc//cc/toolchains/features:fastbuild",
|
||||
)
|
||||
|
||||
HOSTS = (
|
||||
("linux", "x86_64"),
|
||||
("linux", "aarch64"),
|
||||
@ -201,6 +223,7 @@ _HOST_CPU_CONSTRAINTS = {
|
||||
"@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features",
|
||||
"@pico-sdk//bazel/toolchain:dbg",
|
||||
"@pico-sdk//bazel/toolchain:opt",
|
||||
"@pico-sdk//bazel/toolchain:fastbuild",
|
||||
"@pico-sdk//bazel/toolchain:gc_sections",
|
||||
"@pico-sdk//bazel/toolchain:cxx_no_exceptions",
|
||||
"@pico-sdk//bazel/toolchain:cxx_no_rtti",
|
||||
@ -253,6 +276,7 @@ _HOST_CPU_CONSTRAINTS = {
|
||||
"@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features",
|
||||
"@pico-sdk//bazel/toolchain:dbg",
|
||||
"@pico-sdk//bazel/toolchain:opt",
|
||||
"@pico-sdk//bazel/toolchain:fastbuild",
|
||||
"@pico-sdk//bazel/toolchain:gc_sections",
|
||||
"@pico-sdk//bazel/toolchain:cxx_no_exceptions",
|
||||
"@pico-sdk//bazel/toolchain:cxx_no_rtti",
|
||||
|
@ -158,6 +158,7 @@ BAZEL_ONLY_ALLOWLIST = (
|
||||
"PICO_BT_ENABLE_CLASSIC",
|
||||
"PICO_BT_ENABLE_MESH",
|
||||
# Compilation modes overrides, These allow the user to override the defaults, with no args. See --compilation_mode cmd line option
|
||||
"PICO_COMPILATION_FASTBUILD_OVERRIDE",
|
||||
"PICO_COMPILATION_DEBUG_OVERRIDE",
|
||||
"PICO_COMPILATION_OPT_OVERRIDE",
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user