<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>572e952eae1d4fc6e83300031c5f7c401014ff34</Sha>
</Dependency>
+ <Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="6.0.1-alpha.1.20078.4">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>adeaa08e7bbc9aba5d67cb16c2b348be12deb000</Sha>
+ </Dependency>
+ <Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="6.0.1-alpha.1.20078.4">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>adeaa08e7bbc9aba5d67cb16c2b348be12deb000</Sha>
+ </Dependency>
+ <Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="6.0.1-alpha.1.20078.4">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>adeaa08e7bbc9aba5d67cb16c2b348be12deb000</Sha>
+ </Dependency>
+ <Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="6.0.1-alpha.1.20078.4">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>adeaa08e7bbc9aba5d67cb16c2b348be12deb000</Sha>
+ </Dependency>
+ <Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="6.0.1-alpha.1.20078.4">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>adeaa08e7bbc9aba5d67cb16c2b348be12deb000</Sha>
+ </Dependency>
+ <Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="6.0.1-alpha.1.20078.4">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>adeaa08e7bbc9aba5d67cb16c2b348be12deb000</Sha>
+ </Dependency>
</ToolsetDependencies>
</Dependencies>
<MicrosoftPrivateIntellisenseVersion>3.0.0-preview9-190909-1</MicrosoftPrivateIntellisenseVersion>
<!-- ILLink -->
<ILLinkTasksVersion>0.1.6-prerelease.19567.1</ILLinkTasksVersion>
+ <!-- Mono LLVM -->
+ <runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>6.0.1-alpha.1.20078.4</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
+ <runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>6.0.1-alpha.1.20078.4</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
+ <runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>6.0.1-alpha.1.20078.4</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
+ <runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>6.0.1-alpha.1.20078.4</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
+ <runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>6.0.1-alpha.1.20078.4</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
+ <runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>6.0.1-alpha.1.20078.4</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
</PropertyGroup>
<!-- Package names -->
<PropertyGroup>
variables: {}
pool: ''
condition: true
+ llvm: false
### Product build
jobs:
helixType: 'build/product/'
enableMicrobuild: true
pool: ${{ parameters.pool }}
+ llvm: ${{ parameters.llvm }}
condition: ${{ parameters.condition }}
# Compute job name from template parameters
- name: ${{ format('mono_product_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
- displayName: ${{ format('Mono Product Build {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
+ ${{ if ne(parameters.llvm, true) }}:
+ name: ${{ format('mono_product_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
+ displayName: ${{ format('Mono Product Build {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
+
+ # if LLVM enabled, set a variable we can consume
+ ${{ if eq(parameters.llvm, true) }}:
+ name: ${{ format('mono_llvm_product_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
+ displayName: ${{ format('Mono LLVM Product Build {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
+
# Run all steps in the container.
# Note that the containers are defined in platform-matrix.yml
# Build
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- - script: ./mono$(scriptExt) -configuration $(buildConfig) -arch $(archType) -ci
+ - script: ./mono$(scriptExt) -configuration $(buildConfig) -arch $(archType) -ci /p:MonoEnableLLVM=${{ parameters.llvm }}
displayName: Build product
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- - script: mono$(scriptExt) -configuration $(buildConfig) -arch $(archType) -ci
+ - script: mono$(scriptExt) -configuration $(buildConfig) -arch $(archType) -ci /p:MonoEnableLLVM=${{ parameters.llvm }}
displayName: Build product
# Publish product output directory for consumption by tests.
displayName: Publish Logs
inputs:
pathtoPublish: $(Build.SourcesDirectory)/artifacts/log
- artifactName: 'BuildLogs_Mono_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)'
+ ${{ if ne(parameters.llvm, true) }}:
+ artifactName: 'BuildLogs_Mono_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)'
+ ${{ if eq(parameters.llvm, true) }}:
+ artifactName: 'BuildLogs_Mono_LLVM_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)'
continueOnError: true
condition: always()
liveLibrariesBuildConfig: ''
strategy: ''
pool: ''
+ llvm: false
# arcade-specific parameters
condition: true
container: ${{ parameters.container }}
strategy: ${{ parameters.strategy }}
pool: ${{ parameters.pool }}
+ llvm: ${{ parameters.llvm }}
# arcade-specific parameters
condition: and(succeeded(), ${{ parameters.condition }})
variables:
- name: buildProductArtifactName
- value: 'MonoProduct_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)'
+ ${{ if ne(parameters.llvm, true) }}:
+ value: 'MonoProduct_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)'
+ ${{ if eq(parameters.llvm, true) }}:
+ value: 'MonoProduct_LLVM_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)'
- name: buildProductRootFolderPath
value: '$(Build.SourcesDirectory)/artifacts/bin/mono/$(osGroup).$(archType).$(buildConfigUpper)'
eq(variables['isFullMatrix'], true))
#
+# Build Mono LLVM debug
+# Only when libraries or mono changed
+#
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/mono/templates/build-job.yml
+ runtimeFlavor: mono
+ buildConfig: debug
+ platforms:
+ # - OSX_x64
+ - Linux_x64
+ # - Linux_arm
+ # - Linux_arm64
+ # - Linux_musl_x64
+ # - Linux_musl_arm64
+ # - Windows_NT_x64
+ # - Windows_NT_x86
+ # - Windows_NT_arm
+ # - Windows_NT_arm64
+ jobParameters:
+ llvm: true
+ condition: >-
+ or(
+ eq(dependencies.checkout.outputs['SetPathVars_libraries.containsChange'], true),
+ eq(dependencies.checkout.outputs['SetPathVars_mono.containsChange'], true),
+ eq(variables['isFullMatrix'], true))
+
+#
+# Build Mono LLVM release
+# Only when libraries or mono changed
+#
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/mono/templates/build-job.yml
+ runtimeFlavor: mono
+ buildConfig: release
+ platforms:
+ # - OSX_x64
+ - Linux_x64
+ # - Linux_arm
+ # - Linux_arm64
+ # - Linux_musl_x64
+ # - Linux_musl_arm64
+ # - Windows_NT_x64
+ # - Windows_NT_x86
+ # - Windows_NT_arm
+ # - Windows_NT_arm64
+ jobParameters:
+ llvm: true
+ condition: >-
+ or(
+ eq(dependencies.checkout.outputs['SetPathVars_libraries.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
# The reason for that is because Corelib and Installer needs it and
-# temporary Makefile until we can fully move netcore mono to new repo
-all:
+if ENABLE_LLVM
+
+if HOST_WIN32
+llvm_config=llvm-config.exe
+else
+llvm_config=llvm-config
+endif
+
+if HAVE_STATIC_ZLIB
+llvm_extra_libs = $(STATIC_ZLIB_PATH)
+else
+if HAVE_SYS_ZLIB
+llvm_extra_libs=-lz
+else
+llvm_extra_libs=
+endif
+endif
+
+if INTERNAL_LLVM_ASSERTS
+ENABLE_ASSERTS=On
+else
+ENABLE_ASSERTS=Off
+endif
+
+all-local: llvm_config.mk
+
+clean-local: clean-llvm-config
+
+$(mono_build_root)/llvm/llvm_config.mk: $(top_srcdir)/llvm/Makefile.am
+ $(top_srcdir)/llvm/build_llvm_config.sh "$(EXTERNAL_LLVM_CONFIG)" "$(LLVM_CODEGEN_LIBS)" "$(llvm_extra_libs)" | tee $@
+
+llvm_config.mk: $(mono_build_root)/llvm/llvm_config.mk
+
+clean-llvm-config:
+ - rm -rf llvm_config.mk
+
+else
+all-local:
+
+clean-local:
+endif
+
+# Override this so we don't try to re-copy llvm when we install mono
+install:
+
+if TARGET_WASM
+LLVM_TARGET=wasm32
+else
+LLVM_TARGET=
+endif
+
--- /dev/null
+#!/bin/bash
+
+llvm_config=$1
+llvm_codegen_libs="$2"
+llvm_extra_libs="${@:3}"
+
+use_llvm_config=1
+llvm_host_win32=0
+llvm_host_win32_wsl=0
+llvm_host_win32_cygwin=0
+
+function win32_format_path {
+ local formatted_path=$1
+ if [[ $llvm_host_win32_wsl = 1 ]] && [[ $1 != "/mnt/"* ]]; then
+ # if path is not starting with /mnt under WSL it could be a windows path, convert using wslpath.
+ formatted_path="$(wslpath -a "$1")"
+ elif [[ $llvm_host_win32_cygwin = 1 ]] && [[ $1 != "/cygdrive/"* ]]; then
+ # if path is not starting with /cygdrive under CygWin it could be a windows path, convert using cygpath.
+ formatted_path="$(cygpath -a "$1")"
+ fi
+ echo "$formatted_path"
+}
+
+if [[ $llvm_config = *".exe" ]]; then
+ llvm_host_win32=1
+ # llvm-config is a windows binary. Check if we are running CygWin or WSL since then we might still be able to run llvm-config.exe
+ host_uname="$(uname -a)"
+ case "$host_uname" in
+ *Microsoft*)
+ use_llvm_config=1
+ llvm_host_win32_wsl=1
+ ;;
+ CYGWIN*)
+ use_llvm_config=1
+ llvm_host_win32_cygwin=1
+ ;;
+ *)
+ use_llvm_config=0
+ esac
+fi
+
+if [[ $llvm_host_win32 = 1 ]]; then
+ llvm_config=$(win32_format_path "$llvm_config")
+fi
+
+if [[ $use_llvm_config = 1 ]]; then
+ llvm_api_version=`$llvm_config --mono-api-version` || "0"
+ with_llvm=`$llvm_config --prefix`
+ llvm_config_cflags=`$llvm_config --cflags`
+ llvm_system=`$llvm_config --system-libs`
+ llvm_core_components=`$llvm_config --libs analysis core bitwriter`
+ if [[ $llvm_api_version -lt 600 ]]; then
+ llvm_old_jit=`$llvm_config --libs mcjit jit 2>>/dev/null`
+ else
+ llvm_old_jit=`$llvm_config --libs mcjit 2>>/dev/null`
+ fi
+ llvm_new_jit=`$llvm_config --libs orcjit 2>>/dev/null`
+
+ if [[ ! -z $llvm_codegen_libs ]]; then
+ llvm_extra=`$llvm_config --libs $llvm_codegen_libs`
+ fi
+
+ # When building for Windows subsystem using WSL or CygWin the path returned from llvm-config.exe
+ # could be a Windows style path, make sure to format it into a path usable for WSL/CygWin.
+ if [[ $llvm_host_win32 = 1 ]]; then
+ with_llvm=$(win32_format_path "$with_llvm")
+ fi
+fi
+
+# When cross compiling for Windows on system not capable of running Windows binaries, llvm-config.exe can't be used to query for
+# LLVM parameters. In that scenario we will need to fallback to default values.
+if [[ $llvm_host_win32 = 1 ]] && [[ $use_llvm_config = 0 ]]; then
+ # Assume we have llvm-config sitting in llvm-install-root/bin directory, get llvm-install-root directory.
+ with_llvm="$(dirname $llvm_config)"
+ with_llvm="$(dirname $with_llvm)"
+ llvm_config_path=$with_llvm/include/llvm/Config/llvm-config.h
+
+ # llvm-config.exe --mono-api-version
+ llvm_api_version=`awk '/MONO_API_VERSION/ { print $3 }' $llvm_config_path`
+
+ # llvm-config.exe --cflags, returned information currently not used.
+ llvm_config_cflags=
+
+ # llvm-config.exe --system-libs
+ if [[ $llvm_api_version -lt 600 ]]; then
+ llvm_system="-limagehlp -lpsapi -lshell32"
+ else
+ llvm_system="-lpsapi -lshell32 -lole32 -luuid -ladvapi32"
+ fi
+
+ # llvm-config.exe --libs analysis core bitwriter
+ if [[ $llvm_api_version -lt 600 ]]; then
+ llvm_core_components="-lLLVMBitWriter -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport"
+ else
+ llvm_core_components="-lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle"
+ fi
+
+ # llvm-config.exe --libs mcjit jit
+ if [[ $llvm_api_version -lt 600 ]]; then
+ llvm_old_jit="-lLLVMJIT -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMMCJIT -lLLVMTarget -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMExecutionEngine -lLLVMMC -lLLVMCore -lLLVMSupport"
+ else
+ # Current build of LLVM 60 for cross Windows builds doesn't support LLVM JIT.
+ llvm_old_jit=
+ fi
+
+ # LLVM 36 doesn't support new JIT and LLVM 60 is build without LLVM JIT support for cross Windows builds.
+ llvm_new_jit=
+
+ # Check codegen libs and add needed libraries.
+ case "$llvm_codegen_libs" in
+ *x86codegen*)
+ # llvm-config.exe --libs x86codegen
+ if [[ $llvm_api_version -lt 600 ]]; then
+ llvm_extra="-lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMObject -lLLVMBitReader -lLLVMMCDisassembler -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport"
+ else
+ llvm_extra="-lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMX86Desc -lLLVMX86Info -lLLVMMCDisassembler -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle"
+ fi
+ ;;
+ *armcodegen*)
+ # llvm-config.exe --libs armcodegen
+ if [[ $llvm_api_version -lt 600 ]]; then
+ llvm_extra="-lLLVMARMCodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMARMDesc -lLLVMMCDisassembler -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMMC -lLLVMSupport"
+ else
+ llvm_extra="-lLLVMARMCodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMARMDesc -lLLVMMCDisassembler -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMARMUtils -lLLVMMC -lLLVMSupport -lLLVMDemangle"
+ fi
+ ;;
+ *aarch64codegen*)
+ # llvm-config.exe --libs aarch64codegen
+ if [[ $llvm_api_version -lt 600 ]]; then
+ llvm_extra="-lLLVMAArch64CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMMC -lLLVMAArch64Utils -lLLVMSupport"
+ else
+ llvm_extra="-lLLVMAArch64CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMMC -lLLVMAArch64Utils -lLLVMSupport -lLLVMDemangle"
+ fi
+ ;;
+ *)
+ llvm_extra=$llvm_codegen_libs
+ esac
+fi
+
+if [[ $llvm_config_cflags = *"stdlib=libc++"* ]]; then
+ llvm_libc_c="-stdlib=libc++"
+ # llvm_libc_link="-lc++"
+else
+ llvm_libc_c=""
+ # llvm_libc_link="-lstdc++"
+fi
+
+if [[ $llvm_host_win32 = 1 ]]; then
+ host_cxxflag_additions="-std=gnu++11"
+ host_cflag_additions="-DNDEBUG"
+else
+ host_cxxflag_additions="-std=c++11"
+ host_cflag_additions=""
+fi
+
+if [[ ! -z $llvm_extra_libs ]]; then
+ llvm_extra="$llvm_extra $llvm_extra_libs"
+fi
+
+# llvm-config --clfags adds warning and optimization flags we don't want
+cflags_additions="-I$with_llvm/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DLLVM_API_VERSION=$llvm_api_version $llvm_libc_c $host_cflag_additions"
+
+cxxflag_additions="-fno-rtti -fexceptions $host_cxxflag_additions"
+
+ldflags="-L$with_llvm/lib"
+
+llvm_lib_components="$llvm_core_components $llvm_old_jit $llvm_new_jit $llvm_extra"
+
+echo "LLVM_CFLAGS_INTERNAL=$cflags_additions"
+echo "LLVM_CXXFLAGS_INTERNAL=$cflags_additions $cxxflag_additions"
+echo "LLVM_LDFLAGS_INTERNAL=$ldflags"
+echo "LLVM_LIBS_INTERNAL=$llvm_lib_components $ldflags $llvm_system $llvm_libc_link"
--- /dev/null
+<Project Sdk="Microsoft.Build.NoTargets">
+
+ <PropertyGroup>
+ <TargetFramework>netcoreapp5.0</TargetFramework>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Condition="'$(OSGroup)' == 'Linux'" Include="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="$(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)" />
+ <PackageReference Condition="'$(OSGroup)' == 'Linux'" Include="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="$(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)" />
+ <PackageReference Condition="'$(OSGroup)' == 'Windows_NT'" Include="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="$(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)" />
+ <PackageReference Condition="'$(OSGroup)' == 'Windows_NT'" Include="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="$(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)" />
+ <PackageReference Condition="'$(OSGroup)' == 'OSX'" Include="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="$(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)" />
+ <PackageReference Condition="'$(OSGroup)' == 'OSX'" Include="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="$(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)" />
+ </ItemGroup>
+
+ <Target Name="CopyLLVMToTree" AfterTargets="Restore">
+ <ItemGroup>
+ <LLVMFiles Include="$(NuGetPackageRoot)\runtime.$(NETCoreSdkRuntimeIdentifier).microsoft.netcore.runtime.mono.llvm.sdk\$(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)\tools\$(NETCoreSdkRuntimeIdentifier)\**" />
+ <LLVMFiles Include="$(NuGetPackageRoot)\runtime.$(NETCoreSdkRuntimeIdentifier).microsoft.netcore.runtime.mono.llvm.tools\$(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)\tools\$(NETCoreSdkRuntimeIdentifier)\**" />
+ </ItemGroup>
+
+ <Copy SourceFiles="@(LLVMFiles)" DestinationFolder="$(MonoLLVMDir)\%(RecursiveDir)">
+ <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
+ </Copy>
+ </Target>
+
+</Project>
<PropertyGroup>
<MonoObjDir>$(ArtifactsObjDir)mono/$(PlatformConfigPathPart)/</MonoObjDir>
- <MonoEnableLLVM Condition=" '$(MonoEnableLLVM)' == '' ">false</MonoEnableLLVM>
+ <MonoEnableLLVM Condition="'$(MonoEnableLLVM)' == ''">false</MonoEnableLLVM>
+ <MonoLLVMDir Condition="'$(MonoEnableLLVM)' == 'true'">$(MonoObjDir)llvm</MonoLLVMDir>
<DotNetExec Condition="'$(OS)' == 'Windows_NT'">dotnet.exe</DotNetExec>
<DotNetExec Condition="'$(DotNetExec)' == ''">dotnet</DotNetExec>
<LocalDotnetDir>..\..\.dotnet</LocalDotnetDir>
<_MonoExtraCXXFLAGS>-O2 -g</_MonoExtraCXXFLAGS>
</PropertyGroup>
<PropertyGroup>
- <_MonoConfigureParams Condition="$(MonoEnableLLVM) == true">$(_MonoConfigureParams) --enable--llvm </_MonoConfigureParams>
+ <_MonoConfigureParams Condition="'$(MonoEnableLLVM)' == 'true'">$(_MonoConfigureParams) --enable--llvm --with-llvm=$(MonoLLVMDir) </_MonoConfigureParams>
<_MonoConfigureParams>$(_MonoConfigureParams) --enable-maintainer-mode --enable-compile-warnings --with-core=only CFLAGS="$(_MonoExtraCFLAGS)" CXXFLAGS="$(_MonoExtraCXXFLAGS)"</_MonoConfigureParams>
</PropertyGroup>
<Target Name="Restore">
<MSBuild Projects="$(MonoProjectRoot)netcore\nuget\packages.builds" Targets="Restore" />
+ <MSBuild Condition="'$(MonoEnableLLVM)' == 'true'" Projects="$(MonoProjectRoot)llvm\llvm-init.proj" Targets="Restore" Properties="MonoObjDir=$(MonoObjDir);MonoLLVMDir=$(MonoLLVMDir)" />
</Target>
<Target Name="Pack">