From 62885beac6d253d11fd78b562046775eb9914c90 Mon Sep 17 00:00:00 2001 From: Justin W Smith <103147162+justsmth@users.noreply.github.com> Date: Tue, 19 Nov 2024 19:22:15 -0500 Subject: [PATCH] Fix for aarch64-apple-ios (#604) --- aws-lc-sys/builder/cc_builder.rs | 8 ++++++++ aws-lc-sys/builder/cmake_builder.rs | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/aws-lc-sys/builder/cc_builder.rs b/aws-lc-sys/builder/cc_builder.rs index 9176d91fa6..4ceb0f563f 100644 --- a/aws-lc-sys/builder/cc_builder.rs +++ b/aws-lc-sys/builder/cc_builder.rs @@ -188,6 +188,14 @@ impl CcBuilder { env::set_var("CFLAGS", cflags); } + if target_os() == "macos" && target_arch() == "x86_64" { + // This compiler error has only been seen on MacOS x86_64: + // ``` + // clang: error: overriding '-mmacosx-version-min=13.7' option with '--target=x86_64-apple-macosx14.2' [-Werror,-Woverriding-t-option] + // ``` + cc_build.flag_if_supported("-Wno-overriding-t-option"); + } + cc_build } diff --git a/aws-lc-sys/builder/cmake_builder.rs b/aws-lc-sys/builder/cmake_builder.rs index feb4acf977..a5a789acdc 100644 --- a/aws-lc-sys/builder/cmake_builder.rs +++ b/aws-lc-sys/builder/cmake_builder.rs @@ -176,7 +176,6 @@ impl CmakeBuilder { // If the build environment vendor is Apple #[cfg(target_vendor = "apple")] { - cmake_cfg.cflag("-Wno-overriding-t-option"); if target_arch() == "aarch64" { cmake_cfg.define("CMAKE_OSX_ARCHITECTURES", "arm64"); cmake_cfg.define("CMAKE_SYSTEM_PROCESSOR", "arm64");