[mtouch] Look for linker input in the linker flags when parsing linker warnings.

Look for libraries passed to the linker in the linker flags, which is the
canonical location for linker input.
This commit is contained in:
Rolf Bjarne Kvinge 2017-01-25 13:07:37 +01:00
Родитель 69ff0c4486
Коммит 3a8d62008d
3 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -26,6 +26,17 @@ namespace Xamarin.Utils
// tracking). // tracking).
public List<string> Inputs; public List<string> Inputs;
public HashSet<string> AllLibraries {
get {
var rv = new HashSet<string> ();
if (LinkWithLibraries != null)
rv.UnionWith (LinkWithLibraries);
if (ForceLoadLibraries != null)
rv.UnionWith (ForceLoadLibraries);
return rv;
}
}
public void ReferenceSymbol (string symbol) public void ReferenceSymbol (string symbol)
{ {
if (UnresolvedSymbols == null) if (UnresolvedSymbols == null)

Просмотреть файл

@ -1391,7 +1391,7 @@ namespace Xamarin.Bundler {
// this will filter/remove warnings that are not helpful (e.g. complaining about non-matching armv6-6 then armv7-6 on fat binaries) // this will filter/remove warnings that are not helpful (e.g. complaining about non-matching armv6-6 then armv7-6 on fat binaries)
// and turn the remaining of the warnings into MT5203 that MonoDevelop will be able to report as real warnings (not just logs) // and turn the remaining of the warnings into MT5203 that MonoDevelop will be able to report as real warnings (not just logs)
// it will also look for symbol-not-found errors and try to provide useful error messages. // it will also look for symbol-not-found errors and try to provide useful error messages.
public static void ProcessNativeLinkerOutput (Target target, string output, IList<string> inputs, List<Exception> errors, bool error) public static void ProcessNativeLinkerOutput (Target target, string output, IEnumerable<string> inputs, List<Exception> errors, bool error)
{ {
List<string> lines = new List<string> (output.Split (new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)); List<string> lines = new List<string> (output.Split (new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries));

Просмотреть файл

@ -951,7 +951,7 @@ namespace Xamarin.Bundler
var output = new StringBuilder (); var output = new StringBuilder ();
var code = Driver.RunCommand (App.CompilerPath, flags, null, output); var code = Driver.RunCommand (App.CompilerPath, flags, null, output);
Application.ProcessNativeLinkerOutput (this, output.ToString (), link_with, linker_errors, code != 0); Application.ProcessNativeLinkerOutput (this, output.ToString (), linker_flags.AllLibraries, linker_errors, code != 0);
if (code != 0) { if (code != 0) {
// if the build failed - it could be because of missing frameworks / libraries we identified earlier // if the build failed - it could be because of missing frameworks / libraries we identified earlier