Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2879,6 +2879,7 @@ extra_exec_rustc_flags = rule(
"These flags only apply to the exec configuration (proc-macros, cargo_build_script, etc)."
),
implementation = _extra_exec_rustc_flags_impl,
attrs = {"scope": attr.string(default = "universal")},
build_setting = config.string_list(flag = True),
)

Expand All @@ -2904,6 +2905,7 @@ extra_exec_rustc_flag = rule(
"Multiple uses are accumulated and appended after the extra_exec_rustc_flags."
),
implementation = _extra_exec_rustc_flag_impl,
attrs = {"scope": attr.string(default = "universal")},
build_setting = config.string_list(flag = True, repeatable = True),
)

Expand Down
4 changes: 4 additions & 0 deletions rust/settings/settings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def pipelined_compilation():
"""
bool_flag(
name = "pipelined_compilation",
scope = "universal",
build_setting_default = False,
)

Expand Down Expand Up @@ -487,6 +488,7 @@ def extra_exec_rustc_flags():
"""
_extra_exec_rustc_flags(
name = "extra_exec_rustc_flags",
scope = "universal",
build_setting_default = [],
)

Expand All @@ -498,6 +500,7 @@ def extra_exec_rustc_flag():
"""
_extra_exec_rustc_flag(
name = "extra_exec_rustc_flag",
scope = "universal",
build_setting_default = [],
)

Expand Down Expand Up @@ -554,5 +557,6 @@ def collect_cfgs():
"""
bool_flag(
name = "collect_cfgs",
scope = "universal",
build_setting_default = False,
)
1 change: 1 addition & 0 deletions rust/toolchain/channel/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ load(":channel.bzl", "rust_toolchain_channel_flag")
rust_toolchain_channel_flag(
name = "channel",
build_setting_default = "stable",
scope = "universal",
visibility = ["//visibility:public"],
)

Expand Down
1 change: 1 addition & 0 deletions rust/toolchain/channel/channel.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def _rust_toolchain_channel_flag_impl(ctx):
rust_toolchain_channel_flag = rule(
doc = "A build setting which represents the Rust toolchain channel. The allowed values are {}".format(_CHANNELS),
implementation = _rust_toolchain_channel_flag_impl,
attrs = {"scope": attr.string(default = "universal")},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not super familiar with this flag, this sounds OK but just tagging -- @UebelAndre to double-check -- idea is that if we're using say nightly for the target platform, we should be also using nightly for the exec one at least for consistently with proc-macros I think?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense. We really want the same toolchain to be used when switching between rlib and proc macro outputs (obviously transitioning the target platform) so for now this makes the most sense to me :)

build_setting = config.string(
flag = True,
),
Expand Down
Loading