Skip to content

Use the cargo-supplied RUSTC environment variable.#11

Open
cfrantz wants to merge 1 commit intodcuddeback:masterfrom
cfrantz:rustc-env
Open

Use the cargo-supplied RUSTC environment variable.#11
cfrantz wants to merge 1 commit intodcuddeback:masterfrom
cfrantz:rustc-env

Conversation

@cfrantz
Copy link

@cfrantz cfrantz commented Dec 10, 2021

When executing build scripts, cargo sets several environment variables.
Use the cargo-supplied value for RUSTC.

This also allows libudev-sys to be build by bazel
using rules created by cargo raze.

Signed-off-by: Chris Frantz cfrantz@google.com

When executing build scripts, [cargo sets several environment variables](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts).
Use the cargo-supplied value for `RUSTC`.

This _also_ allows `libudev-sys` to be build by [bazel](https://bazel.build)
using rules created by `cargo raze`.

Signed-off-by: Chris Frantz <cfrantz@google.com>
cfrantz added a commit to cfrantz/opentitan that referenced this pull request Dec 10, 2021
The libudev-sys crate invokes the compiler directly rather than via the
cargo (and bazel) supplied `RUSTC` environment variable.  This causes the
library to fail when building under bazel.  This patch fixes the
libudev-sys crate to invoke the compiler via the `RUSTC` variable.

This is the same patch as the [PR](dcuddeback/libudev-sys#11)
sent to libudev-sys.

Signed-off-by: Chris Frantz <cfrantz@google.com>
drewmacrae pushed a commit to drewmacrae/opentitan that referenced this pull request Dec 11, 2021
The libudev-sys crate invokes the compiler directly rather than via the
cargo (and bazel) supplied `RUSTC` environment variable.  This causes the
library to fail when building under bazel.  This patch fixes the
libudev-sys crate to invoke the compiler via the `RUSTC` variable.

This is the same patch as the [PR](dcuddeback/libudev-sys#11)
sent to libudev-sys.

Signed-off-by: Chris Frantz <cfrantz@google.com>
cfrantz added a commit to lowRISC/opentitan that referenced this pull request Dec 13, 2021
The libudev-sys crate invokes the compiler directly rather than via the
cargo (and bazel) supplied `RUSTC` environment variable.  This causes the
library to fail when building under bazel.  This patch fixes the
libudev-sys crate to invoke the compiler via the `RUSTC` variable.

This is the same patch as the [PR](dcuddeback/libudev-sys#11)
sent to libudev-sys.

Signed-off-by: Chris Frantz <cfrantz@google.com>
@fmorency
Copy link

+1. Thanks for providing this patch @cfrantz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments