blob: ef71ce49b6fe155f4aab274062981c53f5d83df7 [file] [log] [blame]
Tim Windelschmidt9eab31c2024-10-23 12:33:36 +02001From 0504caf6aa7cf920285ba68509db5d73ff9d64a7 Mon Sep 17 00:00:00 2001
2From: Tim Windelschmidt <tim@monogon.tech>
3Date: Tue, 1 Oct 2024 16:44:53 +0200
4Subject: [PATCH] Add extra_rustc_flags to module extension
5
6---
7 rust/extensions.bzl | 8 ++++++++
8 1 file changed, 8 insertions(+)
9
10diff --git a/rust/extensions.bzl b/rust/extensions.bzl
11index 683d11db..250d3ad1 100644
12--- a/rust/extensions.bzl
13+++ b/rust/extensions.bzl
14@@ -69,6 +69,8 @@ def _rust_impl(module_ctx):
15 urls = toolchain.urls,
16 versions = toolchain.versions,
17 register_toolchains = False,
18+ extra_rustc_flags = toolchain.extra_rustc_flags,
19+ extra_exec_rustc_flags = toolchain.extra_exec_rustc_flags,
20 )
21
22 _COMMON_TAG_KWARGS = dict(
23@@ -97,6 +99,12 @@ _COMMON_TAG_KWARGS = dict(
24 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).",
25 default = DEFAULT_STATIC_RUST_URL_TEMPLATES,
26 ),
27+ extra_rustc_flags = attr.string_list(
28+ default = [],
29+ ),
30+ extra_exec_rustc_flags = attr.string_list(
31+ default = [],
32+ ),
33 )
34
35 _RUST_TOOLCHAIN_TAG = tag_class(
36--
372.44.1
38