* Drop the Xcode 9.4 dependency. (#7044)
* Drop the Xcode 9.4 dependency.
Also bump mono to get the removal of the mac32 binaries.
New commits in mono/mono:
* mono/mono@beb9a1b182 [sdks] Remove the mac32 build.
* mono/mono@747a919a06 [ci] Make ios/mac sdks archive URL more predictable
* mono/mono@114013096e [ci] Build iOS/Mac Mono sdks archive using Xcode 11
* mono/mono@10a24f3ea1 Implement WriteCore and ReadCore in DeflateStream
* mono/mono@a925846b1f [offsets-tool] Install clang into the user-specific python directory. (#16933)
* mono/mono@fe64a4765e [2019-06] Bump msbuild and sdk versions to 3.0.1xx latest (#16870)
* mono/mono@7293597b90 [corlib] Fix building nunit-lite twice (#16910)
* mono/mono@1648e88687 Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16896)
* mono/mono@a6b5187d76 [metadata] Fix leaks when handling a few attributes (#16675) (#16851)
* mono/mono@7da9a041b3 [2019-06] Bump to mono/corefx@e79cf5b
* mono/mono@2b7050bdf3 [2019-06] Add RenamedEvent* to FSW sources from CoreFX (#16758)
* mono/mono@4f5ed502c6 [msbuild] pick up p4 versions
* mono/mono@f04ee2219d [2019-06][msbuid][roslyn] Bump msbuild and roslyn-binaries to pick up dotnet 3.0.100-p9 toolset
* mono/mono@6b4b99e571 Vtable [i] can be null so this should be check before use it. Fixes #16712
Diff: 7af64d1ebe..beb9a1b182
* [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] Adjust XM tests to XM not having fat dylibs anymore.
* [tests] Adjust product tests to some libraries not being fat anymore.
* [tests] Don't treat an Xcode with the same major version number as old.
Fixes an issue in the MT0091 test, where it would fail on tvOS because the
test wanted to use an older Xcode, and we could end up returning Xcode 11.0
when the current Xcode is 11.1. Since the test depends on using the OS SDK as
it was designed for (technically using an OS SDK earlier than the latest), it
ended up failing because while the iOS SDK was bumped in Xcode 11.1, the tvOS
SDK was not.
This commit is contained in:
Родитель
3ec3470a4e
Коммит
4d5d38be02
|
@ -50,10 +50,6 @@ XCODE_VERSION=11.1
|
|||
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_11.1_GM_Seed.xip
|
||||
XCODE_DEVELOPER_ROOT=/Applications/Xcode111-GM.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)
|
||||
|
@ -139,15 +135,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
|
||||
|
||||
|
|
|
@ -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) \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
NEEDED_MONO_VERSION := 7af64d1ebe9e9ee305cdae8ec5995c9521cbcf19
|
||||
NEEDED_MONO_VERSION := beb9a1b182a14986e836864e5d555c3b5ec52ba0
|
||||
NEEDED_MONO_BRANCH := 2019-06
|
||||
|
||||
MONO_DIRECTORY := mono
|
||||
|
|
|
@ -404,8 +404,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
|
||||
|
||||
|
@ -455,25 +453,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 $$@ $$^
|
||||
|
|
|
@ -548,11 +548,6 @@ function check_xcode () {
|
|||
# must have latest Xcode in /Applications/Xcode<version>.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/.*=//'`
|
||||
|
|
|
@ -93,6 +93,8 @@ namespace Xamarin.Tests
|
|||
var version = Version.Parse (xcode_version);
|
||||
if (version >= max_version)
|
||||
continue;
|
||||
if (version.Major == max_version.Major)
|
||||
continue;
|
||||
if (min_version != null && version < min_version)
|
||||
continue;
|
||||
with_versions.Add (new Tuple<Version, string> (version, path));
|
||||
|
@ -315,7 +317,7 @@ namespace Xamarin.Tests
|
|||
// 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
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace Xamarin.Tests
|
|||
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) {
|
||||
|
|
|
@ -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" />
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||
using NUnit.Framework;
|
||||
|
||||
using Xamarin.Utils;
|
||||
using Xamarin.Tests;
|
||||
|
||||
namespace Xamarin.MMP.Tests
|
||||
{
|
||||
|
@ -59,6 +60,10 @@ namespace Xamarin.MMP.Tests
|
|||
[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,21 @@ namespace Xamarin.MMP.Tests
|
|||
{
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Двоичный файл не отображается.
|
@ -232,10 +232,19 @@ namespace Xamarin
|
|||
}
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче