diff options
author | Johan Lorensson <lateralusx.github@gmail.com> | 2019-10-03 12:21:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-03 12:21:36 +0300 |
commit | 55be8289ff1601824707bb2ef9d554b01123f713 (patch) | |
tree | c77a71b741038359fda535d60b16931ca09fd891 /configure.ac | |
parent | d8040ba86520ae584f36628bd7eece1558970f41 (diff) |
Optional only build MSVC runtime using make file system on Windows. (#16915)
* Build MSVC only runtime using make file system.
Add a new option to only build MSVC version of mono runtime and native
tools, --enable-msvc-only. In the past, --enable-msvc build both
mingw as well as MSVC runtime, this commit adds an option to only build
MSVC version of runtime and native tools using make file system.
Commit updates all native make file making sure mingw/gcc builds are
not done if --enable-msvc-only has been used. It also makes sure we
build and use MSVC based tools as part of build and tests.
Result will be a build without any mingw/gcc artifacts, but where all
existing make files still works with the MSVC build artifacts.
This commits is also preparing to switch the .NETCore build over to use
MSVC build runtime in order to get LLVM support, something that is
currently only supported on Windows MSVC build.
* Add link to mono-sgen.exe and clean windows binaries.
* Fix failures in mono/tests test-aot on Windows.
* Add fullaot-mixed tests on Windows x64.
* Run msbuild in parallel.
* Default to x64 mingw host on cygwin build.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 2f7f2082f48..92c6bf8d1e3 100644 --- a/configure.ac +++ b/configure.ac @@ -9,6 +9,18 @@ AC_INIT(mono, [6.7.0], AC_CONFIG_SRCDIR([README.md]) AC_CONFIG_MACRO_DIR([m4]) + +if test "x$host_alias" = "x"; then + build_uname_all=`(uname -a) 2>/dev/null` + case "$build_uname_all" in + CYGWIN*) + AC_MSG_NOTICE([Run configure using ./configure --host=i686-w64-mingw32 or --host=x86_64-w64-mingw32]) + AC_MSG_NOTICE([Falling back using --host=x86_64-w64-mingw32 as default.]) + host_alias=x86_64-w64-mingw32 + ;; + esac +fi + AC_CANONICAL_SYSTEM AC_CANONICAL_HOST @@ -6027,6 +6039,15 @@ AC_DEFINE(MONO_INSIDE_RUNTIME,1, [Disable banned functions from being used by th mono_build_root=`pwd` AC_SUBST(mono_build_root) +AC_ARG_ENABLE(msvc_only,[ --enable-msvc-only Build only with Visual Studio (msvc) (defaults to no). Disable gcc build.], enable_msvc_only=$enableval, enable_msvc_only=no) +if test x$host_win32 = xno; then + if test x$enable_msvc_only = xyes; then + echo "Error, --enable-msvc-only only supported for Windows builds." + exit 1 + fi +fi +AM_CONDITIONAL(ENABLE_MSVC_ONLY, test x$enable_msvc_only = xyes) + AC_ARG_ENABLE(msvc,[ --enable-msvc Build with Visual Studio (msvc) (defaults to no)], enable_msvc=$enableval, enable_msvc=no) if test x$host_win32 = xno; then if test x$enable_msvc = xyes; then @@ -6034,6 +6055,9 @@ if test x$host_win32 = xno; then exit 1 fi fi +if test x$enable_msvc_only = xyes; then + enable_msvc=yes +fi AM_CONDITIONAL(ENABLE_MSVC, test x$enable_msvc = xyes) if test "x$enable_msvc" = "xyes"; then @@ -6967,6 +6991,10 @@ fi fi echo "COMPILER_SERVER_PIPENAME?=monomake" >> $srcdir/$mcsdir/build/config.make + if test x$enable_msvc_only = xyes; then + echo "ENABLE_MSVC_ONLY=1" >> $srcdir/$mcsdir/build/config.make + fi + fi ) |