Skip to content

rustbuild: Avoid some extraneous rustc compiles on cross builds #44143

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

Merged
merged 2 commits into from
Aug 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,11 +669,6 @@ impl Step for ErrorIndex {
let build = builder.build;
let target = self.target;

builder.ensure(compile::Rustc {
compiler: builder.compiler(0, build.build),
target,
});

println!("Documenting error index ({})", target);
let out = build.doc_out(target);
t!(fs::create_dir_all(&out));
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ impl Build {
fn force_use_stage1(&self, compiler: Compiler, target: Interned<String>) -> bool {
!self.config.full_bootstrap &&
compiler.stage >= 2 &&
self.hosts.iter().any(|h| *h == target)
(self.hosts.iter().any(|h| *h == target) || target == self.build)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, something is wrong if this is necessary. I believe we try to make the first host self.build in config.rs; could you check on that logic?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I tried reordering this in config.rs but then it ended up building too much b/c it's using config.host to seed the matrix of what to build presumably? That is, when we do --host foo, we only want the host binaries for foo and not for the build triple. Do you think there's a better way to solve this though?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not then -- I think our current separation between target/host/build isn't really well thought out and probably various build steps build on the wrong platform (i.e., not optimal time-wise) today. I'm hoping to categorize the list of steps and make the distinction clearer.

}

/// Returns the directory that OpenSSL artifacts are compiled into if
Expand Down