diff --git a/src/lib.rs b/src/lib.rs index 125b4814..00d36a81 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -453,7 +453,6 @@ fn cp_r(src: &Path, dst: &Path) { fn apply_patches(target: &str, inner: &Path) { apply_patches_musl(target, inner); - apply_patches_aarch64_apple_darwin(target, inner); } fn apply_patches_musl(target: &str, inner: &Path) { @@ -473,40 +472,6 @@ fn apply_patches_musl(target: &str, inner: &Path) { fs::write(path, buf).unwrap(); } -fn apply_patches_aarch64_apple_darwin(target: &str, inner: &Path) { - if target != "aarch64-apple-darwin" { - return; - } - - // Apply build system changes to allow configuring and building - // for Apple's ARM64 platform. - // https://github.com/openssl/openssl/pull/12369 - - let path = inner.join("Configurations/10-main.conf"); - let mut buf = fs::read_to_string(&path).unwrap(); - - assert!( - !buf.contains("darwin64-arm64-cc"), - "{} already contains instructions for aarch64-apple-darwin", - path.display(), - ); - - const PATCH: &str = r#" - "darwin64-arm64-cc" => { - inherit_from => [ "darwin-common", asm("aarch64_asm") ], - CFLAGS => add("-Wall"), - cflags => add("-arch arm64"), - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "ios64", - },"#; - - let x86_64_stanza = buf.find(r#" "darwin64-x86_64-cc""#).unwrap(); - buf.insert_str(x86_64_stanza, PATCH); - - fs::write(path, buf).unwrap(); -} - fn sanitize_sh(path: &Path) -> String { if !cfg!(windows) { return path.to_str().unwrap().to_string();