Skip to content

Commit f1ce69d

Browse files
committed
[msbuild] Copy custom linker options to Windows
Use the remoted WriteLinesToFile task's CopyToWindows support instead of writing the same custom linker options file a second time locally. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e9d84281-7deb-4b10-9c48-282faafc8f34
1 parent b99253a commit f1ce69d

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

dotnet/targets/Xamarin.Shared.Sdk.targets

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,18 +1086,7 @@
10861086
<WriteLinesToFile
10871087
SessionId="$(BuildSessionId)"
10881088
Condition="'$(IsMacEnabled)' == 'true'"
1089-
File="$(_CustomLinkerOptionsFile)"
1090-
Lines="$(_CustomLinkerOptions)"
1091-
Overwrite="true" />
1092-
1093-
<!--
1094-
When building remotely from Windows, the task above writes the file on the Mac (because it's passed
1095-
a SessionId), but the PrepareAssemblies task isn't remoted, so it needs the file on the local machine
1096-
as well. Write it locally too in that case (the contents are identical, since all the properties are
1097-
evaluated locally in either case).
1098-
-->
1099-
<WriteLinesToFile
1100-
Condition="'$(IsMacEnabled)' == 'true' And '$(BuildSessionId)' != '' And '$(PrepareAssemblies)' == 'true'"
1089+
CopyToWindows="true"
11011090
File="$(_CustomLinkerOptionsFile)"
11021091
Lines="$(_CustomLinkerOptions)"
11031092
Overwrite="true" />

0 commit comments

Comments
 (0)