From b4f4731cba82c1eb628dc87ceaeedcf3fa01031c Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 18 Sep 2019 13:58:39 +0200 Subject: [PATCH 1/5] Drop the Xcode 9.4 dependency. Also bump mono to get the removal of the mac32 binaries. New commits in mono/mono: * mono/mono@70d69030534 [2019-08] [merp] Use a separate program as the hang supervisor. (#16900) * mono/mono@4bff2b6370b [offsets-tool] Install clang into the user-specific python directory. * mono/mono@81894ec8cad Implement WriteCore and ReadCore in DeflateStream * mono/mono@bfbf823ca11 [ci] Remove more XCODE32_DIR usages (#16964) * mono/mono@ce01b20a4d4 Add net_4.8.xml to EXTRA_DIST and bump binary-reference-assemblies again * mono/mono@7a587d7fa61 Add .NET 4.8 reference assemblies (#16912) * mono/mono@35e454a8f6a [sdks] Remove the mac32 build. (#16936) * mono/mono@75eb342f532 [2019-08] [System] Make FileSystemWatcher backend non-static (#16926) * mono/mono@5881981f790 [2019-08] [mini] Add missing membars when initializing rgctx entries (#16909) * mono/mono@6290b6cd6e3 Temporarily disable embedded ppdb data decompression (#16911) * mono/mono@a0e7f9eaf2e [2019-08] [arm64_32] make "Debug Mode" work on Watch series 4 with --interpreter (#16886) * mono/mono@6275840a7f8 Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16901) * mono/mono@25f60932839 [corlib] Fix building nunit-lite twice (#16895) * mono/mono@7ec17ba1be9 [2019-08] [android sdk] Add aprofutil tool (#16884) * mono/mono@f755f3b5391 [metadata] Fix leaks when handling a few attributes (#16850) * mono/mono@5f9a2db39b0 [2019-08] Fix infrequent hangs in test-runner. (#16854) * mono/mono@f31f5ea1f1b [2019-08] [threads] do not convert NULL thread name (#16828) * mono/mono@20308e6f874 [aot] Do not wrap tool_prefix path when calling strip (#16820) * mono/mono@cecda47c489 [aprofutil] Add -p and -f options * mono/mono@824cc12ac3f Bump to mono/corefx@e79cf5b * mono/mono@b77dc06a7e7 [aprofutil] Install the tool correctly (#16112) * mono/mono@1848d78d60f [aotprof-tool] Initial import of AOT profiler tool (#15384) * mono/mono@da0086e3042 [2019-08] Add RenamedEvent* to FSW sources from CoreFX (#16756) * mono/mono@0297b21b030 [msbuild][roslyn] Bump msbuild and roslyn to pull in new versions (#16768) * mono/mono@40631e3b9e3 [2019-08] [aot] move method_addresses to data.rel.so section to avoid text relocations (#16751) * mono/mono@68b77674e20 Vtable [i] can be null so this should be check before use it. Fixes #16712 * mono/mono@4a0b4f41ede [mini] publish global patches after JitInfo has been added * mono/mono@7a1f63fde68 [debugger][android] It was not initialising seq_points on MonoCompile on Android, so when was compiling dynamic methods, seq_points wasn't created and we got the assert when try to single step. Diff: https://github.com/mono/mono/compare/29b1ac19c961b959a09097dbc0fe4cd567cc5298..70d690305348cb30cf620db0679ba1173dc7adb0 --- Make.config | 8 -------- builds/Makefile | 2 +- mk/mono.mk | 2 +- runtime/Makefile | 16 +++++++--------- system-dependencies.sh | 5 ----- 5 files changed, 9 insertions(+), 24 deletions(-) diff --git a/Make.config b/Make.config index 76fd9bc5e5f8..67ef71a53c75 100644 --- a/Make.config +++ b/Make.config @@ -47,10 +47,6 @@ XCODE_VERSION=11.0 XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_11_GM_Seed_2.xip XCODE_DEVELOPER_ROOT=/Applications/Xcode11-GM2.app/Contents/Developer -XCODE94_VERSION=9.4 -XCODE94_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_9.4.xip -XCODE94_DEVELOPER_ROOT=/Applications/Xcode94.app/Contents/Developer - # Mono version embedded in XI/XM (NEEDED_MONO_VERSION/BRANCH) are specified in mk/mono.mk include $(TOP)/mk/mono.mk MONO_HASH := $(NEEDED_MONO_VERSION) @@ -136,15 +132,11 @@ APPLETLS_DEFINES = -d:XAMARIN_APPLETLS endif XCODE_MAC_SDKROOT=$(XCODE_DEVELOPER_ROOT)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -XCODE94_MAC_SDKROOT=$(XCODE94_DEVELOPER_ROOT)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk # The MAC_* variables do not contain the -mmacosx-version-min flag on purpose: each usage must specify it separately. MAC_CC=$(CCACHE)$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot $(XCODE_MAC_SDKROOT) -stdlib=libc++ MAC_CXX=$(CCACHE)$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -isysroot $(XCODE_MAC_SDKROOT) -stdlib=libc++ -MAC32_CC=$(CCACHE)$(XCODE94_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot $(XCODE94_MAC_SDKROOT) -stdlib=libc++ -MAC32_CXX=$(CCACHE)$(XCODE94_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -isysroot $(XCODE94_MAC_SDKROOT) -stdlib=libc++ - MAC_INSTALL_VERSION ?= git IOS_INSTALL_VERSION ?= git diff --git a/builds/Makefile b/builds/Makefile index 84bef4fe5bcf..233785ac9af6 100644 --- a/builds/Makefile +++ b/builds/Makefile @@ -76,7 +76,7 @@ else # Configuration for the mono sdk makefiles # SDK_ARGS= \ - XCODE_DIR=$(XCODE_DEVELOPER_ROOT) XCODE32_DIR=$(XCODE94_DEVELOPER_ROOT) \ + XCODE_DIR=$(XCODE_DEVELOPER_ROOT) \ IOS_VERSION=$(IOS_SDK_VERSION) IOS_VERSION_MIN=$(MIN_IOS_SDK_VERSION) \ TVOS_VERSION=$(TVOS_SDK_VERSION) TVOS_VERSION_MIN=$(MIN_TVOS_SDK_VERSION) \ WATCHOS_VERSION=$(WATCH_SDK_VERSION) WATCHOS_VERSION_MIN=$(MIN_WATCHOS_SDK_VERSION) \ diff --git a/mk/mono.mk b/mk/mono.mk index 80cf16e1c155..3928969d646e 100644 --- a/mk/mono.mk +++ b/mk/mono.mk @@ -1,4 +1,4 @@ -NEEDED_MONO_VERSION := 29b1ac19c961b959a09097dbc0fe4cd567cc5298 +NEEDED_MONO_VERSION := 70d690305348cb30cf620db0679ba1173dc7adb0 NEEDED_MONO_BRANCH := 2019-08 MONO_DIRECTORY := mono diff --git a/runtime/Makefile b/runtime/Makefile index 59e0d7cefb4e..52b3bfcd05ff 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -418,8 +418,6 @@ MAC_ARCHITECTURES = x86_64 CLANG_ARCH = $(addprefix -arch ,$(MAC_ARCHITECTURES)) MAC_CLANG = DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) $(MAC_CC) -mmacosx-version-min=$(MIN_OSX_SDK_VERSION) -MAC32_CLANG = DEVELOPER_DIR=$(XCODE94_DEVELOPER_ROOT) $(MAC32_CC) -mmacosx-version-min=$(MIN_OSX_SDK_VERSION) -MAC64_CLANG = DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) $(MAC_CC) -mmacosx-version-min=$(MIN_OSX_SDK_VERSION) MAC_SHIPPED_HEADERS = xamarin/launch.h @@ -469,25 +467,25 @@ STATIC_LAUNCHER$(2)_OBJECTS = $$(foreach src,$$(MAC_SOURCES),.libs/mac/$$(basena SYSTEM_LAUNCHER$(2)_OBJECTS = $$(foreach src,$$(MAC_SOURCES),.libs/mac/$$(basename $$(src))$(3).system.$(1).o) .libs/mac/%$(3).dylib.$(1).o: %.m $$(SHARED_HEADERS) | .libs/mac - $$(call Q_2,OBJC, [mac]) $(MAC$(5)_CLANG) -arch $(1) $(4) -c $$(MAC_OBJC_CFLAGS) $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -DDYLIB -o $$@ $$< + $$(call Q_2,OBJC, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $$(MAC_OBJC_CFLAGS) $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -DDYLIB -o $$@ $$< .libs/mac/%$(3).dylib.$(1).o: %.s $$(SHARED_HEADERS) | .libs/mac - $$(call Q_2,ASM, [mac]) $(MAC$(5)_CLANG) -arch $(1) $(4) -c $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -DDYLIB -o $$@ $$< + $$(call Q_2,ASM, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -DDYLIB -o $$@ $$< .libs/mac/%$(3).static.$(1).o: %.s $$(SHARED_HEADERS) | .libs/mac - $$(call Q_2,ASM, [mac]) $(MAC$(5)_CLANG) -arch $(1) $(4) -c $$(MAC_STATIC_CFLAGS) -o $$@ $$< + $$(call Q_2,ASM, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $$(MAC_STATIC_CFLAGS) -o $$@ $$< .libs/mac/%$(3).static.$(1).o: %.m $$(SHARED_HEADERS) | .libs/mac - $$(call Q_2,OBJC, [mac]) $(MAC$(5)_CLANG) -arch $(1) $(4) $$(MAC_OBJC_CFLAGS) -c $$(MAC_STATIC_CFLAGS) -o $$@ $$< + $$(call Q_2,OBJC, [mac]) $(MAC_CLANG) -arch $(1) $(4) $$(MAC_OBJC_CFLAGS) -c $$(MAC_STATIC_CFLAGS) -o $$@ $$< .libs/mac/%$(3).system.$(1).o: %.m $$(SHARED_HEADERS) | .libs/mac - $$(call Q_2,OBJC, [mac]) $(MAC$(5)_CLANG) -arch $(1) $(4) $$(MAC_OBJC_CFLAGS) -c $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -o $$@ $$< + $$(call Q_2,OBJC, [mac]) $(MAC_CLANG) -arch $(1) $(4) $$(MAC_OBJC_CFLAGS) -c $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -o $$@ $$< .libs/mac/%$(3).system.$(1).o: %.s $$(SHARED_HEADERS) | .libs/mac - $$(call Q_2,ASM, [mac]) $(MAC$(5)_CLANG) -arch $(1) $(4) -c $(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -o $$@ $$< + $$(call Q_2,ASM, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -o $$@ $$< .libs/mac/libxammac$(3).$(1).dylib: $$(DYNAMIC_DYLIB$(2)_OBJECTS) - $$(call Q_2,LD, [mac]) $(MAC$(5)_CLANG) -arch $(1) -dynamiclib $$(MAC_LDFLAGS) -Wl,-install_name,libxammac$(3).dylib -o $$@ $$^ $$(addprefix -Xlinker -U -Xlinker ,$$(ALLOWED_UNDEFINED_SYMBOLS)) + $$(call Q_2,LD, [mac]) $(MAC_CLANG) -arch $(1) -dynamiclib $$(MAC_LDFLAGS) -Wl,-install_name,libxammac$(3).dylib -o $$@ $$^ $$(addprefix -Xlinker -U -Xlinker ,$$(ALLOWED_UNDEFINED_SYMBOLS)) .libs/mac/libxammac$(3).$(1).a: $$(STATIC_LAUNCHER$(2)_OBJECTS) $$(call Q_2,LIB, [mac]) xcrun libtool -no_warning_for_no_symbols -static -o $$@ $$^ diff --git a/system-dependencies.sh b/system-dependencies.sh index cab348a6b6af..1ee4626a65a2 100755 --- a/system-dependencies.sh +++ b/system-dependencies.sh @@ -548,11 +548,6 @@ function check_xcode () { # must have latest Xcode in /Applications/Xcode.app check_specific_xcode install_coresimulator - # Xcode 9,4 does not longer start on catalina - local current_os=$(sw_vers -productVersion) - if test $current_os != "10.15"; then - check_specific_xcode "94" - fi local XCODE_DEVELOPER_ROOT=`grep ^XCODE_DEVELOPER_ROOT= Make.config | sed 's/.*=//'` local IOS_SDK_VERSION=`grep ^IOS_SDK_VERSION= Make.config | sed 's/.*=//'` From a04d6f0072aee74aca69625aa747c2232fcfd150 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 23 Sep 2019 12:25:58 +0200 Subject: [PATCH 2/5] [tests] Add a fat macOS dylib for testing purposes. Add a binary version of a fat macOS dylib (because we can't create one when we need it since we can't create 32-bit slice anymore). It was created like this (in tests/test-libraries): $ cat test.m int theUltimateAnswer () { return 42; } $ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz -arch i386 $ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib --- tests/test-libraries/libtest-fat.macos.dylib | Bin 0 -> 25592 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100755 tests/test-libraries/libtest-fat.macos.dylib diff --git a/tests/test-libraries/libtest-fat.macos.dylib b/tests/test-libraries/libtest-fat.macos.dylib new file mode 100755 index 0000000000000000000000000000000000000000..a4d24be5c1e671f991560ea774feb299fa2cb074 GIT binary patch literal 25592 zcmeHPU1(HC6rMF}YtKa`D88*TheEYf1f{kbt~v%7KcO*I7} zR4nyP=-*2pY#&-^eel78NGU=QN})eb#i!DO1)&u3C_ZSv@7|fs-MdLtkV?xraPG{R znR905o6E9iX3qWL=EZN7QnSDhf?JeYh$L0SV}7DumW8*S|0Ar{3pG_)t5;^$)Dv5{I16%eF#3sguB&5`z z4aVj{KwA6mG2aMC;`(P=m70rkrs!&tl4{%vS{FROR;nB_1#uf+LYL!X8YOOISkij5 zaQZH}io&>!v(W8DIn$_~)o02+E`hb)wP||~GL|_12wM!T9j(jN;^?qD*>|&k z03jY$$CwU^nb*2h&K;_oXd1&pw4B3X%wU7#-x%2H+qUzSEt|L5bxctajFg)_96#Gy zdKj5C;3vS*^5Ih6cRfE{TDx(5x;O?=spU$IXQ-HpttZPOluRkL6f);ayX}yfe-Y^_ zr1QYL!BJx0mZRl&l7AYF*iYNi%eQ{?I$J(IKX>WNAKqBpjxtVNE#O=DhI-b@ECX?q z>mZoA9G`mpEMD(538#O|^WC!3SIXCNwJ~RFEmwArR%>s1&erN^rI_h9gqBH8%9IP7o z?R2MI!eC76BJGo1SChe*BJIQJr#D%pm1s{KQ>k#>R~wn@DkKO90)l`bAP5Kof`A|( z2nYgqkHEfDe_o(}a^Snr52F7>il+2Y=u7keJNYZ*NzBtHpAX+6^yXO_xKlxf5Bh!l z4uUaRK^KN|o>##&?D+WJH})17B`aGS z!M$!POxi2E{t(SI&G%Ddk8>hfIh4#jaVsD-kaJIhNs^ zvDa%1P>#>h+GfgieJ@zo&D{gtks7<6)1-V)$aZa_>o8pMe66RpXXnZHgZdG&Jq1O^ zUJ&@eu#LFAIi|I>M|q}s+VSBUzRwQg_82=sIu|BEEJbX5rY1~`J>2!r1qE??myEsL zMvL-H_P7pQGp(nH&!7!sPo*d*b=?@l(luPlgZ4pV_Pw<=#`rulJrBoiG>u>tV(G&#neXD+N{RT%XN6&;Nt`Zy&w; z&l%X5YWmDJ2H*q!0SDbK2H=|YFVHp%ru|ihk<=;fKi4a!$?*R%ZCO9r`nTg|TvVeE zM~;&1XMbc|(fYg1TmR1bWz*>&yGQ*^XJ5(%0YN|z5CjAPK|l}?1Ox#=KoAfF1cCdB zz@j!ak{ZeM_w4Q6+p|ZhN3+3)?sQLIcYnWb*E{=nF(?Tif5hYo$b&5j_0-lA2iSsp7HK@VmqOZre0xM@ zef>lYSBElpN6ziLfEC=Nf<=ah4W0zRaN6yNcyImdG496mAGf#OotbNF4u@Y#Wn z Date: Mon, 23 Sep 2019 12:41:46 +0200 Subject: [PATCH 3/5] [tests] Adjust XM tests to XM not having fat dylibs anymore. --- tests/common/Configuration.cs | 2 +- tests/mmptest/mmptest.csproj | 3 +++ tests/mmptest/src/CodeStrippingTests.cs | 12 +++++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/common/Configuration.cs b/tests/common/Configuration.cs index 140cb8a475ad..eb533d1f26ec 100644 --- a/tests/common/Configuration.cs +++ b/tests/common/Configuration.cs @@ -315,7 +315,7 @@ public static string SourceRoot { // might need tweaking. if (mt_src_root == null) #if MONOMAC - mt_src_root = Path.GetFullPath (Path.Combine (TestAssemblyDirectory, "../../..")); + mt_src_root = RootPath; #else mt_src_root = Path.GetFullPath (Path.Combine (TestAssemblyDirectory, "../../../..")); #endif diff --git a/tests/mmptest/mmptest.csproj b/tests/mmptest/mmptest.csproj index 64cc505a8b6f..8da9a3ffcde7 100644 --- a/tests/mmptest/mmptest.csproj +++ b/tests/mmptest/mmptest.csproj @@ -113,6 +113,9 @@ SdkVersions.cs + + MachO.cs + diff --git a/tests/mmptest/src/CodeStrippingTests.cs b/tests/mmptest/src/CodeStrippingTests.cs index aa6f2d57d804..c0120461a7a0 100644 --- a/tests/mmptest/src/CodeStrippingTests.cs +++ b/tests/mmptest/src/CodeStrippingTests.cs @@ -4,6 +4,7 @@ using NUnit.Framework; using Xamarin.Utils; +using Xamarin.Tests; namespace Xamarin.MMP.Tests { @@ -59,6 +60,10 @@ void StripTestCore (TI.UnifiedTestConfig test, bool debugStrips, bool releaseStr [TestCase (false, false, false)] public void ShouldStripMonoPosixHelper (bool? strip, bool debugStrips, bool releaseStrips) { + var posixHelper = Path.Combine (Configuration.SdkRootXM, "lib", "libMonoPosixHelper.dylib"); + if (Xamarin.MachO.GetArchitectures (posixHelper).Count < 2) + Assert.Ignore ($"libMonoPosixHelper.dylib is not a fat library."); + MMPTests.RunMMPTest (tmpDir => { TI.UnifiedTestConfig test = CreateStripTestConfig (strip, tmpDir); @@ -90,16 +95,17 @@ public void ExplictStripOption_ThirdPartyLibrary_AndWarnsIfSo (bool? strip, bool { MMPTests.RunMMPTest (tmpDir => { - string originalLocation = Path.Combine (TI.FindRootDirectory (), MonoPosixOffset); + string originalLocation = Path.Combine (Configuration.SourceRoot, "tests", "test-libraries", "libtest-fat.macos.dylib"); string newLibraryLocation = Path.Combine (tmpDir, "libTest.dylib"); File.Copy (originalLocation, newLibraryLocation); TI.UnifiedTestConfig test = CreateStripTestConfig (strip, tmpDir, $" --native-reference=\"{newLibraryLocation}\""); test.Release = true; - string buildOutput = TI.TestUnifiedExecutable (test).BuildOutput; + var testOutput = TI.TestUnifiedExecutable (test); + string buildOutput = testOutput.BuildOutput; Assert.AreEqual (shouldStrip, DidAnyLipoStrip (buildOutput), "lipo usage did not match expectations"); - Assert.AreEqual (shouldStrip, buildOutput.Contains ("MM2108"), "Warning did not match expectations"); + testOutput.Messages.AssertWarning (2108, "libTest.dylib was stripped of architectures except x86_64 to comply with App Store restrictions. This could break existing codesigning signatures. Consider stripping the library with lipo or disabling with --optimize=-trim-architectures"); }); } From d922b0566903e697314ef8755296cb664221e03a Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 23 Sep 2019 12:47:53 +0200 Subject: [PATCH 4/5] [tests] Adjust product tests to some libraries not being fat anymore. --- tests/common/ProductTests.cs | 2 +- tools/common/MachO.cs | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/common/ProductTests.cs b/tests/common/ProductTests.cs index 6dfc3bd3d235..a4a95c701704 100644 --- a/tests/common/ProductTests.cs +++ b/tests/common/ProductTests.cs @@ -70,7 +70,7 @@ public void MinOSVersion (Profile profile, MachO.LoadCommands load_command, Mach foreach (var machoFile in machoFiles) { var fatfile = MachO.Read (machoFile); foreach (var slice in fatfile) { - if (slice.IsDynamicLibrary && slice.Architecture == MachO.Architectures.x86_64 && slice.Parent.size < 10240 /* this is the dummy x86_64 slice to appease Apple's notarization tooling */) + if (slice.IsDynamicLibrary && slice.Architecture == MachO.Architectures.x86_64 && slice.Parent != null && slice.Parent.size < 10240 /* this is the dummy x86_64 slice to appease Apple's notarization tooling */) continue; var any_load_command = false; foreach (var lc in slice.load_commands) { diff --git a/tools/common/MachO.cs b/tools/common/MachO.cs index eb95c74fcba8..5061efd8d4e1 100644 --- a/tools/common/MachO.cs +++ b/tools/common/MachO.cs @@ -232,10 +232,19 @@ public static IEnumerable Read (string filename) } } else { var mf = file as MachOFile; - if (mf != null) + if (mf != null) { yield return mf; - else - throw ErrorHelper.CreateError (1604, "File of type {0} is not a MachO file ({1}).", file.GetType ().Name, filename); + yield break; + } + + var sl = file as StaticLibrary; + if (sl != null) { + foreach (var obj in sl.ObjectFiles) + yield return obj; + yield break; + } + + throw ErrorHelper.CreateError (1604, "File of type {0} is not a MachO file ({1}).", file.GetType ().Name, filename); } } From 7d96d5bc2455ad8a7e365e7f9bdd1d09e291a46d Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 23 Sep 2019 19:11:39 +0200 Subject: [PATCH 5/5] One more test fix. --- tests/mmptest/src/CodeStrippingTests.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/mmptest/src/CodeStrippingTests.cs b/tests/mmptest/src/CodeStrippingTests.cs index c0120461a7a0..fef5b3fc500a 100644 --- a/tests/mmptest/src/CodeStrippingTests.cs +++ b/tests/mmptest/src/CodeStrippingTests.cs @@ -105,7 +105,11 @@ public void ExplictStripOption_ThirdPartyLibrary_AndWarnsIfSo (bool? strip, bool var testOutput = TI.TestUnifiedExecutable (test); string buildOutput = testOutput.BuildOutput; Assert.AreEqual (shouldStrip, DidAnyLipoStrip (buildOutput), "lipo usage did not match expectations"); - testOutput.Messages.AssertWarning (2108, "libTest.dylib was stripped of architectures except x86_64 to comply with App Store restrictions. This could break existing codesigning signatures. Consider stripping the library with lipo or disabling with --optimize=-trim-architectures"); + if (shouldStrip) { + testOutput.Messages.AssertWarning (2108, "libTest.dylib was stripped of architectures except x86_64 to comply with App Store restrictions. This could break existing codesigning signatures. Consider stripping the library with lipo or disabling with --optimize=-trim-architectures"); + } else { + testOutput.Messages.AssertWarningCount (0); + } }); }