-
Notifications
You must be signed in to change notification settings - Fork 13.3k
bootstrap: skip llvm-tools install when externally provided #109196
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,7 +209,7 @@ install!((self, builder, _config), | |
); | ||
} | ||
}; | ||
LlvmTools, alias = "llvm-tools", Self::should_build(_config), only_hosts: true, { | ||
LlvmTools, alias = "llvm-tools", should_build_llvm(_config), only_hosts: true, { | ||
let tarball = builder | ||
.ensure(dist::LlvmTools { target: self.target }) | ||
.expect("missing llvm-tools"); | ||
|
@@ -251,6 +251,11 @@ install!((self, builder, _config), | |
}; | ||
); | ||
|
||
fn should_build_llvm(config: &Config) -> bool { | ||
// additionaly check that llvm is not externally provided | ||
LlvmTools::should_build(config) && config.is_rust_llvm(config.build) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That code is not correct : the config.build is not the one we want... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Can you do this check in here? It should do the work |
||
} | ||
|
||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
pub struct Src { | ||
pub stage: u32, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you write this as a doc-comment on top of this function? It will be better for other devs to directly read this via LSP/rust-analyzer.