File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 8282 </PropertyGroup >
8383 </Target >
8484
85+ <Target Name =" AddCrossAssemblyOptimizationSwitch"
86+ DependsOnTargets =" ResolveProjectReferences"
87+ AfterTargets =" ResolveProjectReferences" >
88+ <!-- We used to use - -opt-cross-module:* as a switch, but inlining code
89+ from the runtime led to exposing bugs in crossgen/runtime in not rejecting
90+ native code when the inlined code was stale.
91+ To avoid customer facing bugs in C# extension, we are now taking the more
92+ conservative approach of only inlining code from assemblies in the same
93+ "servicing bubble", which we can most closely approximate here by just
94+ inlining code in assemblies that come from project references. -->
95+ <ItemGroup >
96+ <_OptCrossModuleSwitch
97+ Condition =" '%(_ResolvedProjectReferencePaths.ReferenceOutputAssembly)'=='true'"
98+ Include =" @(_ResolvedProjectReferencePaths->'--opt-cross-module:%(FileName)')" />
99+ </ItemGroup >
100+ <PropertyGroup >
101+ <PublishReadyToRunCrossgen2ExtraArgs >$(PublishReadyToRunCrossgen2ExtraArgs);@(_OptCrossModuleSwitch)</PublishReadyToRunCrossgen2ExtraArgs >
102+ </PropertyGroup >
103+ </Target >
104+
85105 <ItemGroup Label =" Project References" >
86106 <ProjectReference Include =" ..\..\Workspaces\MSBuild\Core\Microsoft.CodeAnalysis.Workspaces.MSBuild.csproj" />
87107 <ProjectReference Include =" ..\..\Workspaces\Remote\Core\Microsoft.CodeAnalysis.Remote.Workspaces.csproj" />
You can’t perform that action at this time.
0 commit comments