Struct build_env::BuildEnv [] [src]

pub struct BuildEnv { /* fields omitted */ }

Allow retrieval of values pretaining to a build process that may be related to the target and/or host triple.

Methods

impl BuildEnv
[src]

Use environment variables (such as those set by cargo) to determine values for target and host via the environment variables TARGET and HOST.

Construct a BuildEnv where the host and target may be different.

Construct a BuildEnv where target and host are the same.

The target we're supplying values for

The host we're supplying values for

Query the environment for a value, trying the most specific first, before querying more general variables.

  1. <var>_<target> - for example, CC_x86_64-unknown-linux-gnu
  2. <var>_<target_with_underscores> - for example, CC_x86_64_unknown_linux_gnu
  3. <build-kind>_<var> - for example, HOST_CC or TARGET_CFLAGS
  4. <var> - a plain CC, AR as above.

The same as Self::var(), but converts the return to an OsString and provides a useful error message

Trait Implementations

impl Debug for BuildEnv
[src]

Formats the value using the given formatter.

impl Clone for BuildEnv
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more