Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[msbuild] Make sure the build doesn't keep going if the ILLink task fails. #21393

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ Copyright (C) 2011-2013 Xamarin. All rights reserved.
<Output TaskParameter="LinkerOutputItems" ItemName="_XamarinLinkerItems" />
</Xamarin.MacDev.Tasks.ILLink>

<PropertyGroup>
<!-- Sometimes the ILLink task itself fails, in which case the _ILLinkExitCode value won't be set. In this case, set it to a value that will cause the expected error to be shown later on. -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why this is the case? Does ILLink need a fix and if so, is there an issue for it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are any number of reasons the ILLink task may fail for legitimate reasons, an easy one being that the network went down.

<_ILLinkExitCode Condition="'$(_ILLinkExitCode)' == '' And '$(MSBuildLastTaskResult)' != 'true'">-1</_ILLinkExitCode>
</PropertyGroup>
<Touch Files="$(_LinkSemaphore)" AlwaysCreate="true" Condition=" '$(_ILLinkExitCode)' == '0' " />

</Target>
Expand Down