| From 0504caf6aa7cf920285ba68509db5d73ff9d64a7 Mon Sep 17 00:00:00 2001 |
| From: Tim Windelschmidt <tim@monogon.tech> |
| Date: Tue, 1 Oct 2024 16:44:53 +0200 |
| Subject: [PATCH] Add extra_rustc_flags to module extension |
| |
| --- |
| rust/extensions.bzl | 8 ++++++++ |
| 1 file changed, 8 insertions(+) |
| |
| diff --git a/rust/extensions.bzl b/rust/extensions.bzl |
| index 683d11db..250d3ad1 100644 |
| --- a/rust/extensions.bzl |
| +++ b/rust/extensions.bzl |
| @@ -69,6 +69,8 @@ def _rust_impl(module_ctx): |
| urls = toolchain.urls, |
| versions = toolchain.versions, |
| register_toolchains = False, |
| + extra_rustc_flags = toolchain.extra_rustc_flags, |
| + extra_exec_rustc_flags = toolchain.extra_exec_rustc_flags, |
| ) |
| |
| _COMMON_TAG_KWARGS = dict( |
| @@ -97,6 +99,12 @@ _COMMON_TAG_KWARGS = dict( |
| doc = "A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format).", |
| default = DEFAULT_STATIC_RUST_URL_TEMPLATES, |
| ), |
| + extra_rustc_flags = attr.string_list( |
| + default = [], |
| + ), |
| + extra_exec_rustc_flags = attr.string_list( |
| + default = [], |
| + ), |
| ) |
| |
| _RUST_TOOLCHAIN_TAG = tag_class( |
| -- |
| 2.44.1 |
| |