Skip to content

Commit

Permalink
Write version.h for netcore and allow preview VS for msvc builds
Browse files Browse the repository at this point in the history
Commit migrated from mono/mono@a5cc4cd
  • Loading branch information
akoeplinger committed Jan 13, 2020
1 parent be051de commit a16ac07
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions src/mono/mono/mini/Makefile.am.in
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/mono/msvc/build-external-btls.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion src/mono/msvc/build-external-llvm.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion src/mono/msvc/scripts/tests/clang-vs2019-toolchain.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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".
)
)
Expand Down
2 changes: 1 addition & 1 deletion src/mono/msvc/setup-vs-msbuild-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)
Expand Down
4 changes: 2 additions & 2 deletions src/mono/msvc/setup-vs-msvcbuild-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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\
)
)
Expand Down Expand Up @@ -207,4 +207,4 @@ goto setup_build_env_exit
exit /b 1

:setup_build_env_exit
goto :EOF
goto :EOF

0 comments on commit a16ac07

Please sign in to comment.