Write version.h for netcore and allow preview VS for msvc builds
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Mon, 13 Jan 2020 19:47:35 +0000 (20:47 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Mon, 13 Jan 2020 19:47:35 +0000 (20:47 +0100)
Commit migrated from https://github.com/mono/mono/commit/a5cc4cd9ec6a595231c7aeb84a8166c736b867e3

src/mono/mono/mini/Makefile.am.in
src/mono/msvc/build-external-btls.bat
src/mono/msvc/build-external-llvm.bat
src/mono/msvc/scripts/tests/clang-vs2019-toolchain.bat
src/mono/msvc/setup-vs-msbuild-env.bat
src/mono/msvc/setup-vs-msvcbuild-env.bat

index 68b2fae..15568a9 100755 (executable)
@@ -1088,6 +1088,10 @@ EXTRA_DIST = TestDriver.cs \
        test_op_il_seq_point_headerfooter.sh    \
        Makefile.am.in
 
+if ENABLE_NETCORE
+version.h: Makefile
+       echo "#define FULL_VERSION \"netcore\"" > version.h
+else
 version.h: Makefile
        if test -e $(top_srcdir)/.git; then \
                (cd $(top_srcdir); \
@@ -1107,6 +1111,7 @@ version.h: Makefile
                        echo "#define FULL_VERSION \"$$MONO_BRANCH/$$MONO_BUILD_REVISION\""; \
                fi \
        fi > version.h
+endif
 
 # Utility target for patching libtool to speed up linking
 patch-libtool:
index a8fb4e3..479a3d5 100755 (executable)
@@ -165,7 +165,7 @@ goto ON_ENV_OK
 :: VS 2019.
 if exist "%VSWHERE_TOOLS_BIN%" (
     echo For VS2019 builds, make sure to run this from within Visual Studio build or using "x86|x64 Native Tools Command Prompt for VS2019" command prompt.
-    for /f "tokens=*" %%a IN ('"%VSWHERE_TOOLS_BIN%" -version [16.0^,17.0] -property installationPath') do (
+    for /f "tokens=*" %%a IN ('"%VSWHERE_TOOLS_BIN%" -version [16.0^,17.0] -prerelease -property installationPath') do (
         echo Setup a "x86|x64 Native Tools Command Prompt for VS2019" command prompt by using "%%a\VC\Auxiliary\Build\vcvars32.bat|vcvars64.bat".
         goto ON_ENV_WARNING_DONE
     )
index 95b0fb6..ec35526 100755 (executable)
@@ -169,7 +169,7 @@ set VSWHERE_TOOLS_BIN=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswh
 :: VS 2019.
 if exist "%VSWHERE_TOOLS_BIN%" (
     echo For VS2019 builds, make sure to run this from within Visual Studio build or using "x86|x64 Native Tools Command Prompt for VS2019" command prompt.
-    for /f "tokens=*" %%a IN ('"%VSWHERE_TOOLS_BIN%" -version [16.0^,17.0] -property installationPath') do (
+    for /f "tokens=*" %%a IN ('"%VSWHERE_TOOLS_BIN%" -version [16.0^,17.0] -prerelease -property installationPath') do (
         echo Setup a "x86|x64 Native Tools Command Prompt for VS2019" command prompt by using "%%a\VC\Auxiliary\Build\vcvars32.bat|vcvars64.bat".
         goto ON_ENV_WARNING_DONE
     )
index 5376d00..b4c4c1f 100644 (file)
@@ -48,7 +48,7 @@ SET VSWHERE_TOOLS_BIN=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswh
 
 ECHO Make sure to run this from a "x64 Native Tools Command Prompt for VS2019" command prompt.
 IF EXIST "%VSWHERE_TOOLS_BIN%" (
-       FOR /F "tokens=*" %%a IN ('"%VSWHERE_TOOLS_BIN%" -version [16.0^,17.0] -property installationPath') DO (
+       FOR /F "tokens=*" %%a IN ('"%VSWHERE_TOOLS_BIN%" -version [16.0^,17.0] -prerelease -property installationPath') DO (
                ECHO Setup a "x64 Native Tools Command Prompt for VS2019 command prompt by using "%%a\VC\Auxiliary\Build\vcvars64.bat".
        )
 )
index ef9ce9c..1d5852e 100755 (executable)
@@ -45,7 +45,7 @@ set VS_2019_DEV_CMD=
 
 :: Try to locate installed VS2019 VC environment.
 if exist "%VSWHERE_TOOLS_BIN%" (
-    for /f "tokens=*" %%a in ('"%VSWHERE_TOOLS_BIN%" -version [16.0^,17.0] -property installationPath') do (
+    for /f "tokens=*" %%a in ('"%VSWHERE_TOOLS_BIN%" -version [16.0^,17.0] -prerelease -property installationPath') do (
         set VS_2019_DEV_CMD=%%a\Common7\Tools\VsMSBuildCmd.bat
     )
 )
index 5371fb0..4c4a925 100755 (executable)
@@ -51,7 +51,7 @@ set VS_2019_VCINSTALL_DIR=
 
 :: Try to locate installed VS2019 VC environment.
 if exist "%VSWHERE_TOOLS_BIN%" (
-    for /f "tokens=*" %%a in ('"%VSWHERE_TOOLS_BIN%" -version [16.0^,17.0] -property installationPath') do (
+    for /f "tokens=*" %%a in ('"%VSWHERE_TOOLS_BIN%" -version [16.0^,17.0] -prerelease -property installationPath') do (
         set VS_2019_VCINSTALL_DIR=%%a\VC\
     )
 )
@@ -207,4 +207,4 @@ goto setup_build_env_exit
 exit /b 1
 
 :setup_build_env_exit
-goto :EOF
\ No newline at end of file
+goto :EOF