diff options
author | Joseph Tremoulet <jotrem@microsoft.com> | 2018-01-25 23:30:19 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-02-09 00:47:34 +0300 |
commit | 591c7e199bb6fee2a3ad62d4f28de2676437cb29 (patch) | |
tree | 19e6b353d4d8c717bac186e24f0ad6ccafcb3b4d | |
parent | 8f62b4fed4420f0eaad23f2e2f4311f879f1fce2 (diff) |
Make native trimming optional
Setting LinkerTrimNativeDeps=false will now bypass the FindNativeDeps
task and preserve all native dependencies.
-rw-r--r-- | corebuild/integration/ILLink.Tasks/ILLink.Tasks.targets | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/corebuild/integration/ILLink.Tasks/ILLink.Tasks.targets b/corebuild/integration/ILLink.Tasks/ILLink.Tasks.targets index 39108b87f..3fd4a7880 100644 --- a/corebuild/integration/ILLink.Tasks/ILLink.Tasks.targets +++ b/corebuild/integration/ILLink.Tasks/ILLink.Tasks.targets @@ -24,6 +24,8 @@ <UnusedPlatformAssemblyAction Condition=" '$(UnusedPlatformAssemblyAction)' == '' ">Skip</UnusedPlatformAssemblyAction> <RootAllApplicationAssemblies Condition=" '$(RootAllApplicationAssemblies)' == '' ">true</RootAllApplicationAssemblies> <RootAllApplicationAssemblies Condition=" '$(RootAllApplicationAssemblies)' != 'true' ">false</RootAllApplicationAssemblies> + <LinkerTrimNativeDeps Condition=" '$(LinkerTrimNativeDeps)' == '' ">true</LinkerTrimNativeDeps> + <LinkerTrimNativeDeps Condition=" '$(LinkerTrimNativeDeps)' != 'true' ">false</LinkerTrimNativeDeps> </PropertyGroup> <!-- This depends on LinkDuringPublish, so it needs to be imported @@ -258,11 +260,15 @@ <_NativeDepsToAlwaysKeep Include="hostpolicy.dll;libhostpolicy.dylib;libhostpolicy.so" /> </ItemGroup> - <FindNativeDeps ManagedAssemblyPaths="@(_ManagedLinkedAssemblies)" + <FindNativeDeps Condition=" '$(LinkerTrimNativeDeps)' == 'true' " + ManagedAssemblyPaths="@(_ManagedLinkedAssemblies)" NativeDepsPaths="@(_NativeResolvedDepsToPublish)" NativeDepsToKeep="@(_NativeDepsToAlwaysKeep)"> <Output TaskParameter="KeptNativeDepsPaths" ItemName="_NativeKeptDepsToPublish" /> </FindNativeDeps> + <PropertyGroup> + <_NativeKeptDepsToPublish Condition=" '$(LinkerTrimNativeDeps)' != 'true' ">"@(_NativeResolvedDepsToPublish)"</_NativeKeptDepsToPublish> + </PropertyGroup> </Target> |