Skip to content

Commit 94afe43

Browse files
committed
Fix the build
1 parent 9caa69a commit 94afe43

2 files changed

Lines changed: 18 additions & 15 deletions

File tree

src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<Compile Remove="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\LinkerOptions.cs" />
2929

3030
<!--Steps that are upstreamed, these are OK to remove-->
31+
<Compile Remove="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\AddKeepAlivesStep.cs" />
3132
<Compile Remove="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\ApplyPreserveAttribute.cs" />
3233
<Compile Remove="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\OutputStepWithTimestamps.cs" />
3334
<Compile Remove="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\PreserveCode.cs" />

src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/Extensions.cs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,30 @@ public static object GetSettableValue (this CustomAttributeArgument arg)
4646
return td != null ? td.FullName + "," + td.Module.Assembly.FullName : arg.Value;
4747
}
4848

49+
#if !NETCOREAPP
4950
public static AssemblyDefinition GetAssembly (this LinkContext context, string assemblyName)
5051
{
5152
AssemblyDefinition ad;
5253
context.TryGetLinkedAssembly (assemblyName, out ad);
5354
return ad;
5455
}
5556

57+
public static TypeDefinition GetType (this LinkContext context, string assemblyName, string typeName)
58+
{
59+
AssemblyDefinition ad = context.GetAssembly (assemblyName);
60+
return ad == null ? null : GetType (ad, typeName);
61+
}
62+
63+
public static MethodDefinition GetMethod (this LinkContext context, string ns, string typeName, string name, string [] parameters)
64+
{
65+
var type = context.GetType (ns, typeName);
66+
if (type == null)
67+
return null;
68+
69+
return GetMethod (type, name, parameters);
70+
}
71+
#endif
72+
5673
public static MethodDefinition GetMethod (TypeDefinition td, string name)
5774
{
5875
MethodDefinition method = null;
@@ -66,15 +83,6 @@ public static MethodDefinition GetMethod (TypeDefinition td, string name)
6683
return method;
6784
}
6885

69-
public static MethodDefinition GetMethod (this LinkContext context, string ns, string typeName, string name, string [] parameters)
70-
{
71-
var type = context.GetType (ns, typeName);
72-
if (type == null)
73-
return null;
74-
75-
return GetMethod (type, name, parameters);
76-
}
77-
7886
public static MethodDefinition GetMethod (TypeDefinition type, string name, string [] parameters)
7987
{
8088
MethodDefinition method = null;
@@ -103,12 +111,6 @@ public static MethodDefinition GetMethod (TypeDefinition type, string name, stri
103111
return method;
104112
}
105113

106-
public static TypeDefinition GetType (this LinkContext context, string assemblyName, string typeName)
107-
{
108-
AssemblyDefinition ad = context.GetAssembly (assemblyName);
109-
return ad == null ? null : GetType (ad, typeName);
110-
}
111-
112114
public static TypeDefinition GetType (AssemblyDefinition assembly, string typeName)
113115
{
114116
return assembly.MainModule.GetType (typeName);

0 commit comments

Comments
 (0)