Skip to content

Commit

Permalink
[d16-3] Bump mono 2019-06@5608fe0a (#7126)
Browse files Browse the repository at this point in the history
* [d16-3] Bump mono 2019-06@5608fe0a

New commits in mono/mono:

* mono/mono@5608fe0abb3 [2019-06] Update NETStandard 2.1 APIs (#17081)
* mono/mono@a5b8d6fcb5b [2019-06] Fix time zone issue when jumping into DST (#17062)
* mono/mono@390e6e124f5 Revert "[metadata] Fix leaks when handling a few attributes (#16675) (#16851)"
* mono/mono@459dd927dfd [2019-06] Bump bockbuild to get mono/bockbuild#121
* mono/mono@beb9a1b182a [sdks] Remove the mac32 build.
* mono/mono@747a919a06e [ci] Make ios/mac sdks archive URL more predictable
* mono/mono@114013096e1 [ci] Build iOS/Mac Mono sdks archive using Xcode 11
* mono/mono@10a24f3ea1d Implement WriteCore and ReadCore in DeflateStream
* mono/mono@a925846b1f0 [offsets-tool] Install clang into the user-specific python directory. (#16933)
* mono/mono@fe64a4765e6 [2019-06] Bump msbuild and sdk versions to 3.0.1xx latest (#16870)
* mono/mono@7293597b905 [corlib] Fix building nunit-lite twice (#16910)
* mono/mono@1648e886873 Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes #7005. (#16896)
* mono/mono@a6b5187d76a [metadata] Fix leaks when handling a few attributes (#16675) (#16851)
* mono/mono@7da9a041b3b [2019-06] Bump to mono/corefx@e79cf5b
* mono/mono@2b7050bdf36 [2019-06] Add RenamedEvent* to FSW sources from CoreFX (#16758)
* mono/mono@4f5ed502c6e [msbuild] pick up p4 versions
* mono/mono@f04ee2219d5 [2019-06][msbuid][roslyn] Bump msbuild and roslyn-binaries to pick up dotnet 3.0.100-p9 toolset
* mono/mono@6b4b99e571b Vtable [i] can be null so this should be check before use it. Fixes #16712

Diff: https://github.com/mono/mono/compare/7af64d1ebe9e9ee305cdae8ec5995c9521cbcf19..5608fe0abb3e501c461b2979a913c0bed3fe2a6d

* [tests] Adjust to non-fat macOS libraries from mono.
  • Loading branch information
VincentDondain authored and dalexsoto committed Oct 1, 2019
1 parent d532e90 commit c2cbd34
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion mk/mono.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NEEDED_MONO_VERSION := 7af64d1ebe9e9ee305cdae8ec5995c9521cbcf19
NEEDED_MONO_VERSION := 5608fe0abb3e501c461b2979a913c0bed3fe2a6d
NEEDED_MONO_BRANCH := 2019-06

MONO_DIRECTORY := mono
Expand Down
2 changes: 1 addition & 1 deletion tests/common/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/common/ProductTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions tests/mmptest/mmptest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@
<Link>SdkVersions.cs</Link>
</Compile>
<Compile Include="src\TargetFrameworkMutateTests.cs" />
<Compile Include="..\..\tools\common\MachO.cs">
<Link>MachO.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
Expand Down
16 changes: 13 additions & 3 deletions tests/mmptest/src/CodeStrippingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using NUnit.Framework;

using Xamarin.Utils;
using Xamarin.Tests;

namespace Xamarin.MMP.Tests
{
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -90,16 +95,21 @@ 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");
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);
}
});
}

Expand Down
Binary file added tests/test-libraries/libtest-fat.macos.dylib
Binary file not shown.
15 changes: 12 additions & 3 deletions tools/common/MachO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,19 @@ public static IEnumerable<MachOFile> 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);
}
}

Expand Down

4 comments on commit c2cbd34

@xamarin-release-manager

This comment was marked as outdated.

@xamarin-release-manager

This comment was marked as outdated.

@xamarin-release-manager

This comment was marked as outdated.

@mandel-macaque

This comment was marked as outdated.

Please sign in to comment.