From b24323fc0aab151acc62daadc1c9129e69eaca16 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 29 Mar 2023 10:24:55 +0200 Subject: [PATCH] [tests] Update BuildWithObjcArcFlag test to cope with breaking changes in Xcode 14.3. --- tests/mmptest/src/MMPTest.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/mmptest/src/MMPTest.cs b/tests/mmptest/src/MMPTest.cs index bdcb8b0c2f..af48d07691 100644 --- a/tests/mmptest/src/MMPTest.cs +++ b/tests/mmptest/src/MMPTest.cs @@ -772,6 +772,14 @@ namespace Xamarin.MMP.Tests { TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir) { CSProjConfig = "-link_flags=-fobjc-arc" }; + // Starting with Xcode 14.3, this happens if min OS <= 10.10: + // ld: file not found: /Applications/Xcode_14.3.0-rc.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_macosx.a + // clang: error: linker command failed with exit code 1 (use -v to see invocation) + if (Version.Parse (SdkVersions.MinOSX) < new Version (10, 10)) { + test.PlistReplaceStrings = new Dictionary { + { $"{SdkVersions.MinOSX}", "10.11"} + }; + } TI.TestUnifiedExecutable (test); TI.BuildProject (Path.Combine (tmpDir, "UnifiedExample.csproj")); });