This commit updates the rustc info cache to cache failures to execute
rustc as well as successes. This fixes a weird issue where if you're
probing for flags the `rustc_info_cache` test fails on channels which
don't have the flag since previously a failure to execute rustc resulted
in never caching the result.
To preserve old `profile` behavior, some cases of `--profile`
should not trigger an error. Plus, the 'check' profile should be
allowed for profile selection tests and `rustc --profile=check`.
This allows creating custom profiles that inherit from other profiles.
For example, one can have a release-lto profile that looks like this:
[profile.release-lto]
inherits = "release"
lto = true
The profile name will also carry itself into the output directory name
so that the different build outputs can be cached independently from
one another.
So in effect, at the `target` directory, a name will be created for
the new profile, in addition to the 'debug' and 'release' builds:
```
$ cargo build --profile release-lto
$ ls -l target
debug release release-lto
```
To avoid breaking other (external) callers of ops::run(), this adds a
new function ops::run_os() taking an &[OsString], and turns ops::run()
into a wrapper (keeping its original signature) that calls run_os().