未验证 提交 375fec27 编写于 作者: M Manish Godse 提交者: GitHub

exclude crossgen from build. (#53458)

* excluding crossgen from build.

* Fix cross-component build break

* Fix tests to not use crossgen

* more test fixes.

* switching R2R jobs to use cg2 by default

* switch helix runs to use crossgen2
上级 3852a779
......@@ -102,7 +102,8 @@ jobs:
- ${{ if eq(parameters.readyToRun, true) }}:
- name: crossgenArg
value: 'crossgen'
# Switch R2R to use cg2 by default
value: 'crossgen2'
- name: LogNamePrefix
value: TestRunLogs_R2R
- ${{ if eq(parameters.crossgen2, true) }}:
......
......@@ -13,14 +13,6 @@ if (CLR_CMAKE_HOST_OS STREQUAL CLR_CMAKE_TARGET_OS)
COMPONENT crosscomponents
)
if(CLR_CMAKE_HOST_LINUX OR NOT FEATURE_CROSSBITNESS)
install_clr (TARGETS
crossgen
DESTINATIONS . sharedFramework
COMPONENT crosscomponents
)
endif()
if(CLR_CMAKE_TARGET_OSX AND ARCH_TARGET_NAME STREQUAL arm64)
install_clr (TARGETS
clrjit_unix_osx_${ARCH_TARGET_NAME}_${ARCH_HOST_NAME}
......
add_subdirectory(crossgen)
if (CLR_CMAKE_TARGET_WIN32 AND NOT CLR_CMAKE_CROSS_ARCH)
add_subdirectory(GenClrDebugResource)
add_subdirectory(InjectResource)
......
......@@ -37,7 +37,7 @@ WARNING: When setting properties based on their current state (for example:
<![CDATA[
if [ "$(AlwaysUseCrossGen2)" == "true" ]; then
export RunCrossGen=
unset RunCrossGen
export RunCrossGen2=1
export CompositeBuildMode=1
fi
......
......@@ -254,7 +254,7 @@
<HelixPreCommand Include="set CORE_ROOT=%HELIX_CORRELATION_PAYLOAD%" />
<!-- Set _NT_SYMBOL_PATH so VM _ASSERTE() asserts can find the symbol files when doing stack walks -->
<HelixPreCommand Include="set _NT_SYMBOL_PATH=%HELIX_CORRELATION_PAYLOAD%\PDB" />
<HelixPreCommand Include="set RunCrossGen=1" Condition=" '$(RunCrossGen)' == 'true' " />
<HelixPreCommand Include="set RunCrossGen2=1" Condition=" '$(RunCrossGen)' == 'true' " />
<HelixPreCommand Include="set RunCrossGen2=1" Condition=" '$(RunCrossGen2)' == 'true' " />
<HelixPreCommand Include="set CompositeBuildMode=1" Condition=" '$(CompositeBuildMode)' == 'true' " />
<HelixPreCommand Include="set RunningLongGCTests=1" Condition=" '$(LongRunningGCTests)' == 'true' " />
......@@ -270,7 +270,7 @@
<ItemGroup Condition=" '$(TestWrapperTargetsWindows)' != 'true' ">
<HelixPreCommand Include="export CORE_ROOT=$HELIX_CORRELATION_PAYLOAD" />
<HelixPreCommand Include="export RunCrossGen=1" Condition=" '$(RunCrossGen)' == 'true' " />
<HelixPreCommand Include="export RunCrossGen2=1" Condition=" '$(RunCrossGen)' == 'true' " />
<HelixPreCommand Include="export RunCrossGen2=1" Condition=" '$(RunCrossGen2)' == 'true' " />
<HelixPreCommand Include="export CompositeBuildMode=1" Condition=" '$(CompositeBuildMode)' == 'true' " />
<HelixPreCommand Include="export RunningLongGCTests=1" Condition=" '$(LongRunningGCTests)' == 'true' " />
......
......@@ -22,13 +22,13 @@
<CLRTestBatchPreCommands><![CDATA[
$(CLRTestBatchPreCommands)
mkdir r2r
"%CORE_ROOT%\crossgen" -ReadyToRun -Platform_Assemblies_Paths "%CORE_ROOT%" -out r2r\$(MSBuildProjectName).dll $(MSBuildProjectName).dll
"%CORE_ROOT%\corerun" %CORE_ROOT%\crossgen2\crossgen2.dll --out r2r\$(MSBuildProjectName).dll $(MSBuildProjectName).dll -r %CORE_ROOT%\*.dll
set CLRCustomTestLauncher=RunBasicTestWithMcj.cmd --runCustomTest
]]></CLRTestBatchPreCommands>
<BashCLRTestPreCommands><![CDATA[
$(BashCLRTestPreCommands)
mkdir r2r
"$CORE_ROOT/crossgen" -ReadyToRun -Platform_Assemblies_Paths "$CORE_ROOT" -out r2r/$(MSBuildProjectName).dll $(MSBuildProjectName).dll
"$CORE_ROOT/corerun" $CORE_ROOT/crossgen2/crossgen2.dll --out r2r/$(MSBuildProjectName).dll $(MSBuildProjectName).dll -r $CORE_ROOT/*.dll
chmod +x ./RunBasicTestWithMcj.sh
export CLRCustomTestLauncher="./RunBasicTestWithMcj.sh --runCustomTest"
]]></BashCLRTestPreCommands>
......
......@@ -27,11 +27,9 @@ if not exist test.dll (
echo FAILED to copy test.dll
exit /b 1
)
if defined RunCrossGen2 (
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:test.ni.dll test.dll
) else (
%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out test.ni.dll test.dll
)
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:test.ni.dll test.dll
set CrossGenStatus=!ERRORLEVEL!
IF NOT !CrossGenStatus!==0 (
ECHO Crossgen failed with exitcode - !CrossGenStatus!
......@@ -41,11 +39,9 @@ if not exist test.ni.dll (
echo FAILED to build test.ni.dll
exit /b 1
)
if defined RunCrossGen2 (
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:fieldgetter.ni.dll fieldgetter.dll
) else (
%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out fieldgetter.ni.dll fieldgetter.dll
)
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:fieldgetter.ni.dll fieldgetter.dll
set CrossGenStatus=!ERRORLEVEL!
IF NOT !CrossGenStatus!==0 (
ECHO Crossgen failed with exitcode - !CrossGenStatus!
......@@ -55,11 +51,9 @@ if not exist fieldgetter.ni.dll (
echo FAILED to build fieldgetter.ni.dll
exit /b 1
)
if defined RunCrossGen2 (
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:mainv1.ni.dll mainv1.dll
) else (
%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out mainv1.ni.dll mainv1.dll
)
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:mainv1.ni.dll mainv1.dll
set CrossGenStatus=!ERRORLEVEL!
IF NOT !CrossGenStatus!==0 (
ECHO Crossgen failed with exitcode - !CrossGenStatus!
......@@ -84,11 +78,8 @@ then
echo Failed to copy test.dll
exit 1
fi
if [ ! -z "$RunCrossGen2" ]; then
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll -r:$CORE_ROOT/*.dll -r:`pwd` -o:test.ni.dll test.dll
else
$CORE_ROOT/crossgen -readytorun -platform_assemblies_paths $CORE_ROOT:`pwd` -out test.ni.dll test.dll
fi
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll -r:$CORE_ROOT/*.dll -r:`pwd` -o:test.ni.dll test.dll
__cgExitCode=$?
if [ $__cgExitCode -ne 0 ]
then
......@@ -100,11 +91,9 @@ then
echo Failed to build test.ni.dll
exit 1
fi
if [ ! -z "$RunCrossGen2" ]; then
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll -r:$CORE_ROOT/*.dll -r:`pwd` -o:fieldgetter.ni.dll fieldgetter.dll
else
$CORE_ROOT/crossgen -readytorun -platform_assemblies_paths $CORE_ROOT:`pwd` -out fieldgetter.ni.dll fieldgetter.dll
fi
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll -r:$CORE_ROOT/*.dll -r:`pwd` -o:fieldgetter.ni.dll fieldgetter.dll
__cgExitCode=$?
if [ $__cgExitCode -ne 0 ]
then
......@@ -116,11 +105,9 @@ then
echo Failed to build fieldgetter.ni.dll
exit 1
fi
if [ ! -z "$RunCrossGen2" ]; then
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll -r:$CORE_ROOT/*.dll -r:`pwd` -o:mainv1.ni.dll mainv1.dll
else
$CORE_ROOT/crossgen -readytorun -platform_assemblies_paths $CORE_ROOT:`pwd` -out mainv1.ni.dll mainv1.dll
fi
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll -r:$CORE_ROOT/*.dll -r:`pwd` -o:mainv1.ni.dll mainv1.dll
__cgExitCode=$?
if [ $__cgExitCode -ne 0 ]
then
......
......@@ -25,11 +25,9 @@ if not exist test.dll (
echo FAILED to copy test.dll
exit /b 1
)
if defined RunCrossGen2 (
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:mainv2.ni.dll mainv2.dll
) else (
%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out mainv2.ni.dll mainv2.dll
)
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:mainv2.ni.dll mainv2.dll
set CrossGenStatus=!ERRORLEVEL!
IF NOT !CrossGenStatus!==0 (
ECHO Crossgen failed with exitcode - !CrossGenStatus!
......@@ -39,11 +37,9 @@ if not exist mainv2.ni.dll (
echo FAILED to build mainv2.ni.dll
exit /b 1
)
if defined RunCrossGen2 (
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:fieldgetter.ni.dll fieldgetter.dll
) else (
%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out fieldgetter.ni.dll fieldgetter.dll
)
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:fieldgetter.ni.dll fieldgetter.dll
set CrossGenStatus=!ERRORLEVEL!
IF NOT !CrossGenStatus!==0 (
ECHO Crossgen failed with exitcode - !CrossGenStatus!
......@@ -63,11 +59,9 @@ if not exist test.dll (
echo FAILED to copy test.dll
exit /b 1
)
if defined RunCrossGen2 (
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:test.ni.dll test.dll
) else (
%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out test.ni.dll test.dll
)
%Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:test.ni.dll test.dll
set CrossGenStatus=!ERRORLEVEL!
IF NOT !CrossGenStatus!==0 (
ECHO Crossgen failed with exitcode - !CrossGenStatus!
......@@ -92,11 +86,9 @@ then
echo Failed to copy test.dll
exit 1
fi
if [ ! -z "$RunCrossGen2" ]; then
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll -r:$CORE_ROOT/*.dll -r:`pwd` -o:mainv2.ni.dll mainv2.dll
else
$CORE_ROOT/crossgen -readytorun -platform_assemblies_paths $CORE_ROOT:`pwd` -out mainv2.ni.dll mainv2.dll
fi
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll -r:$CORE_ROOT/*.dll -r:`pwd` -o:mainv2.ni.dll mainv2.dll
__cgExitCode=$?
if [ $__cgExitCode -ne 0 ]
then
......@@ -108,11 +100,9 @@ then
echo Failed to build mainv2.ni.dll
exit 1
fi
if [ ! -z "$RunCrossGen2" ]; then
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll -r:$CORE_ROOT/*.dll -r:`pwd` -o:fieldgetter.ni.dll fieldgetter.dll
else
$CORE_ROOT/crossgen -readytorun -platform_assemblies_paths $CORE_ROOT:`pwd` -out fieldgetter.ni.dll fieldgetter.dll
fi
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll -r:$CORE_ROOT/*.dll -r:`pwd` -o:fieldgetter.ni.dll fieldgetter.dll
__cgExitCode=$?
if [ $__cgExitCode -ne 0 ]
then
......@@ -136,11 +126,9 @@ then
echo Failed to copy test.dll
exit 1
fi
if [ ! -z "$RunCrossGen2" ]; then
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll -r:$CORE_ROOT/*.dll -r:`pwd` -o:test.ni.dll test.dll
else
$CORE_ROOT/crossgen -readytorun -platform_assemblies_paths $CORE_ROOT:`pwd` -out test.ni.dll test.dll
fi
$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll -r:$CORE_ROOT/*.dll -r:`pwd` -o:test.ni.dll test.dll
__cgExitCode=$?
if [ $__cgExitCode -ne 0 ]
then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册