Rename the config and constraint labels from OVERRIDE to REMOVE_DEFS

This commit is contained in:
Brad Nolan 2025-04-05 13:16:52 +13:00
parent f5b3b9f9ca
commit 9ac79e08ad
4 changed files with 19 additions and 19 deletions

View File

@ -295,20 +295,20 @@ label_flag(
build_setting_default = "//bazel:empty_cc_lib",
)
# PICO_BAZEL_CONFIG: PICO_COMPILATION_OPT_OVERRIDE, Override the default opt compilation mode arguments to none, type=bool, default=0, group=build
# PICO_BAZEL_CONFIG: PICO_COMPILATION_OPT_REMOVE_DEFS, Remove the default opt compilation mode arguments, type=bool, default=0, group=build
bool_flag(
name = "PICO_COMPILATION_OPT_OVERRIDE",
name = "PICO_COMPILATION_OPT_REMOVE_DEFS",
build_setting_default = False,
)
# PICO_BAZEL_CONFIG: PICO_COMPILATION_DEBUG_OVERRIDE, Override the default dbg compilation mode arguments to none, type=bool, default=0, group=build
# PICO_BAZEL_CONFIG: PICO_COMPILATION_DEBUG_REMOVE_DEFS, Remove the default dbg compilation mode arguments, type=bool, default=0, group=build
bool_flag(
name = "PICO_COMPILATION_DEBUG_OVERRIDE",
name = "PICO_COMPILATION_DEBUG_REMOVE_DEFS",
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
# PICO_BAZEL_CONFIG: PICO_COMPILATION_FASTBUILD_REMOVE_DEFS, Remove the default fastbuild compilation mode arguments, type=bool, default=0, group=build
bool_flag(
name = "PICO_COMPILATION_FASTBUILD_OVERRIDE",
name = "PICO_COMPILATION_FASTBUILD_REMOVE_DEFS",
build_setting_default = False,
)

View File

@ -254,16 +254,16 @@ label_flag_matches(
)
config_setting(
name = "pico_compiliation_opt_override",
flag_values = {"//bazel/config:PICO_COMPILATION_OPT_OVERRIDE": "True"},
name = "pico_compiliation_opt_remove_defs",
flag_values = {"//bazel/config:PICO_COMPILATION_OPT_REMOVE_DEFS": "True"},
)
config_setting(
name = "pico_compiliation_debug_override",
flag_values = {"//bazel/config:PICO_COMPILATION_DEBUG_OVERRIDE": "True"},
name = "pico_compiliation_debug_remove_defs",
flag_values = {"//bazel/config:PICO_COMPILATION_DEBUG_REMOVE_DEFS": "True"},
)
config_setting(
name = "pico_compiliation_fastbuild_override",
flag_values = {"//bazel/config:PICO_COMPILATION_FASTBUILD_OVERRIDE": "True"},
name = "pico_compiliation_fastbuild_remove_defs",
flag_values = {"//bazel/config:PICO_COMPILATION_FASTBUILD_REMOVE_DEFS": "True"},
)

View File

@ -95,7 +95,7 @@ cc_args(
"@rules_cc//cc/toolchains/actions:link_actions",
],
args = select({
"//bazel/constraint:pico_compiliation_debug_override": [],
"//bazel/constraint:pico_compiliation_debug_remove_defs": [],
"//conditions:default": [
"-Og",
"-g3",
@ -110,7 +110,7 @@ cc_args(
"@rules_cc//cc/toolchains/actions:link_actions",
],
args = select({
"//bazel/constraint:pico_compiliation_opt_override": [],
"//bazel/constraint:pico_compiliation_opt_remove_defs": [],
"//conditions:default": [
"-O2",
"-DNDEBUG",
@ -125,7 +125,7 @@ cc_args(
"@rules_cc//cc/toolchains/actions:link_actions",
],
args = select({
"//bazel/constraint:pico_compiliation_fastbuild_override": [],
"//bazel/constraint:pico_compiliation_fastbuild_remove_defs": [],
# The conditions default are kept as nothing here, The bazel docs default are -gmlt -Wl,-S.
"//conditions:default": [],
})

View File

@ -157,10 +157,10 @@ BAZEL_ONLY_ALLOWLIST = (
"PICO_BT_ENABLE_BLE",
"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",
# Compilation modes remove, These allow the user to remove the defaults, with no args. See --compilation_mode cmd line option
"PICO_COMPILATION_FASTBUILD_REMOVE_DEFS",
"PICO_COMPILATION_DEBUG_REMOVE_DEFS",
"PICO_COMPILATION_OPT_REMOVE_DEFS",
)