Skip to content

Commit d927d09

Browse files
committed
Expect the unexpected, DTB doesn't specify any ABIs
1 parent 261ce40 commit d927d09

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Xamarin.Android.Build.Tasks/Utilities/ELFEmbeddingHelper.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.IO;
44
using System.Text;
55

6+
using Microsoft.Android.Build.Tasks;
67
using Microsoft.Build.Framework;
78
using Microsoft.Build.Utilities;
89
using Xamarin.Android.Tools;
@@ -67,12 +68,13 @@ public static List<ITaskItem> EmbedBinary (
6768
string outputDirectory,
6869
bool missingContentOK)
6970
{
71+
var ret = new List<ITaskItem> ();
7072
if (supportedAbis.Count < 1) {
71-
throw new ArgumentException ("At least one target ABI must be present", nameof (supportedAbis));
73+
log.LogDebugMessage ("ELFEmbeddingHelper: at least one target ABI must be specified. Probably a DTB build, skipping generation.");
74+
return ret;
7275
}
7376

7477
string llvmMcPath = GetLlvmMcPath (androidBinUtilsDirectory);
75-
var ret = new List<ITaskItem> ();
7678
foreach (string abi in supportedAbis) {
7779
EmbedBinary (
7880
log,
@@ -98,11 +100,12 @@ public static List<ITaskItem> EmbedBinary (
98100
string outputDirectory,
99101
bool missingContentOK)
100102
{
103+
var ret = new List<ITaskItem> ();
101104
if (String.IsNullOrEmpty (abi)) {
102-
throw new ArgumentException ("Must be a supported ABI name", nameof (abi));
105+
log.LogDebugMessage ("ELFEmbeddingHelper: ABI must be specified. Probably a DTB build, skipping generation.");
106+
return ret;
103107
}
104108

105-
var ret = new List<ITaskItem> ();
106109
EmbedBinary (
107110
log,
108111
ret,

0 commit comments

Comments
 (0)