Skip to content

Commit 70d0ecb

Browse files
committed
[.NET] Avoid exporting to duplicate architectures
Use a `HashSet` to avoid adding duplicate architectures on exporting. It seems we were adding `x86_64` and `arm64` twice to macOS exports because they are also included in the features.
1 parent 30456ba commit 70d0ecb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ private void _ExportBeginImpl(string[] features, bool isDebug, string path, long
191191
BuildConfig = isDebug ? "ExportDebug" : "ExportRelease",
192192
IncludeDebugSymbols = (bool)GetOption("dotnet/include_debug_symbols"),
193193
RidOS = DetermineRuntimeIdentifierOS(platform, useAndroidLinuxBionic),
194-
Archs = new List<string>(),
194+
Archs = [],
195195
UseTempDir = platform != OS.Platforms.iOS, // xcode project links directly to files in the publish dir, so use one that sticks around.
196196
BundleOutputs = true,
197197
};
@@ -232,7 +232,7 @@ private void _ExportBeginImpl(string[] features, bool isDebug, string path, long
232232
targets.Add(new PublishConfig
233233
{
234234
BuildConfig = publishConfig.BuildConfig,
235-
Archs = new List<string> { "arm64", "x86_64" },
235+
Archs = ["arm64", "x86_64"],
236236
BundleOutputs = false,
237237
IncludeDebugSymbols = publishConfig.IncludeDebugSymbols,
238238
RidOS = OS.DotNetOS.iOSSimulator,
@@ -555,7 +555,7 @@ private struct PublishConfig
555555
public bool UseTempDir;
556556
public bool BundleOutputs;
557557
public string RidOS;
558-
public List<string> Archs;
558+
public HashSet<string> Archs;
559559
public string BuildConfig;
560560
public bool IncludeDebugSymbols;
561561
}

0 commit comments

Comments
 (0)