rust: Clean up target configs and test some more
See the new docs for details. The difference is vis-a-vis older versions of this PR, not master.
This commit is contained in:
@@ -71,14 +71,14 @@ By default, it takes the `stdenv.hostPlatform.config` and replaces components
|
||||
where they are known to differ. But there are ways to customize the argument:
|
||||
|
||||
- To choose a different target by name, define
|
||||
`stdenv.hostPlatform.rustc.arch.config` as that name (a string), and that
|
||||
`stdenv.hostPlatform.rustc.config` as that name (a string), and that
|
||||
name will be used instead.
|
||||
|
||||
For example:
|
||||
```nix
|
||||
import <nixpkgs> {
|
||||
crossSystem = (import <nixpkgs/lib>).systems.examples.armhf-embedded // {
|
||||
rustc.arch.config = "thumbv7em-none-eabi";
|
||||
rustc.config = "thumbv7em-none-eabi";
|
||||
};
|
||||
}
|
||||
```
|
||||
@@ -88,18 +88,18 @@ where they are known to differ. But there are ways to customize the argument:
|
||||
```
|
||||
|
||||
- To pass a completely custom target, define
|
||||
`stdenv.hostPlatform.rustc.arch.config` with its name, and
|
||||
`stdenv.hostPlatform.rustc.arch.custom` with the value. The value will be
|
||||
`stdenv.hostPlatform.rustc.config` with its name, and
|
||||
`stdenv.hostPlatform.rustc.platform` with the value. The value will be
|
||||
serialized to JSON in a file called
|
||||
`${stdenv.hostPlatform.rustc.arch.config}.json`, and the path of that file
|
||||
`${stdenv.hostPlatform.rustc.config}.json`, and the path of that file
|
||||
will be used instead.
|
||||
|
||||
For example:
|
||||
```nix
|
||||
import <nixpkgs> {
|
||||
crossSystem = (import <nixpkgs/lib>).systems.examples.armhf-embedded // {
|
||||
rustc.arch.config = "thumb-crazy";
|
||||
rustc.arch.custom = { foo = ""; bar = ""; };
|
||||
rustc.config = "thumb-crazy";
|
||||
rustc.platform = { foo = ""; bar = ""; };
|
||||
};
|
||||
}
|
||||
will result in:
|
||||
|
||||
Reference in New Issue
Block a user