diff --git a/build/build/src/paths.rs b/build/build/src/paths.rs index 41cdc058d5ad..bfcca481e150 100644 --- a/build/build/src/paths.rs +++ b/build/build/src/paths.rs @@ -87,16 +87,10 @@ impl TargetTriple { /// Get the triple effectively used by the Engine build. /// - /// As the GraalVM we use does not support native Aarch64 builds, it should be treated as amd64 - /// there. + /// This might differ from `self` if Engine for some reason needs to cross-compile. Currently + /// this is not the case, previously it was used to force x64 on Applce Silicon. pub fn engine(&self) -> Self { - let mut ret = self.clone(); - ret.arch = if self.arch == Arch::AArch64 && self.os == OS::MacOS { - Arch::X86_64 - } else { - self.arch - }; - ret + self.clone() } /// Pretty prints architecture for our packages. Conform to GraalVM scheme as well. diff --git a/build/build/src/project/backend.rs b/build/build/src/project/backend.rs index 540212a87228..28b8f0e8ae95 100644 --- a/build/build/src/project/backend.rs +++ b/build/build/src/project/backend.rs @@ -104,9 +104,7 @@ impl Backend { pub fn matches_platform(&self, name: &str) -> bool { // Sample name: "project-manager-bundle-2022.1.1-nightly.2022-04-16-linux-amd64.tar.gz" let os_matches = name.contains(self.target_os.as_str()); - // Arch test involves a workaround for Engine being built through Rosette on Apple Silicon. - let arch_matches = name.contains(pretty_print_arch(TARGET_ARCH)) - || (TARGET_ARCH == Arch::AArch64 && name.contains(pretty_print_arch(Arch::X86_64))); + let arch_matches = name.contains(pretty_print_arch(TARGET_ARCH)); os_matches && arch_matches } } @@ -124,11 +122,12 @@ impl IsTarget for Backend { fn adapt_artifact(self, path: impl AsRef) -> BoxFuture<'static, Result> { let exe_suffix = self.target_os.exe_suffix().to_owned(); let path = path.as_ref().to_owned(); - let provisional_path = crate::paths::generated::ProjectManagerBundle::new_root( - &path, - &exe_suffix, - "", - ); + let provisional_path: crate::paths::generated::ProjectManagerBundle = + crate::paths::generated::ProjectManagerBundle::new_root( + &path, + &exe_suffix, + "", + ); async move { let engine_versions = bundled_engine_versions(&provisional_path).await?; let path = crate::paths::generated::ProjectManagerBundle::new_root( diff --git a/build/ci_utils/src/cache/goodie/graalvm.rs b/build/ci_utils/src/cache/goodie/graalvm.rs index faa01590ead0..ae82cd6aba9a 100644 --- a/build/ci_utils/src/cache/goodie/graalvm.rs +++ b/build/ci_utils/src/cache/goodie/graalvm.rs @@ -111,8 +111,6 @@ impl GraalVM { }; let arch_name = match *arch { Arch::X86_64 => "x64", - // No Graal packages for Apple Silicon. - Arch::AArch64 if TARGET_OS == OS::MacOS => "x64", Arch::AArch64 => "aarch64", other_arch => unimplemented!("Architecture `{}` is not supported!", other_arch), };