Merge pull request #2040 from rolfbjarne/bug55555
[mtouch] Don't remove information when collecting all architectures. Fixes #55555.
This commit is contained in:
Коммит
63a67b5287
|
@ -211,6 +211,12 @@ namespace Xamarin.Tests
|
|||
if (!HasOutputPattern (linePattern))
|
||||
Assert.Fail (string.Format ("The output does not contain the line '{0}'", linePattern));
|
||||
}
|
||||
|
||||
public void ForAllOutputLines (Action<string> action)
|
||||
{
|
||||
foreach (var line in OutputLines)
|
||||
action (line);
|
||||
}
|
||||
}
|
||||
|
||||
class XBuild
|
||||
|
|
|
@ -95,6 +95,36 @@ namespace Xamarin
|
|||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase ("code sharing 32-bit", "armv7+llvm", new string [] { "@sdk=framework=Xamarin.Sdk", "@all=staticobject" })]
|
||||
[TestCase ("code sharing 64-bit", "arm64+llvm", new string [] { "@sdk=framework=Xamarin.Sdk", "@all=staticobject" })]
|
||||
[TestCase ("32-bit", "armv7+llvm", new string [] { } )]
|
||||
[TestCase ("64-bit", "arm64+llvm", new string [] { })]
|
||||
public void CodeSharingLLVM (string name, string abi, string[] assembly_build_targets)
|
||||
{
|
||||
using (var mtouch = new MTouchTool ()) {
|
||||
mtouch.CreateTemporaryApp ();
|
||||
mtouch.CreateTemporaryCacheDirectory ();
|
||||
mtouch.Abi = abi;
|
||||
mtouch.AssemblyBuildTargets.AddRange (assembly_build_targets);
|
||||
mtouch.Debug = false;
|
||||
mtouch.NoStrip = true; // faster test
|
||||
mtouch.NoSymbolStrip = string.Empty; // faster test
|
||||
mtouch.Verbosity = 4; // This is needed to get mtouch to print the output we're verifying
|
||||
mtouch.AssertExecute (MTouchAction.BuildDev, "build");
|
||||
// Check that --llvm is passed to the AOT compiler for every assembly we AOT.
|
||||
var assemblies_checked = 0;
|
||||
mtouch.ForAllOutputLines ((line) =>
|
||||
{
|
||||
if (!line.Contains ("arm-darwin-mono-sgen") && !line.Contains ("arm64-darwin-mono-sgen"))
|
||||
return;
|
||||
StringAssert.Contains (" --llvm ", line, "aot command must pass --llvm to the AOT compiler");
|
||||
assemblies_checked++;
|
||||
});
|
||||
Assert.That (assemblies_checked, Is.AtLeast (4), "We build at least 4, so we must have had at least 4 asserts above."); // mscorlib.dll, Xamarin.iOS.dll, System.dll, theApp.exe
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase ("single", "", false)]
|
||||
[TestCase ("dual", "armv7,arm64", false)]
|
||||
|
|
|
@ -89,6 +89,7 @@ namespace Xamarin
|
|||
public bool? MSym;
|
||||
public bool? DSym;
|
||||
public bool? NoStrip;
|
||||
public string NoSymbolStrip;
|
||||
public string Mono;
|
||||
public string GccFlags;
|
||||
|
||||
|
@ -222,6 +223,14 @@ namespace Xamarin
|
|||
if (NoStrip.HasValue && NoStrip.Value)
|
||||
sb.Append (" --nostrip");
|
||||
|
||||
if (NoSymbolStrip != null) {
|
||||
if (NoSymbolStrip.Length == 0) {
|
||||
sb.Append (" --nosymbolstrip");
|
||||
} else {
|
||||
sb.Append (" --nosymbolstrip:").Append (NoSymbolStrip);
|
||||
}
|
||||
}
|
||||
|
||||
if (MSym.HasValue)
|
||||
sb.Append (" --msym:").Append (MSym.Value ? "true" : "false");
|
||||
|
||||
|
|
|
@ -502,10 +502,10 @@ namespace Xamarin.Bundler {
|
|||
if (all_architectures == null) {
|
||||
all_architectures = new HashSet<Abi> ();
|
||||
foreach (var abi in abis)
|
||||
all_architectures.Add (abi & Abi.ArchMask);
|
||||
all_architectures.Add (abi);
|
||||
foreach (var ext in AppExtensions) {
|
||||
foreach (var abi in ext.Abis)
|
||||
all_architectures.Add (abi & Abi.ArchMask);
|
||||
all_architectures.Add (abi);
|
||||
}
|
||||
}
|
||||
return all_architectures;
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace Xamarin.Bundler
|
|||
foreach (var abi in App.AllArchitectures) {
|
||||
var a = abi & mask;
|
||||
if (a != 0)
|
||||
all_architectures.Add (a);
|
||||
all_architectures.Add (abi);
|
||||
}
|
||||
}
|
||||
return all_architectures;
|
||||
|
@ -1453,6 +1453,12 @@ namespace Xamarin.Bundler
|
|||
linker_flags.AddOtherFlag ("-fapplication-extension");
|
||||
}
|
||||
|
||||
if (App.HasFrameworks && Is64Build) {
|
||||
// Work around https://bugzilla.xamarin.com/show_bug.cgi?id=55553
|
||||
// This option was introduced in Xcode 5.1, so no need for Xcode version checks.
|
||||
linker_flags.AddOtherFlag ("-Wl,-ignore_optimization_hints");
|
||||
}
|
||||
|
||||
link_task = new NativeLinkTask
|
||||
{
|
||||
Target = this,
|
||||
|
|
Загрузка…
Ссылка в новой задаче