Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,26 @@
</PropertyGroup>
</Target>

<Target Name="AddCrossAssemblyOptimizationSwitch"
DependsOnTargets="ResolveProjectReferences"
AfterTargets="ResolveProjectReferences">
<!-- We used to use - -opt-cross-module:* as a switch, but inlining code
from the runtime led to exposing bugs in crossgen/runtime in not rejecting
native code when the inlined code was stale.
To avoid customer facing bugs in C# extension, we are now taking the more
conservative approach of only inlining code from assemblies in the same
"servicing bubble", which we can most closely approximate here by just
inlining code in assemblies that come from project references. -->
<ItemGroup>
<_OptCrossModuleSwitch
Condition="'%(_ResolvedProjectReferencePaths.ReferenceOutputAssembly)'=='true'"
Include="@(_ResolvedProjectReferencePaths->'--opt-cross-module:%(FileName)')" />
</ItemGroup>
<PropertyGroup>
<PublishReadyToRunCrossgen2ExtraArgs>$(PublishReadyToRunCrossgen2ExtraArgs);@(_OptCrossModuleSwitch)</PublishReadyToRunCrossgen2ExtraArgs>
</PropertyGroup>
</Target>

<ItemGroup Label="Project References">
<ProjectReference Include="..\..\Workspaces\MSBuild\Core\Microsoft.CodeAnalysis.Workspaces.MSBuild.csproj" />
<ProjectReference Include="..\..\Workspaces\Remote\Core\Microsoft.CodeAnalysis.Remote.Workspaces.csproj" />
Expand Down
Loading