@@ -239,10 +239,12 @@ rust_toolchain = rule(
239239 "cargo" : attr .label (
240240 doc = "The location of the `cargo` binary. Can be a direct source or a filegroup containing one item." ,
241241 allow_single_file = True ,
242+ cfg = "exec" ,
242243 ),
243244 "clippy_driver" : attr .label (
244245 doc = "The location of the `clippy-driver` binary. Can be a direct source or a filegroup containing one item." ,
245246 allow_single_file = True ,
247+ cfg = "exec" ,
246248 ),
247249 "debug_info" : attr .string_dict (
248250 doc = "Rustc debug info levels per opt level" ,
@@ -281,13 +283,15 @@ rust_toolchain = rule(
281283 "rust_doc" : attr .label (
282284 doc = "The location of the `rustdoc` binary. Can be a direct source or a filegroup containing one item." ,
283285 allow_single_file = True ,
286+ cfg = "exec" ,
284287 ),
285288 "rust_lib" : attr .label (
286289 doc = "The rust standard library." ,
287290 ),
288291 "rustc" : attr .label (
289292 doc = "The location of the `rustc` binary. Can be a direct source or a filegroup containing one item." ,
290293 allow_single_file = True ,
294+ cfg = "exec" ,
291295 ),
292296 "rustc_lib" : attr .label (
293297 doc = "The libraries used by rustc during compilation." ,
@@ -298,6 +302,7 @@ rust_toolchain = rule(
298302 "rustfmt" : attr .label (
299303 doc = "The location of the `rustfmt` binary. Can be a direct source or a filegroup containing one item." ,
300304 allow_single_file = True ,
305+ cfg = "exec" ,
301306 ),
302307 "staticlib_ext" : attr .string (
303308 doc = "The extension for static libraries created from rustc." ,
0 commit comments