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

cargo build rebuilds the world after ./mach build, and vice versa. #20489

Open
emilio opened this issue Mar 31, 2018 · 7 comments
Open

cargo build rebuilds the world after ./mach build, and vice versa. #20489

emilio opened this issue Mar 31, 2018 · 7 comments
Assignees
Labels
A-build Related to or part of the build process

Comments

@emilio
Copy link
Member

emilio commented Mar 31, 2018

And it's annoying because I tend to use them interchangeably, accidentally.

STR:

$ cd servo
$ ./mach build -d
$ cargo build
@emilio emilio added the A-build Related to or part of the build process label Mar 31, 2018
@jdm
Copy link
Member

jdm commented Mar 31, 2018

This is because ./mach build sets RUSTFLAGS during the build, so cargo build sees that it doesn't match and rebuilds everything.

@emilio
Copy link
Member Author

emilio commented Mar 31, 2018

Can we not do that except on automation?

@jdm
Copy link
Member

jdm commented Mar 31, 2018

Yes.

@emilio
Copy link
Member Author

emilio commented Mar 31, 2018

Ok, I'll send a patch for that. Travis should be enough I guess.

@emilio emilio self-assigned this Mar 31, 2018
bors-servo pushed a commit that referenced this issue Mar 31, 2018
Avoid ./mach build to clobber the build by default.

Fixes #20489.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20491)
<!-- Reviewable:end -->
@paulrouget
Copy link
Contributor

Is there a way to make it so that cargo use the same options as mach instead of trying to make it so mach use cargo options?

I get bitten by this pretty often too.

@SimonSapin
Copy link
Member

When I last tried to fix this I hit a wall with rust-lang/cargo#5376

Fixing rust-lang/rust#30783 would remove the need for one of the flags we set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build Related to or part of the build process
Projects
None yet
Development

No branches or pull requests

4 participants