diff options
author | lateralusX <lateralusx.github@gmail.com> | 2018-11-06 18:23:56 +0300 |
---|---|---|
committer | lateralusX <lateralusx.github@gmail.com> | 2018-11-12 17:16:14 +0300 |
commit | 269d02cf5b3c906954bbba944fc9d5918fa1ad75 (patch) | |
tree | b0d789dcf9579773bbbf5929272f1d590f41b6a9 /msvc/mono.props | |
parent | f038e7cd8a4edcfc9ebbfb8dfd0b595fdcaada15 (diff) |
Add support for LLVM integrated build as part of Visual Studio solution
build. LLVM build follows similar pattern as BTLS build and will be build
as part of regular Visual Studio build Mono runtime if LLVM has been enabled
through the autogen.sh, --enable-llvm or –with-llvm argument. It is also
supports msbuild properties MONO_ENABLE_LLVM, MONO_EXTERNAL_LLVM_CONFIG,
if Visual Studio Mono runtime has been built without using autogen.sh.
When just using –enable-llvm, LLVM build will try to build internal LLVM
branch under external/llvm or if override has been set in props file
(using MONO_INTERNAL_LLVM_SOURCE_DIR), an alternative LLVM source
directory path. If –with-llvm has been used pointing to an llvm-config.exe,
no internal LLVM will be build, but the external LLVM build will be used.
Needed LLVM executables (opt.exe, llc.exe) will be installed into regular
Visual Studio Mono runtime build output directory.
The internal Mono LLVM 6.0 release will build as part of changes to this
commit, but it has not yet been fixed to work as expected during runtime.
That work will be done in different commit. The Mono LLVM 3.6 branch will
however work as expected for Windows x64 and can be setup and used using
–with-llvm argument or build as part of Visual Studio build Mono runtime
by enabling msbuild properties, MONO_ENABLE_LLVM and
MONO_INTERNAL_LLVM_SOURCE_DIR.
Diffstat (limited to 'msvc/mono.props')
-rw-r--r-- | msvc/mono.props | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/msvc/mono.props b/msvc/mono.props index dd88cc7ab84..2de8f1851c4 100644 --- a/msvc/mono.props +++ b/msvc/mono.props @@ -5,8 +5,6 @@ <MONO_BUILD_DIR_PREFIX>$(MSBuildProjectDirectory)/./build/</MONO_BUILD_DIR_PREFIX> <!-- Change this to custom distribution tree location to enable out of source tree distribution, example c:/mono-dist/ --> <MONO_INSTALL_DIR_PREFIX>$(MSBuildProjectDirectory)/./dist/</MONO_INSTALL_DIR_PREFIX> - <!-- Change this to custom install tree location to enable out of source tree builds, example c:/mono-llvm/ --> - <MONO_LLVM_INSTALL_DIR_PREFIX>$(MONO_INSTALL_DIR_PREFIX)llvm/</MONO_LLVM_INSTALL_DIR_PREFIX> <!-- GC in use, sgen or boehm, default is sgen. --> <MONO_TARGET_GC>sgen</MONO_TARGET_GC> <!-- When true, build targets will get a suffix based on used GC. Makes it possible to have builds using different GC's in same build folders, sharing common targets. --> @@ -19,6 +17,10 @@ <MONO_USE_STATIC_LIBMONO>false</MONO_USE_STATIC_LIBMONO> <!-- When true, mono binaries will link and include llvm. When false, mono binaries will not link and include llvm. --> <MONO_ENABLE_LLVM>false</MONO_ENABLE_LLVM> + <!-- When set, use an alternative LLVM source location for internal LLVM build. --> + <MONO_INTERNAL_LLVM_SOURCE_DIR></MONO_INTERNAL_LLVM_SOURCE_DIR> + <!-- When set, use an external pre-build LLVM library instead of internal one. --> + <MONO_EXTERNAL_LLVM_CONFIG></MONO_EXTERNAL_LLVM_CONFIG> <!-- When true, ported mono projects will build using C++ instead of C compiler. When false, all project will be build using the default compiler. --> <MONO_COMPILE_AS_CPP>false</MONO_COMPILE_AS_CPP> </PropertyGroup> @@ -36,11 +38,6 @@ <LIBGC_CPPFLAGS_INCLUDE>$(MONO_LIBGC_INCLUDE_DIR)</LIBGC_CPPFLAGS_INCLUDE> <GLIB_CFLAGS_INCLUDE>$(MONO_EGLIB_SOURCE_DIR)</GLIB_CFLAGS_INCLUDE> </PropertyGroup> - <PropertyGroup Label="MonoLLVMDirectories"> - <MONO_LLVM_INCLUDE_DIR>$(MONO_LLVM_INSTALL_DIR_PREFIX)include</MONO_LLVM_INCLUDE_DIR> - <MONO_LLVM_LIB_DIR>$(MONO_LLVM_INSTALL_DIR_PREFIX)lib</MONO_LLVM_LIB_DIR> - <MONO_LLVM_BIN_DIR>$(MONO_LLVM_INSTALL_DIR_PREFIX)bin</MONO_LLVM_BIN_DIR> - </PropertyGroup> <PropertyGroup Label="Static-C-Runtime" Condition="$(MONO_USE_STATIC_C_RUNTIME)=='true'"> <MONO_C_RUNTIME Condition="'$(Configuration)'=='Debug'">MultiThreadedDebug</MONO_C_RUNTIME> <MONO_C_RUNTIME Condition="'$(Configuration)'!='Debug'">MultiThreaded</MONO_C_RUNTIME> @@ -77,12 +74,6 @@ <PropertyGroup Label="MonoProfiler"> <VTUNE_INCLUDE_DIR>$(ProgramFiles)/Intel/VTune Amplifier XE 2013/include</VTUNE_INCLUDE_DIR> </PropertyGroup> - <PropertyGroup Label="MONO_ENABLE_LLVM" Condition="$(MONO_ENABLE_LLVM)=='true'"> - <MONO_LLVM_CODEGEN_LIBS>LLVMX86CodeGen.lib;LLVMX86Desc.lib;LLVMX86Info.lib;LLVMObject.lib;LLVMBitReader.lib;LLVMMCDisassembler.lib;LLVMX86AsmPrinter.lib;LLVMX86Utils.lib;LLVMSelectionDAG.lib;LLVMAsmPrinter.lib;LLVMMCParser.lib;LLVMCodeGen.lib;LLVMScalarOpts.lib;LLVMInstCombine.lib;LLVMTransformUtils.lib;LLVMipa.lib</MONO_LLVM_CODEGEN_LIBS> - <MONO_LLVM_JIT_LIBS>LLVMMCJIT.lib;LLVMRuntimeDyld.lib;LLVMObject.lib;LLVMMCParser.lib;LLVMBitReader.lib;LLVMJIT.lib;LLVMExecutionEngine.lib;LLVMCodeGen.lib;LLVMScalarOpts.lib;LLVMInstCombine.lib;LLVMTransformUtils.lib</MONO_LLVM_JIT_LIBS> - <MONO_LLVM_LIBS>$(MONO_LLVM_CODEGEN_LIBS);$(MONO_LLVM_JIT_LIBS);LLVMBitWriter.lib;LLVMAnalysis.lib;LLVMTarget.lib;LLVMMC.lib;LLVMCore.lib;LLVMSupport.lib</MONO_LLVM_LIBS> - <MONO_ADDITIONAL_PREPROCESSOR_DEFINITIONS>ENABLE_LLVM=1;$(MONO_ADDITIONAL_PREPROCESSOR_DEFINITIONS)</MONO_ADDITIONAL_PREPROCESSOR_DEFINITIONS> - </PropertyGroup> <ItemGroup> <BuildMacro Include="MONO_BUILD_DIR_PREFIX"> <Value>$(MONO_BUILD_DIR_PREFIX)</Value> @@ -111,6 +102,9 @@ <BuildMacro Include="MONO_ENABLE_LLVM"> <Value>$(MONO_ENABLE_LLVM)</Value> </BuildMacro> + <BuildMacro Include="MONO_EXTERNAL_LLVM_CONFIG"> + <Value>$(MONO_EXTERNAL_LLVM_CONFIG)</Value> + </BuildMacro> <BuildMacro Include="MONO_COMPILE_AS_CPP"> <Value>$(MONO_COMPILE_AS_CPP)</Value> </BuildMacro> |