diff options
author | Eugene Rozenfeld <erozen@microsoft.com> | 2018-02-23 05:24:18 +0300 |
---|---|---|
committer | Stephen Toub <stoub@microsoft.com> | 2018-02-23 05:24:18 +0300 |
commit | 173d9e637b267f2e624fee9f678d448df1b3e6e4 (patch) | |
tree | 36037f2d287995035c459494c6a0d32bf2c7c383 /illink.targets | |
parent | 064a638f3c7a498e4c633a95cbc8d945a8ec4aa5 (diff) |
Enable clearing initlocals when running dotnet msbuild. (#27345)
* Enable clearing initlocals when running dotnet msbuild.
Linker step to clear initlocals was only enabled in Windows builds that use
desktop msbuild. dotnet msbuild has a bug in assembly loading: https://github.com/Microsoft/msbuild/issues/3016
that was preventing ILLink.CustomSteps from loading by a Type.GetType() call. This PR adds a workaround by
appending ILLink.CustomSteps version to the string that is eventually passed to Type.GetType().
* Make the setting of ILLinkClearInitLocals in System.Net.Sockets conditional on it being the Windows build.
Diffstat (limited to 'illink.targets')
-rw-r--r-- | illink.targets | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/illink.targets b/illink.targets index 6d3b451197..440c06f59c 100644 --- a/illink.targets +++ b/illink.targets @@ -72,8 +72,8 @@ <!-- reflection heuristics to apply --> <ILLinkArgs>$(ILLinkArgs) -h LdtokenTypeMethods,InstanceConstructors</ILLinkArgs> <!-- add a linker step to clear initlocals flag on all assemblies before the output step --> - <!-- TODO Issue #27045: Remove the OS-specific condition once the custom step runs on Unix --> - <ILLinkArgs Condition="'$(ILLinkClearInitLocals)' == 'true' AND '$(OS)' == 'Windows_NT'">$(ILLinkArgs) -s ILLink.CustomSteps.ClearInitLocalsStep,ILLink.CustomSteps:OutputStep</ILLinkArgs> + <!-- version of ILLink.CustomSteps is passed as a workaround for msbuild issue #3016 --> + <ILLinkArgs Condition="'$(ILLinkClearInitLocals)' == 'true'">$(ILLinkArgs) -s ILLink.CustomSteps.ClearInitLocalsStep,ILLink.CustomSteps,Version=0.0.0.0:OutputStep</ILLinkArgs> </PropertyGroup> <MakeDir Directories="$(ILLinkTrimInputPath)" /> |