Skip to content

Commit

Permalink
Make RyuJIT/arm32 the default arm32 JIT
Browse files Browse the repository at this point in the history
RyuJIT/arm32 JIT is now named clrjit.dll (was named protojit.dll).

arm32 LEGACY_BACKEND JIT is now named legacyjit.dll (was named clrjit.dll).

Ubuntu and Tizen testing now use RyuJIT/arm32.

Tests failing for legacy backend are now excluded with `LEGACYJIT_JITSTRESS_FAIL`,
`LEGACYJIT_GCSTRESS_FAIL`, and `LEGACYJIT_FAIL`.
  • Loading branch information
BruceForstall committed Dec 13, 2017
1 parent 802423d commit e7660e3
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 101 deletions.
17 changes: 10 additions & 7 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ set __BuildTests=1
set __BuildPackages=1
set __BuildNativeCoreLib=1
set __RestoreOptData=1
set __AltJitCrossgen=0
set __CrossgenAltJit=

@REM CMD has a nasty habit of eating "=" on the argument list, so passing:
@REM -priority=1
Expand Down Expand Up @@ -207,7 +207,10 @@ if /i "%1" == "-enforcepgo" (set __EnforcePgo=1&set processedArgs=!proc
if /i "%1" == "-nopgooptimize" (set __PgoOptimize=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-ibcinstrument" (set __IbcTuning=/Tuning&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-toolset_dir" (set __ToolsetDir=%2&set __PassThroughArgs=%__PassThroughArgs% %2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
if /i "%1" == "-altjitcrossgen" (set __AltJitCrossgen=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-crossgenaltjit" (set __CrossgenAltJit=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)

REM Temporarily eat old -altjitcrossgen flag until CI system is updated.
if /i "%1" == "-altjitcrossgen" (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)

REM TODO these are deprecated remove them eventually
REM don't add more, use the - syntax instead
Expand Down Expand Up @@ -629,14 +632,14 @@ if %__BuildNativeCoreLib% EQU 1 (
REM End HACK
)

if %__AltJitCrossgen% EQU 1 (
if defined __CrossgenAltJit (
REM Set altjit flags for the crossgen run. Note that this entire crossgen section is within a setlocal/endlocal scope,
REM so we don't need to save or unset these afterwards.
echo %__MsgPrefix%Setting altjit environment variables.
echo %__MsgPrefix%Setting altjit environment variables. >> "%__CrossGenCoreLibLog%"
echo %__MsgPrefix%Setting altjit environment variables for %__CrossgenAltJit%.
echo %__MsgPrefix%Setting altjit environment variables for %__CrossgenAltJit%. >> "%__CrossGenCoreLibLog%"
set COMPlus_AltJit=*
set COMPlus_AltJitNgen=*
set COMPlus_AltJitName=protojit.dll
set COMPlus_AltJitName=%__CrossgenAltJit%
set COMPlus_AltJitAssertOnNYI=1
set COMPlus_NoGuiOnAssert=1
set COMPlus_ContinueOnAssert=0
Expand Down Expand Up @@ -856,7 +859,7 @@ echo -disableoss: Disable Open Source Signing for System.Private.CoreLib.
echo -priority=^<N^> : specify a set of test that will be built and run, with priority N.
echo -officialbuildid=^<ID^>: specify the official build ID to be used by this build.
echo -Rebuild: passes /t:rebuild to the build projects.
echo -altjitcrossgen: run crossgen using altjit ^(used for JIT testing^).
echo -crossgenaltjit ^<JIT dll^>: run crossgen using specified altjit ^(used for JIT testing^).
echo portable : build for portable RID.
echo.
echo If "all" is specified, then all build architectures and types are built. If, in addition,
Expand Down
2 changes: 1 addition & 1 deletion crosscomponents.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ add_definitions(-DCROSS_COMPILE)
set (CLR_CROSS_COMPONENTS_LIST
crossgen
clrjit
protojit
legacyjit
)

if(NOT CLR_CMAKE_PLATFORM_LINUX)
Expand Down
95 changes: 47 additions & 48 deletions netci.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,6 @@ def static getJobName(def configuration, def architecture, def os, def scenario,
}
break
case 'arm':
baseName = architecture.toLowerCase() + '_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
break
case 'armlb':
// These are cross builds
if (os == 'Tizen') {
// ABI: softfp
Expand All @@ -608,6 +605,9 @@ def static getJobName(def configuration, def architecture, def os, def scenario,
baseName = architecture.toLowerCase() + '_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
}
break
case 'armlb':
baseName = architecture.toLowerCase() + '_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
break
case 'x86':
case 'x86_arm_altjit':
case 'x64_arm64_altjit':
Expand Down Expand Up @@ -1138,42 +1138,43 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
switch (os) {
case 'Ubuntu':
case 'Ubuntu16.04':
if (architecture == 'armlb') { // Ubuntu arm is only for armlb currently
assert scenario == 'default'
job.with {
publishers {
azureVMAgentPostBuildAction {
agentPostBuildAction('Delete agent if the build was not successful (when idle).')
}
if (architecture == 'armlb') { // No arm legacy backend testing for Ubuntu
break
}
assert scenario == 'default'
job.with {
publishers {
azureVMAgentPostBuildAction {
agentPostBuildAction('Delete agent if the build was not successful (when idle).')
}
}
if ((os == 'Ubuntu' && configuration == 'Debug') || (os == 'Ubuntu16.04' && configuration == 'Debug')) {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Innerloop Build")
}
else {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build",
}
if (configuration == 'Debug') {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Innerloop Build")
}
else {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build",
"(?i).*test\\W+${os}\\W+${architecture}\\W+Cross\\W+${configuration}\\W+Build.*")
}
}
break
case 'Tizen':
if (architecture == 'armlb') { // Tizen armel is only for armlb currently
architecture='armel'
job.with {
publishers {
azureVMAgentPostBuildAction {
agentPostBuildAction('Delete agent if the build was not successful (when idle).')
}
if (architecture == 'armlb') { // No arm legacy backend testing for Tizen armel
break
}
architecture='armel'
job.with {
publishers {
azureVMAgentPostBuildAction {
agentPostBuildAction('Delete agent if the build was not successful (when idle).')
}
}
// Removing the regex will cause this to run on each PR.
if (configuration == 'Checked') {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Innerloop Build and Test")
}
else {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build",
}
if (configuration == 'Checked') {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Innerloop Build and Test")
}
else {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build",
"(?i).*test\\W+${os}\\W+${architecture}\\W+Cross\\W+${configuration}\\W+Build.*")
}
}
break
case 'Windows_NT':
Expand Down Expand Up @@ -1637,11 +1638,11 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR

def buildArchitecture = 'arm'

// For 'arm' (the RyuJIT/arm32 architecture), tell build.cmd to use RyuJIT/arm32 for crossgen compilation.
// RyuJIT/arm32 is currently not the default JIT; it is an aljit. So, this is a special case.
// For 'armlb' (the JIT LEGACY_BACKEND architecture for arm), tell build.cmd to use legacy backend for crossgen compilation.
// Legacy backend is not the default JIT; it is an aljit. So, this is a special case.
def armCrossgenOpt = ''
if (architecture == 'arm') {
armCrossgenOpt = '-altjitcrossgen'
if (architecture == 'armlb') {
armCrossgenOpt = '-crossgenaltjit legacyjit.dll'
}

// Hack: build pri1 tests for arm/armlb/arm64 build job, until we have separate pri0 and pri1 builds for the flow job to use.
Expand Down Expand Up @@ -1775,7 +1776,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
Utilities.addArchival(newJob, "bin/Product/**,bin/obj/*/tests/**/*.dylib,bin/obj/*/tests/**/*.so", "bin/Product/**/.nuget/**")
}
break
case 'armlb':
case 'arm':
// Cross builds for ARM runs on Ubuntu, Ubuntu16.04 and Tizen currently
assert (os == 'Ubuntu') || (os == 'Ubuntu16.04') || (os == 'Tizen')

Expand Down Expand Up @@ -1847,8 +1848,8 @@ Constants.allScenarios.each { scenario ->
os = 'Windows_NT'
}

// Tizen is only supported for arm legacy_backend architecture
if (os == 'Tizen' && architecture != 'armlb') {
// Tizen is only supported for arm architecture
if (os == 'Tizen' && architecture != 'arm') {
return
}

Expand All @@ -1864,12 +1865,12 @@ Constants.allScenarios.each { scenario ->
return
}
break
case 'armlb':
case 'arm':
if ((os != 'Ubuntu') && (os != 'Ubuntu16.04') && (os != 'Tizen') && (os != 'Windows_NT')) {
return
}
break
case 'arm':
case 'armlb':
if (os != 'Windows_NT') {
return
}
Expand Down Expand Up @@ -2077,7 +2078,7 @@ Constants.allScenarios.each { scenario ->
}
else {
// Setup corefx and Windows test binaries for Linux cross build for ubuntu-arm, ubuntu16.04-arm and tizen-armel
if ( architecture == 'armlb' && ( os == 'Ubuntu' || os == 'Ubuntu16.04' || os == 'Tizen')) {
if ( architecture == 'arm' && ( os == 'Ubuntu' || os == 'Ubuntu16.04' || os == 'Tizen')) {
// Cross build for ubuntu-arm, ubuntu16.04-arm and tizen-armel
// Define the Windows Tests and Corefx build job names
def WindowTestsName = projectFolder + '/' +
Expand Down Expand Up @@ -2549,13 +2550,11 @@ Constants.allScenarios.each { scenario ->
addEnvVariable("COMPlus_NoGuiOnAssert", "1")
addEnvVariable("COMPlus_ContinueOnAssert", "0")

// Arm(32) ryujit
if (architecture == "arm") {
// **This is an AltJit**

// ARM legacy backend; this is an altjit.
if (architecture == "armlb") {
addEnvVariable("COMPlus_AltJit", "*")
addEnvVariable("COMPlus_AltJitNgen", "*")
addEnvVariable("COMPlus_AltJitName", "protojit.dll")
addEnvVariable("COMPlus_AltJitName", "legacyjit.dll")
addEnvVariable("COMPlus_AltJitAssertOnNYI", "1")
}

Expand All @@ -2582,10 +2581,10 @@ Constants.allScenarios.each { scenario ->
def addSmartyFlag = { flag -> smartyCommand += flag + " "}
def addExclude = { exclude -> addSmartyFlag("/exc " + exclude)}

def addArchSpecificExclude = { architectureToExclude, exclude -> if (architectureToExclude == "arm") { addExclude("PROTOJIT_" + exclude) } else { addExclude(exclude) } }
def addArchSpecificExclude = { architectureToExclude, exclude -> if (architectureToExclude == "armlb") { addExclude("LEGACYJIT_" + exclude) } else { addExclude(exclude) } }

if (architecture == "arm") {
addExclude("PROTOJIT_FAIL")
if (architecture == "armlb") {
addExclude("LEGACYJIT_FAIL")
}

if (isJitStressScenario(scenario) || isR2RStressScenario(scenario)) {
Expand Down
4 changes: 2 additions & 2 deletions src/jit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ endif (FEATURE_MERGE_JIT_AND_ENGINE)
add_subdirectory(standalone)

if (CLR_CMAKE_TARGET_ARCH_ARM)
# Build RyuJIT/arm32 protojit to run on both x86 host (crossgen build) and arm host (native).
add_subdirectory(protojit)
# Build arm32 legacy_backend to run on both x86 host (crossgen build) and arm host (native).
add_subdirectory(legacyjit)
endif (CLR_CMAKE_TARGET_ARCH_ARM)

if (CLR_CMAKE_PLATFORM_ARCH_I386 OR CLR_CMAKE_PLATFORM_ARCH_AMD64)
Expand Down
2 changes: 1 addition & 1 deletion src/jit/legacyjit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ target_link_libraries(legacyjit
)

# add the install targets
install_clr(legacyjit)
install_clr(legacyjit)
4 changes: 0 additions & 4 deletions src/jit/standalone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ if(FEATURE_READYTORUN)
add_definitions(-DFEATURE_READYTORUN_COMPILER)
endif(FEATURE_READYTORUN)

if(CLR_CMAKE_TARGET_ARCH_ARM)
add_definitions(-DLEGACY_BACKEND)
endif()

if(WIN32)
add_definitions(-DFX_VER_INTERNALNAME_STR=clrjit.dll)
endif(WIN32)
Expand Down
Loading

0 comments on commit e7660e3

Please sign in to comment.