@@ -100,7 +100,7 @@ cc_args(
100100 "-Og" ,
101101 "-g3" ,
102102 ],
103- })
103+ }),
104104)
105105
106106cc_args (
@@ -115,7 +115,7 @@ cc_args(
115115 "-O2" ,
116116 "-DNDEBUG" ,
117117 ],
118- })
118+ }),
119119)
120120
121121cc_args (
@@ -128,7 +128,7 @@ cc_args(
128128 "//bazel/constraint:pico_compilation_no_fastbuild_args_set" : [],
129129 # The conditions default are kept as nothing here, The bazel docs default are -gmlt -Wl,-S.
130130 "//conditions:default" : [],
131- })
131+ }),
132132)
133133
134134configurable_toolchain_feature (
@@ -163,7 +163,6 @@ configurable_toolchain_feature(
163163 linkopts = ["-Wl,-z,max-page-size=4096" ],
164164)
165165
166-
167166cc_feature (
168167 name = "dbg" ,
169168 args = [":debug_args" ],
@@ -203,30 +202,13 @@ _HOST_CPU_CONSTRAINTS = {
203202
204203[cc_toolchain (
205204 name = "arm_gcc_{}-{}_toolchain_cortex-m" .format (host_os , host_cpu ),
206- tool_map = "@arm_gcc_{}-{}//:all_tools" .format (host_os , host_cpu ),
207205 args = select ({
208206 "//bazel/constraint:rp2040" : [":cortex-m0" ],
209207 "//bazel/constraint:rp2350" : [":cortex-m33" ],
210208 "//conditions:default" : [],
211209 }) + [
212210 ":bazel_no_absolute_paths" ,
213211 ],
214- exec_compatible_with = [
215- _HOST_CPU_CONSTRAINTS [host_cpu ],
216- _HOST_OS_CONSTRAINTS [host_os ],
217- ],
218- tags = ["manual" ], # Don't try to build this in wildcard builds.
219- known_features = [
220- "@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features" ,
221- "@pico-sdk//bazel/toolchain:dbg" ,
222- "@pico-sdk//bazel/toolchain:opt" ,
223- "@pico-sdk//bazel/toolchain:fastbuild" ,
224- "@pico-sdk//bazel/toolchain:gc_sections" ,
225- "@pico-sdk//bazel/toolchain:cxx_no_exceptions" ,
226- "@pico-sdk//bazel/toolchain:cxx_no_rtti" ,
227- "@pico-sdk//bazel/toolchain:cxx_no_cxa_atexit" ,
228- "@pico-sdk//bazel/toolchain:override_max_page_size" ,
229- ],
230212 enabled_features = [
231213 "@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features" ,
232214 ] + select ({
@@ -245,11 +227,27 @@ _HOST_CPU_CONSTRAINTS = {
245227 "//bazel/constraint:pico_use_default_max_page_size_enabled" : [],
246228 "//conditions:default" : [":override_max_page_size" ],
247229 }),
230+ exec_compatible_with = [
231+ _HOST_CPU_CONSTRAINTS [host_cpu ],
232+ _HOST_OS_CONSTRAINTS [host_os ],
233+ ],
234+ known_features = [
235+ "@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features" ,
236+ "@pico-sdk//bazel/toolchain:dbg" ,
237+ "@pico-sdk//bazel/toolchain:opt" ,
238+ "@pico-sdk//bazel/toolchain:fastbuild" ,
239+ "@pico-sdk//bazel/toolchain:gc_sections" ,
240+ "@pico-sdk//bazel/toolchain:cxx_no_exceptions" ,
241+ "@pico-sdk//bazel/toolchain:cxx_no_rtti" ,
242+ "@pico-sdk//bazel/toolchain:cxx_no_cxa_atexit" ,
243+ "@pico-sdk//bazel/toolchain:override_max_page_size" ,
244+ ],
245+ tags = ["manual" ], # Don't try to build this in wildcard builds.
246+ tool_map = "@arm_gcc_{}-{}//:all_tools" .format (host_os , host_cpu ),
248247) for host_os , host_cpu in HOSTS ]
249248
250249[cc_toolchain (
251250 name = "clang_{}-{}_toolchain_cortex-m" .format (host_os , host_cpu ),
252- tool_map = "@clang_{}-{}//:all_tools" .format (host_os , host_cpu ),
253251 args = select ({
254252 "//bazel/constraint:rp2040" : [
255253 ":armv6m-none-eabi" ,
@@ -264,22 +262,6 @@ _HOST_CPU_CONSTRAINTS = {
264262 ":bazel_no_absolute_paths" ,
265263 ":llvm-libc_args" ,
266264 ],
267- exec_compatible_with = [
268- _HOST_CPU_CONSTRAINTS [host_cpu ],
269- _HOST_OS_CONSTRAINTS [host_os ],
270- ],
271- tags = ["manual" ], # Don't try to build this in wildcard builds.
272- known_features = [
273- "@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features" ,
274- "@pico-sdk//bazel/toolchain:dbg" ,
275- "@pico-sdk//bazel/toolchain:opt" ,
276- "@pico-sdk//bazel/toolchain:fastbuild" ,
277- "@pico-sdk//bazel/toolchain:gc_sections" ,
278- "@pico-sdk//bazel/toolchain:cxx_no_exceptions" ,
279- "@pico-sdk//bazel/toolchain:cxx_no_rtti" ,
280- "@pico-sdk//bazel/toolchain:cxx_no_cxa_atexit" ,
281- "@pico-sdk//bazel/toolchain:override_max_page_size" ,
282- ],
283265 enabled_features = [
284266 "@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features" ,
285267 ] + select ({
@@ -298,6 +280,23 @@ _HOST_CPU_CONSTRAINTS = {
298280 "//bazel/constraint:pico_use_default_max_page_size_enabled" : [],
299281 "//conditions:default" : [":override_max_page_size" ],
300282 }),
283+ exec_compatible_with = [
284+ _HOST_CPU_CONSTRAINTS [host_cpu ],
285+ _HOST_OS_CONSTRAINTS [host_os ],
286+ ],
287+ known_features = [
288+ "@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features" ,
289+ "@pico-sdk//bazel/toolchain:dbg" ,
290+ "@pico-sdk//bazel/toolchain:opt" ,
291+ "@pico-sdk//bazel/toolchain:fastbuild" ,
292+ "@pico-sdk//bazel/toolchain:gc_sections" ,
293+ "@pico-sdk//bazel/toolchain:cxx_no_exceptions" ,
294+ "@pico-sdk//bazel/toolchain:cxx_no_rtti" ,
295+ "@pico-sdk//bazel/toolchain:cxx_no_cxa_atexit" ,
296+ "@pico-sdk//bazel/toolchain:override_max_page_size" ,
297+ ],
298+ tags = ["manual" ], # Don't try to build this in wildcard builds.
299+ tool_map = "@clang_{}-{}//:all_tools" .format (host_os , host_cpu ),
301300) for host_os , host_cpu in HOSTS ]
302301
303302[toolchain (
0 commit comments