Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set default build target #368

Closed
Progdrasil opened this issue Feb 6, 2020 · 1 comment · Fixed by #624
Closed

Ability to set default build target #368

Progdrasil opened this issue Feb 6, 2020 · 1 comment · Fixed by #624

Comments

@Progdrasil
Copy link

It would be useful for those who develop for one specific target to be able to define the default build target. In much the same way cargo does. This would reduce the following example command:

cross build --target armv7-unknown-linux-gnueabihf 

To the equivalent Cross.toml and command

[build]
target = "armv7-unknown-linux-gnueabihf"
cross build
@porkbrain
Copy link

porkbrain commented Dec 4, 2020

This would be much appreciated. Cargo.toml uses this format for setting default, maybe the same could be used by cross:

[target]
default = "armv7-unknown-linux-gnueabihf"

@Emilgardis Emilgardis linked a pull request Mar 24, 2022 that will close this issue
bors bot added a commit that referenced this issue Mar 24, 2022
624: Allow setting default build target r=Emilgardis a=zappolowski

This implements #368 

This feature allows to specify the default target to build either in `Cross.toml`

```toml
[build]
target = "aarch64-unknown-linux-gnu"
```
or by setting `CROSS_BUILD_TARGET` to avoid the need to always specify `--target`.

I've opted for `build.target` as this resembles the configuration of [cargo](https://doc.rust-lang.org/cargo/reference/config.html#buildtarget).

Co-authored-by: Bjoern Hiller <bjoern.hiller@gmail.com>
Co-authored-by: Emil Gardström <emil.gardstrom@gmail.com>
@bors bors bot closed this as completed in #624 Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants