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

Make InstallRuntimeComponentToFinalDestination use NativeOutputPath for copying to runtime output #100782

Merged
merged 2 commits into from
Apr 9, 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
18 changes: 9 additions & 9 deletions src/native/managed/native-library.targets
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
</Target>

<Target Name="StripLibraryLikeCoreCLRBuild"
DependsOnTargets="SetupOSSpecificProps;CopyNativeBinary;StripLibraryLikeCoreCLRSetupPaths"
DependsOnTargets="SetupOSSpecificProps;LinkNative;StripLibraryLikeCoreCLRSetupPaths"
Condition="'$(IsRuntimeComponent)' == 'true' and '$(TargetsWindows)' != 'true'"
Inputs="$(PublishDir)$(TargetName)$(NativeBinaryExt)"
Inputs="$(NativeOutputPath)$(TargetName)$(NativeBinaryExt)"
Outputs="$(StripSourceFile);$(StripDestinationFile)">
<Error Text="Do not set StripSymbols to true - runtime components stripping is controlled by native-library.targets" Condition="'$(StripSymbols)' == 'true'" />

<Message Importance="Normal" Text="Stripping $(PublishDir)$(TargetName)$(NativeBinaryExt) into $(StripSourceFile) and $(StripDestinationFile)" />
<Message Importance="Normal" Text="Stripping $(NativeOutputPath)$(TargetName)$(NativeBinaryExt) into $(StripSourceFile) and $(StripDestinationFile)" />

<!-- copy from the published/ subfolder to the stripped/ subfolder -->
<Copy SourceFiles="$(PublishDir)$(TargetName)$(NativeBinaryExt)"
<!-- copy from the native/ subfolder to the stripped/ subfolder -->
<Copy SourceFiles="$(NativeOutputPath)$(TargetName)$(NativeBinaryExt)"
DestinationFolder="$(StrippedOutputPath)"
SkipUnchangedFiles="true" />

Expand All @@ -68,8 +68,8 @@
</Target>

<Target Name="InstallRuntimeComponentToFinalDestination"
AfterTargets="CopyNativeBinary"
DependsOnTargets="CopyNativeBinary;StripLibraryLikeCoreCLRBuild" Condition="'$(IsRuntimeComponent)' == 'true'">
AfterTargets="LinkNative"
DependsOnTargets="LinkNative;StripLibraryLikeCoreCLRBuild" Condition="'$(IsRuntimeComponent)' == 'true'">
<Error Text="Set at least one @InstallRuntimeComponentDestination item" Condition="@(InstallRuntimeComponentDestination->Count()) == 0" />

<PropertyGroup>
Expand All @@ -87,8 +87,8 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<CopyFinalFiles Include="$(PublishDir)$(TargetName)$(NativeBinaryExt)" />
<CopyFinalFilesPDB Include="$(PublishDir)$(TargetName).pdb" />
<CopyFinalFiles Include="$(NativeOutputPath)$(TargetName)$(NativeBinaryExt)" />
<CopyFinalFilesPDB Include="$(NativeOutputPath)$(TargetName).pdb" />
</ItemGroup>

<Message Importance="Normal" Text="Installing @(CopyFinalFiles) into %(_NormalizedInstallRuntimeComponentDest.Identity)"/>
Expand Down
Loading