Skip to content
16 changes: 16 additions & 0 deletions src/tests/Common/CLRTest.CrossGen.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ WARNING: When setting properties based on their current state (for example:
Tests can opt out of ahead-of-time (AOT) compilation from crossgen / crossgen2 by setting this property in their project:

<CrossGenTest>false</CrossGenTest>

Tests can opt out of composite crossgen2 only by setting this property in their project:

<CompositeCrossGenTest>false</CompositeCrossGenTest>
-->
<Target Name="GetCrossgenBashScript">

Expand All @@ -46,6 +50,11 @@ if [ "$(AlwaysUseCrossGen2)" == "true" ]; then
export CompositeBuildMode=1
fi

# CompositeBuildMode is an opt-in by variable presence.
if [ "$(CompositeCrossGenTest)" = "false" ] && [ -n "${CompositeBuildMode+x}" ]; then
unset RunCrossGen2
fi

# CrossGen2 Script
if [ ! -z ${RunCrossGen2+x} ]%3B then
compilationDoneFlagFile="IL-CG2/done"
Expand Down Expand Up @@ -232,6 +241,13 @@ if /i "$(AlwaysUseCrossGen2)" == "true" (
set CompositeBuildMode=1
)

if /i "$(CompositeCrossGenTest)" == "false" (
REM CompositeBuildMode is an opt-in by variable presence.
if defined CompositeBuildMode (
set RunCrossGen2=
)
)

REM CrossGen2 Script
if defined RunCrossGen2 (
set ExtraCrossGen2Args=!ExtraCrossGen2Args! $(CrossGen2TestExtraArguments)
Expand Down
4 changes: 4 additions & 0 deletions src/tests/JIT/jit64/jit64_3.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<CompositeCrossGenTest>false</CompositeCrossGenTest>
Comment thread
jtschuster marked this conversation as resolved.
Outdated
</PropertyGroup>
Comment thread
jtschuster marked this conversation as resolved.

<ItemGroup>
<MergedWrapperProjectReference Include="opt/**/*.??proj" />
</ItemGroup>
Comment thread
jtschuster marked this conversation as resolved.
Expand Down
Loading