[dotnet] Don't use an Output property to retrieve the list of native object files to link. (#11592)

If the task that creates the native object files doesn't execute (because the
native object files already exists and are up-to-date), the resulting list of
native object files to link will be empty.

This typically happens for a rebuild: if a native linker error occurs when
linking the main executable, building again will result in a successful build,
because we wouldn't try to link the main executable again.
This commit is contained in:
Rolf Bjarne Kvinge 2021-05-18 15:13:40 +02:00 коммит произвёл GitHub
Родитель fc52f2c7ff
Коммит 94196bf767
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -545,8 +545,11 @@
SdkRoot="$(_SdkRoot)"
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
>
<Output TaskParameter="ObjectFiles" ItemName="_NativeExecutableObjectFiles" />
</CompileNativeCode>
<ItemGroup>
<_NativeExecutableObjectFiles Include="@(_CompileNativeExecutableFile -> '%(OutputFile)')" />
</ItemGroup>
</Target>
<PropertyGroup>