You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows extra rustc flags that will only apply to library targets to
be set by the toolchain. Cross language LTO needs '-C linker-plugin-lto'
on libraries, how passing this flag to rust_binary generated bloat.
Adding this attribute resolves this issue.
Change-Id: Iba725fab1b1941e9586ff97cd71ec3bc1dfc1523
---------
Co-authored-by: UebelAndre <[email protected]>
@@ -1246,6 +1246,7 @@ See `@rules_rust//rust:repositories.bzl` for examples of defining the `@rust_cpu
1246
1246
| <aid="rust_toolchain-experimental_use_cc_common_link"></a>experimental_use_cc_common_link | Label to a boolean build setting that controls whether cc_common.link is used to link rust binaries. | <ahref="https://bazel.build/concepts/labels">Label</a> | optional | <code>//rust/settings:experimental_use_cc_common_link</code> |
1247
1247
| <aid="rust_toolchain-extra_exec_rustc_flags"></a>extra_exec_rustc_flags | Extra flags to pass to rustc in exec configuration | List of strings | optional | <code>[]</code> |
1248
1248
| <aid="rust_toolchain-extra_rustc_flags"></a>extra_rustc_flags | Extra flags to pass to rustc in non-exec configuration | List of strings | optional | <code>[]</code> |
1249
+
| <aid="rust_toolchain-extra_rustc_flags_for_crate_types"></a>extra_rustc_flags_for_crate_types | Extra flags to pass to rustc based on crate type | <ahref="https://bazel.build/rules/lib/dict">Dictionary: String -> List of strings</a> | optional | <code>{}</code> |
1249
1250
| <aid="rust_toolchain-global_allocator_library"></a>global_allocator_library | Target that provides allocator functions for when a global allocator is present. | <ahref="https://bazel.build/concepts/labels">Label</a> | optional | <code>@rules_rust//ffi/cc/global_allocator_library</code> |
1250
1251
| <aid="rust_toolchain-llvm_cov"></a>llvm_cov | The location of the <code>llvm-cov</code> binary. Can be a direct source or a filegroup containing one item. If None, rust code is not instrumented for coverage. | <ahref="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
1251
1252
| <aid="rust_toolchain-llvm_profdata"></a>llvm_profdata | The location of the <code>llvm-profdata</code> binary. Can be a direct source or a filegroup containing one item. If <code>llvm_cov</code> is None, this can be None as well and rust code is not instrumented for coverage. | <ahref="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
@@ -107,6 +107,7 @@ See `@rules_rust//rust:repositories.bzl` for examples of defining the `@rust_cpu
107
107
| <aid="rust_toolchain-experimental_use_cc_common_link"></a>experimental_use_cc_common_link | Label to a boolean build setting that controls whether cc_common.link is used to link rust binaries. | <ahref="https://bazel.build/concepts/labels">Label</a> | optional | <code>//rust/settings:experimental_use_cc_common_link</code> |
108
108
| <aid="rust_toolchain-extra_exec_rustc_flags"></a>extra_exec_rustc_flags | Extra flags to pass to rustc in exec configuration | List of strings | optional | <code>[]</code> |
109
109
| <aid="rust_toolchain-extra_rustc_flags"></a>extra_rustc_flags | Extra flags to pass to rustc in non-exec configuration | List of strings | optional | <code>[]</code> |
110
+
| <aid="rust_toolchain-extra_rustc_flags_for_crate_types"></a>extra_rustc_flags_for_crate_types | Extra flags to pass to rustc based on crate type | <ahref="https://bazel.build/rules/lib/dict">Dictionary: String -> List of strings</a> | optional | <code>{}</code> |
110
111
| <aid="rust_toolchain-global_allocator_library"></a>global_allocator_library | Target that provides allocator functions for when a global allocator is present. | <ahref="https://bazel.build/concepts/labels">Label</a> | optional | <code>@rules_rust//ffi/cc/global_allocator_library</code> |
111
112
| <aid="rust_toolchain-llvm_cov"></a>llvm_cov | The location of the <code>llvm-cov</code> binary. Can be a direct source or a filegroup containing one item. If None, rust code is not instrumented for coverage. | <ahref="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
112
113
| <aid="rust_toolchain-llvm_profdata"></a>llvm_profdata | The location of the <code>llvm-profdata</code> binary. Can be a direct source or a filegroup containing one item. If <code>llvm_cov</code> is None, this can be None as well and rust code is not instrumented for coverage. | <ahref="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
0 commit comments