diff options
| author | 2021-08-11 15:13:43 -0400 | |
|---|---|---|
| committer | 2021-08-12 13:18:34 +0000 | |
| commit | a9a1fc07473ef512d3ae84f4c368d5e3752649e6 (patch) | |
| tree | ac0cf93ba8ff5cd24488b7eb500b2356885a16f5 /rust/rust.go | |
| parent | adffbe9166d8740083e245f179a9e9eb705b3837 (diff) | |
rust: Add support to emit certain Cargo env vars.
Some crates expect Cargo to provide certain environment variables. This
CL adds a compatability flag that emulates the behavior of Cargo by
setting these environment variables when building.
Bug: 171011485
Test: New soong tests pass
Test: quiche no longer requires patch removing CARGO_PKG_VERSION
Change-Id: I4c95c284846f6075428c6f61fe8c260f2e35fbd9
Diffstat (limited to 'rust/rust.go')
| -rw-r--r-- | rust/rust.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/rust.go b/rust/rust.go index 80be49638..3ec550b10 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -433,6 +433,12 @@ type compiler interface { // copied. This is equivalent to Cargo's OUT_DIR variable. CargoOutDir() android.OptionalPath + // CargoPkgVersion returns the value of the Cargo_pkg_version property. + CargoPkgVersion() string + + // CargoEnvCompat returns whether Cargo environment variables should be used. + CargoEnvCompat() bool + inData() bool install(ctx ModuleContext) relativeInstallPath() string |