/p:TargetArchitecture=$(archType)
displayName: "Patch dotnet with mono"
+ - ${{ if and(eq(parameters.runtimeFlavor, 'mono'), eq(parameters.runtimeVariant, 'llvmaot')) }}:
+ - script: $(coreClrRepoRootDir)build-test$(scriptExt) mono_aot $(buildConfig)
+ displayName: "LLVM AOT compile CoreCLR tests"
+
# Send tests to Helix
- template: /eng/pipelines/common/templates/runtimes/send-to-helix-step.yml
parameters:
variables:
- name: coreClrProductArtifactName
- value: 'CoreCLRProduct_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_${{ parameters.liveRuntimeBuildConfig }}'
+ value: 'CoreCLRProduct__$(osGroup)$(osSubgroup)_$(archType)_${{ parameters.liveRuntimeBuildConfig }}'
- name: coreClrProductRootFolderPath
value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(liveRuntimeBuildConfigUpper)'
#
# Build CoreCLR checked using GCC toolchain
# Only when CoreCLR is changed
-#
+#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml
or(
eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true),
eq(variables['isFullMatrix'], true))
-
+
# Build the whole product using Mono runtime
# Only when libraries, mono or installer are changed
#
eq(dependencies.checkout.outputs['SetPathVars_mono.containsChange'], true),
eq(variables['isFullMatrix'], true))
+#
+# Build Mono release with LLVM AOT
+# Only when mono, or the runtime tests changed
+#
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/mono/templates/build-job.yml
+ runtimeFlavor: mono
+ buildConfig: release
+ platforms:
+ - Linux_x64
+ jobParameters:
+ runtimeVariant: llvmaot
+ condition: >-
+ or(
+ eq(dependencies.checkout.outputs['SetPathVars_runtimetests.containsChange'], true),
+ eq(dependencies.checkout.outputs['SetPathVars_mono.containsChange'], true),
+ eq(variables['isFullMatrix'], true))
+
#
# Build libraries using live CoreLib
# These set of libraries are built always no matter what changed
isOfficialBuild: false
liveRuntimeBuildConfig: release
testScope: innerloop
- condition: >-
+ condition: >-
or(
eq(dependencies.checkout.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true),
eq(dependencies.checkout.outputs['SetPathVars_mono.containsChange'], true),
eq(dependencies.checkout.outputs['SetPathVars_runtimetests.containsChange'], true),
eq(variables['isFullMatrix'], true))
+#
+# Mono CoreCLR runtime Test executions using live libraries and LLVM AOT
+# Only when Mono is changed
+#
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml
+ buildConfig: release
+ runtimeFlavor: mono
+ platforms:
+ - Linux_x64
+ helixQueueGroup: pr
+ helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
+ jobParameters:
+ testGroup: innerloop
+ liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
+ liveRuntimeBuildConfig: release
+ runtimeVariant: llvmaot
+ condition: >-
+ or(
+ eq(dependencies.checkout.outputs['SetPathVars_mono.containsChange'], true),
+ eq(dependencies.checkout.outputs['SetPathVars_runtimetests.containsChange'], true),
+ eq(variables['isFullMatrix'], true))
#
# Libraries Release Test Execution against a release mono runtime.
fi
}
+build_mono_aot()
+{
+ __RuntimeFlavor="mono"
+ __MonoBinDir="$__RootBinDir/bin/mono/$__TargetOS.$__BuildArch.$__BuildType"
+ __Exclude="${__ProjectDir}/tests/issues.targets"
+ __TestBinDir="$__TestWorkingDir"
+ CORE_ROOT="$__TestBinDir"/Tests/Core_Root
+ export __Exclude
+ export CORE_ROOT
+ build_MSBuild_projects "Tests_MonoAot" "$__ProjectDir/tests/src/runtest.proj" "Mono AOT compile tests" "/t:MonoAotCompileTests" "/p:RuntimeFlavor=$__RuntimeFlavor" "/p:MonoLlvmPath=$__MonoBinDir"
+}
+
generate_layout()
{
echo "${__MsgPrefix}Creating test overlay..."
excludemonofailures|-excludemonofailures)
__Mono=1
;;
+
+ mono_aot|-mono_aot)
+ __Mono=1
+ __MonoAot=1
+ ;;
+
*)
__UnprocessedBuildArgs+=("$1")
;;
__VerboseBuild=0
__CMakeArgs=""
__priority1=
+__Mono=0
+__MonoAot=0
CORE_ROOT=
source "$__ProjectRoot"/_build-commons.sh
echo "HOME not defined; setting it to $HOME"
fi
-if [[ (-z "$__GenerateLayoutOnly") && (-z "$__BuildTestWrappersOnly") ]]; then
+if [[ (-z "$__GenerateLayoutOnly") && (-z "$__BuildTestWrappersOnly") && ("$__MonoAot" -eq 0) ]]; then
build_Tests
elif [[ ! -z "$__BuildTestWrappersOnly" ]]; then
build_test_wrappers
+elif [[ "$__MonoAot" -eq 1 ]]; then
+ build_mono_aot
else
generate_layout
fi
<!-- Known failures for mono runtime on *all* architectures/operating systems -->
<ItemGroup Condition="'$(RuntimeFlavor)' == 'mono'" >
+ <ExcludeList Include="$(XunitTestBinBase)/Interop/StringMarshalling/AnsiBSTR/AnsiBStrTest/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/Interop/StringMarshalling/BSTR/BSTRTest/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Regression/GitHub_17073/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse3/LoadDquVector128_r/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse3/LoadDquVector128_ro/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/General/VectorArray_r/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/General/VectorArray_ro/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/General/VectorRet_r/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/General/VectorRet_ro/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/General/VectorUnused_r/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/General/VectorUnused_ro/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/General/Vector128/Vector128_ro/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/General/Vector128/Vector128_r/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/MethodImpl/CovariantReturns/Structs/IncompatibleOverride/**">
+ <Issue>Crashes during LLVM AOT compilation.</Issue>
+ </ExcludeList>
+
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/opt/InstructionCombining/DivToMul/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/SIMD/VectorConvert_ro_Target_64Bit/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/SIMD/VectorConvert_r_Target_64Bit/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/Directed/StructABI/StructABI/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/JitBlue/GitHub_15949/GitHub_15949/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/JitBlue/GitHub_15291/GitHub_15291/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b16928/b16928/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/jit64/opt/osr/osr015/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/jit64/opt/rngchk/ArrayBound_o/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/TypeInitialization/CctorsWithSideEffects/CctorThrowInlinedStatic/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/CompatibleWithTest/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/TypeInitialization/CctorsWithSideEffects/CctorThrowMethodAccess/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/Loader/AssemblyLoadContext30Extensions/AssemblyLoadContext30Extensions/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/CompatibleWithTest/**">
+ <Issue>Doesn't pass after LLVM AOT compilation.</Issue>
+ </ExcludeList>
+
<ExcludeList Include="$(XunitTestBinBase)/GC/Features/Finalizer/finalizeother/finalizeexcep/**">
<Issue>PlatformDetection.IsPreciseGcSupported false on mono</Issue>
</ExcludeList>
</ItemGroup>
</Target>
+ <Target Name="MonoAotCompileTests" DependsOnTargets="GetListOfTestCmds;FindCmdDirectories">
+ <ItemGroup>
+ <AllTestScripts Include="%(TestDirectories.Identity)\**\*.sh" />
+ <TestExclusions Include="@(ExcludeList->Metadata('FullPath'))" Condition="$(HaveExcludes)" />
+ <TestScripts Include="@(AllTestScripts)" Exclude="@(TestExclusions)" />
+ <TestDllPaths Include="$([System.IO.Path]::ChangeExtension('%(TestScripts.Identity)', 'dll'))" />
+ <TestDlls Include="%(TestDllPaths.Identity)" Condition="Exists(%(TestDllPaths.Identity))" />
+ </ItemGroup>
+ <PropertyGroup>
+ <CorerunExecutable Condition="'$(RunningOnUnix)' == 'true'">$(CORE_ROOT)\corerun</CorerunExecutable>
+ <CorerunExecutable Condition="'$(RunningOnUnix)' != 'true'">$(CORE_ROOT)\corerun.exe</CorerunExecutable>
+ </PropertyGroup>
+ <ItemGroup>
+ <AotEnvVar Include="MONO_ENV_OPTIONS=--aot=llvm,llvm-path='$(MonoLlvmPath)'" />
+ </ItemGroup>
+ <PropertyGroup>
+ <AotEnvVars>@(AotEnvVar)</AotEnvVars>
+ </PropertyGroup>
+ <ItemGroup>
+ <AotProject Include="../../../mono/msbuild/aot-compile.proj">
+ <Properties>_CorerunExecutable=$(CorerunExecutable);_TestDll=%(TestDlls.Identity);AotEnvVars=@(AotEnvVar)</Properties>
+ </AotProject>
+ </ItemGroup>
+ <MSBuild
+ Projects="@(AotProject)"
+ Targets="AotCompile"
+ Condition="@(TestDlls->Count()) > 0"
+ BuildInParallel="true"
+ />
+ </Target>
+
<Target Name="CreateAllWrappers" DependsOnTargets="GetListOfTestCmds;FindCmdDirectories">
<MSBuild Projects="$(MSBuildProjectFile)" Targets="CreateXunitWrapper;BuildXunitWrapper" Properties="_CMDDIR=%(TestDirectories.Identity);TestSrcDir=$(XunitTestBinBase)" />
</Target>
<MSBuild Projects="$(MSBuildThisFileDirectory)Common\test_dependencies\test_dependencies.csproj"
Condition=" '$(BuildWrappers)'=='true' " />
+ <MSBuild Projects="$(MSBuildProjectFile)"
+ Targets="MonoAotCompileTests"
+ Properties=""
+ Condition=" '$(MonoAotCompile)'=='true' " />
+
<!-- Default for building -->
<MSBuild Projects="$(MSBuildProjectFile)"
Targets="CreateAllWrappers"
#
if test "x$enable_llvm_runtime" = "xyes"; then
AC_SUBST(MONO_CXXLD, [$CXX])
+ AC_SUBST(MONO_LIBTOOL_TAG, '--tag=CXX')
else
AC_SUBST(MONO_CXXLD, [$CC])
+ AC_SUBST(MONO_LIBTOOL_TAG, '')
fi
### Set -Werror options
libmonosgen_2_0_la_LIBADD = libmini.la $(interp_libs_with_mini) $(dbg_libs_with_mini) $(sgen_libs) $(LIBMONO_DTRACE_OBJECT) $(LLVMMONOF)
libmonosgen_2_0_la_LDFLAGS = $(libmonoldflags) $(monobin_platform_ldflags) $(CCLDFLAGS)
+libmonosgen_2_0_la_LIBTOOLFLAGS = $(MONO_LIBTOOL_TAG)
noinst_LIBRARIES += libmaintest.a
di_file = builder->createFile (file, dir);
type = builder->createSubroutineType (builder->getOrCreateTypeArray (ArrayRef<Metadata*> ()));
#if LLVM_API_VERSION >= 900
- di_func = builder->createFunction (di_file, name, mangled_name, di_file, line, type, 0);
+ di_func = builder->createFunction (
+ di_file, name, mangled_name, di_file, line, type, 0,
+ DINode::FlagZero, DISubprogram::SPFlagDefinition | DISubprogram::SPFlagLocalToUnit);
#else
di_func = builder->createFunction (di_file, name, mangled_name, di_file, line, type, true, true, 0);
#endif
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Target Name="AotCompile">
+ <Exec Command="$(_CorerunExecutable) $(_TestDll)" EnvironmentVariables="$(AotEnvVars)" />
+ </Target>
+</Project>