Skip to content

Commit

Permalink
Backout D48975392
Browse files Browse the repository at this point in the history
Summary: This was a hack anyway, and it turns out to be broken for build script. Rest of the stack does it better

Reviewed By: capickett

Differential Revision: D51461804

fbshipit-source-id: 054e99756167bfe1c9a9cf749bb439afdff36376
  • Loading branch information
JakobDegen authored and facebook-github-bot committed Nov 20, 2023
1 parent ede708c commit 1388406
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion prelude/rust/cargo_buildscript.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _cargo_buildscript_impl(ctx: AnalysisContext) -> list[Provider]:
env["CARGO_PKG_NAME"] = ctx.attrs.package_name
env["CARGO_PKG_VERSION"] = ctx.attrs.version
env["OUT_DIR"] = out_dir.as_output()
env["RUSTC"] = cmd_args(toolchain_info.compiler_standalone).relative_to(cwd)
env["RUSTC"] = cmd_args(toolchain_info.compiler).relative_to(cwd)
env["RUSTC_LINKER"] = "/bin/false"
env["RUST_BACKTRACE"] = "1"
env["TARGET"] = toolchain_info.rustc_target_triple
Expand Down
3 changes: 0 additions & 3 deletions prelude/rust/rust_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ rust_toolchain_attrs = {
"failure_filter": provider_field(bool, default = False),
# The Rust compiler (rustc)
"compiler": provider_field(RunInfo | None, default = None),
# A Rust compiler that can be used "standalone", without special settings
# from Rust rules (e.g. this keeps the default sysroot).
"compiler_standalone": provider_field(RunInfo | None, default = None),
# Rust documentation extractor (rustdoc)
"rustdoc": provider_field(RunInfo | None, default = None),
# Clippy (linter) version of the compiler
Expand Down
1 change: 0 additions & 1 deletion prelude/toolchains/rust.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def _system_rust_toolchain_impl(ctx):
clippy_driver = RunInfo(args = ["clippy-driver"]),
clippy_toml = ctx.attrs.clippy_toml[DefaultInfo].default_outputs[0] if ctx.attrs.clippy_toml else None,
compiler = RunInfo(args = ["rustc"]),
compiler_standalone = RunInfo(args = ["rustc"]),
concat_tool = ctx.attrs.concat_tool[RunInfo],
default_edition = ctx.attrs.default_edition,
deny_lints = ctx.attrs.deny_lints,
Expand Down

0 comments on commit 1388406

Please sign in to comment.