Skip to content

Commit ddb82bf

Browse files
scottcaometa-codesync[bot]
authored andcommitted
Make fake macOS host default to aarch64
Summary: x86_64 macs are mostly a thing of the past now. When `--fake-host=macos` is passed without `--fake-arch`, resolve the fake architecture to `aarch64`. Preserve every explicitly passed `--fake-arch` value, including `default`. Reviewed By: 8Keep Differential Revision: D116819642 fbshipit-source-id: 8f53e67c756719205b9065c0502766b99176efcb
1 parent a9b2672 commit ddb82bf

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

app/buck2_client_ctx/src/common.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,10 @@ impl CommonBuildConfigurationOptions {
342342
}
343343
}
344344
pub fn host_arch_override(&self) -> HostArchOverride {
345-
match &self.fake_arch {
346-
Some(v) => *v,
347-
None => HostArchOverride::Default,
345+
match (&self.fake_arch, &self.fake_host) {
346+
(Some(v), _) => *v,
347+
(None, Some(HostPlatformOverride::MacOs)) => HostArchOverride::AArch64,
348+
(None, _) => HostArchOverride::Default,
348349
}
349350
}
350351
pub fn host_xcode_version_override(&self) -> Option<String> {

0 commit comments

Comments
 (0)