-
Notifications
You must be signed in to change notification settings - Fork 13k
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
rustbuild: avoid trying to inversely cross-compile for build triple from host triples #76415
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 |
---|---|---|
|
@@ -87,11 +87,16 @@ pub trait Step: 'static + Clone + Debug + PartialEq + Eq + Hash { | |
|
||
pub struct RunConfig<'a> { | ||
pub builder: &'a Builder<'a>, | ||
pub host: TargetSelection, | ||
pub target: TargetSelection, | ||
pub path: PathBuf, | ||
} | ||
|
||
impl RunConfig<'_> { | ||
pub fn build_triple(&self) -> TargetSelection { | ||
self.builder.build.build | ||
} | ||
} | ||
|
||
struct StepDescription { | ||
default: bool, | ||
only_hosts: bool, | ||
|
@@ -165,7 +170,6 @@ impl StepDescription { | |
pathset, self.name, builder.config.exclude | ||
); | ||
} | ||
let hosts = &builder.hosts; | ||
|
||
// Determine the targets participating in this rule. | ||
let targets = if self.only_hosts { | ||
|
@@ -178,16 +182,9 @@ impl StepDescription { | |
&builder.targets | ||
}; | ||
|
||
for host in hosts { | ||
for target in targets { | ||
let run = RunConfig { | ||
builder, | ||
path: pathset.path(builder), | ||
host: *host, | ||
target: *target, | ||
}; | ||
(self.make_run)(run); | ||
} | ||
for target in targets { | ||
let run = RunConfig { builder, path: pathset.path(builder), target: *target }; | ||
(self.make_run)(run); | ||
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. IIRC this previous logic matches the ancient logic of the makefiles, but I don't think it ever fully made sense. The main thing to worry about here is the impact on all the builders on CI, since some of them may accidentally be relying on the previous behavior. Everything is so specific nowadays though it may be unlikely. In any case, just something to watch out for. |
||
} | ||
} | ||
|
||
|
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.
build, build, build, 🔧 🏗️