diff options
author | Jose Perez Rodriguez <joperezr@microsoft.com> | 2017-10-03 15:21:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-03 15:21:52 -0700 |
commit | aae414026671e3dc1ccf0f308d351ac04cc746a4 (patch) | |
tree | 7854947379c68e2b03c476f3744db1a699cf1b6a | |
parent | 3716918ee67ea2e8d8271c9a214159e56687f043 (diff) | |
download | coreclr-aae414026671e3dc1ccf0f308d351ac04cc746a4.tar.gz coreclr-aae414026671e3dc1ccf0f308d351ac04cc746a4.tar.bz2 coreclr-aae414026671e3dc1ccf0f308d351ac04cc746a4.zip |
Update Buildtools and Roslyn (#14228)
* Update Buildtools and Roslyn
* Fixing importing of the roslyn files on msbuild 14.0
* Correctly looking for the latest VS Installation
-rw-r--r-- | BuildToolsVersion.txt | 2 | ||||
-rw-r--r-- | build-test.cmd | 17 | ||||
-rw-r--r-- | build.cmd | 18 | ||||
-rw-r--r-- | dependencies.props | 2 | ||||
-rw-r--r-- | dir.props | 4 | ||||
-rw-r--r-- | run.cmd | 26 | ||||
-rw-r--r-- | src/mscorlib/System.Private.CoreLib.csproj | 1 | ||||
-rw-r--r-- | src/mscorlib/shared/System/Globalization/TimeSpanParse.cs | 12 | ||||
-rw-r--r-- | src/mscorlib/shared/System/ReadOnlySpan.cs | 4 | ||||
-rw-r--r-- | src/mscorlib/shared/System/Span.cs | 4 | ||||
-rw-r--r-- | tests/dir.props | 4 | ||||
-rw-r--r-- | tests/runtest.cmd | 17 |
12 files changed, 75 insertions, 36 deletions
diff --git a/BuildToolsVersion.txt b/BuildToolsVersion.txt index c62266d1d7..2c41c4be26 100644 --- a/BuildToolsVersion.txt +++ b/BuildToolsVersion.txt @@ -1 +1 @@ -2.0.0-prerelease-02014-02 +2.0.0-prerelease-02027-03 diff --git a/build-test.cmd b/build-test.cmd index 2544b06e04..b247090604 100644 --- a/build-test.cmd +++ b/build-test.cmd @@ -22,6 +22,23 @@ set __BuildOS=Windows_NT :: is already configured to use that toolset. Otherwise, we will fallback to using the VS2015 :: toolset if it is installed. Finally, we will fail the script if no supported VS instance :: can be found. +if defined VisualStudioVersion goto :Run + +set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" +if exist %_VSWHERE% ( + for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools +) +if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% +if not exist "%_VSCOMNTOOLS%" ( + echo Error: Visual Studio 2015 or 2017 required. + echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions. + exit /b 1 +) + +call "%_VSCOMNTOOLS%\VsDevCmd.bat" + +:Run + if defined VS150COMNTOOLS ( set "__VSToolsRoot=%VS150COMNTOOLS%" set "__VCToolsRoot=%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build" @@ -19,6 +19,24 @@ set __ThisScriptFull="%~f0" :: is already configured to use that toolset. Otherwise, we will fallback to using the VS2015 :: toolset if it is installed. Finally, we will fail the script if no supported VS instance :: can be found. + +if defined VisualStudioVersion goto :Run + +set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" +if exist %_VSWHERE% ( + for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools +) +if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% +if not exist "%_VSCOMNTOOLS%" ( + echo Error: Visual Studio 2015 or 2017 required. + echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions. + exit /b 1 +) + +call "%_VSCOMNTOOLS%\VsDevCmd.bat" + +:Run + if defined VS150COMNTOOLS ( set "__VSToolsRoot=%VS150COMNTOOLS%" set "__VCToolsRoot=%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build" diff --git a/dependencies.props b/dependencies.props index 6db72f61f1..064fcc9a4e 100644 --- a/dependencies.props +++ b/dependencies.props @@ -15,7 +15,7 @@ <PropertyGroup> <CoreFxCurrentRef>ab762a3c35e208cd698988fb7761bc92be417be9</CoreFxCurrentRef> <CoreClrCurrentRef>2a83ae1685d323e6bd206dd2596b953488479922</CoreClrCurrentRef> - <BuildToolsCurrentRef>2a83ae1685d323e6bd206dd2596b953488479922</BuildToolsCurrentRef> + <BuildToolsCurrentRef>28c7860c2887d685986bc1c85de1e822fee91122</BuildToolsCurrentRef> <PgoDataCurrentRef>1a2306063659d9704d06119325ff7c2652b1af0b</PgoDataCurrentRef> </PropertyGroup> @@ -181,6 +181,6 @@ </ItemGroup> <!-- Use Roslyn Compilers to build --> - <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" /> - <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)')" /> + <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false' and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" /> + <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)') and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" /> </Project> @@ -16,27 +16,21 @@ setlocal :: is already configured to use that toolset. Otherwise, we will fallback to using the VS2015 :: toolset if it is installed. Finally, we will fail the script if no supported VS instance :: can be found. -if not defined VisualStudioVersion ( - if defined VS150COMNTOOLS ( - if not exist "%VS150COMNTOOLS%\..\IDE\devenv.exe" goto NoVS - if not exist "%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build\vcvarsall.bat" goto NoVS - if not exist "%VS150COMNTOOLS%\VsDevCmd.bat" goto NoVS - call "%VS150COMNTOOLS%\VsDevCmd.bat" - goto :Run - ) else if defined VS140COMNTOOLS ( - if not exist "%VS140COMNTOOLS%\..\IDE\devenv.exe" goto NoVS - if not exist "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" goto NoVS - if not exist "%VS140COMNTOOLS%\VsDevCmd.bat" goto NoVS - call "%VS140COMNTOOLS%\VsDevCmd.bat" - goto :Run - ) +if defined VisualStudioVersion goto :Run - :NoVS +set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" +if exist %_VSWHERE% ( + for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools +) +if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% +if not exist "%_VSCOMNTOOLS%" ( echo Error: Visual Studio 2015 or 2017 required. - echo https://github.com/dotnet/coreclr/blob/master/Documentation/building/windows-instructions.md for build instructions. + echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions. exit /b 1 ) +call "%_VSCOMNTOOLS%\VsDevCmd.bat" + :Run :: Clear the 'Platform' env variable for this session, as it's a per-project setting within the build, and :: misleading value (such as 'MCD' in HP PCs) may lead to build breakage (issue: #69). diff --git a/src/mscorlib/System.Private.CoreLib.csproj b/src/mscorlib/System.Private.CoreLib.csproj index 77758fbcea..6eda96a87b 100644 --- a/src/mscorlib/System.Private.CoreLib.csproj +++ b/src/mscorlib/System.Private.CoreLib.csproj @@ -39,6 +39,7 @@ <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories> <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)/Documentation</_FullFrameworkReferenceAssemblyPaths> <SkipCommonResourcesIncludes>true</SkipCommonResourcesIncludes> + <LangVersion>7.2</LangVersion> </PropertyGroup> <!-- Add Serviceable attribute to the project's metadata --> <ItemGroup> diff --git a/src/mscorlib/shared/System/Globalization/TimeSpanParse.cs b/src/mscorlib/shared/System/Globalization/TimeSpanParse.cs index f8443a1ea6..cf6a929cc4 100644 --- a/src/mscorlib/shared/System/Globalization/TimeSpanParse.cs +++ b/src/mscorlib/shared/System/Globalization/TimeSpanParse.cs @@ -93,8 +93,7 @@ namespace System.Globalization NumOverflow = 4, // Number that overflowed } - [IsByRefLike] - private struct TimeSpanToken + private ref struct TimeSpanToken { internal TTT _ttt; internal int _num; // Store the number that we are parsing (if any) @@ -131,8 +130,7 @@ namespace System.Globalization } } - [IsByRefLike] - private struct TimeSpanTokenizer + private ref struct TimeSpanTokenizer { private ReadOnlySpan<char> _value; private int _pos; @@ -241,8 +239,7 @@ namespace System.Globalization } /// <summary>Stores intermediary parsing state for the standard formats.</summary> - [IsByRefLike] - private struct TimeSpanRawInfo + private ref struct TimeSpanRawInfo { internal TimeSpanFormat.FormatLiterals PositiveInvariant => TimeSpanFormat.PositiveInvariantFormatLiterals; internal TimeSpanFormat.FormatLiterals NegativeInvariant => TimeSpanFormat.NegativeInvariantFormatLiterals; @@ -1430,8 +1427,7 @@ namespace System.Globalization private static bool TryParseTimeSpanConstant(ReadOnlySpan<char> input, ref TimeSpanResult result) => new StringParser().TryParse(input, ref result); - [IsByRefLike] - private struct StringParser + private ref struct StringParser { private ReadOnlySpan<char> _str; private char _ch; diff --git a/src/mscorlib/shared/System/ReadOnlySpan.cs b/src/mscorlib/shared/System/ReadOnlySpan.cs index 4e1910df60..c5f301a6f2 100644 --- a/src/mscorlib/shared/System/ReadOnlySpan.cs +++ b/src/mscorlib/shared/System/ReadOnlySpan.cs @@ -16,10 +16,8 @@ namespace System /// or native memory, or to memory allocated on the stack. It is type- and memory-safe. /// </summary> [DebuggerDisplay("{DebuggerDisplay,nq}")] - [IsReadOnly] - [IsByRefLike] [NonVersionable] - public struct ReadOnlySpan<T> + public readonly ref struct ReadOnlySpan<T> { /// <summary>A byref or a native ptr.</summary> private readonly ByReference<T> _pointer; diff --git a/src/mscorlib/shared/System/Span.cs b/src/mscorlib/shared/System/Span.cs index f4f4e571de..261b15c078 100644 --- a/src/mscorlib/shared/System/Span.cs +++ b/src/mscorlib/shared/System/Span.cs @@ -22,10 +22,8 @@ namespace System /// or native memory, or to memory allocated on the stack. It is type- and memory-safe. /// </summary> [DebuggerDisplay("{DebuggerDisplay,nq}")] - [IsReadOnly] - [IsByRefLike] [NonVersionable] - public struct Span<T> + public readonly ref struct Span<T> { /// <summary>A byref or a native ptr.</summary> private readonly ByReference<T> _pointer; diff --git a/tests/dir.props b/tests/dir.props index 82c82dd42c..fc32d87e38 100644 --- a/tests/dir.props +++ b/tests/dir.props @@ -84,8 +84,8 @@ <Import Project="$(ProjectDir)..\dependencies.props" /> <!-- Use Roslyn Compilers to build --> - <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" /> - <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)')" /> + <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false' and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" /> + <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)') and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" /> <ItemGroup> <!-- Need to escape double forward slash (%2F) or MSBuild will normalize to one slash on Unix. --> diff --git a/tests/runtest.cmd b/tests/runtest.cmd index 84136a455c..eb1894599f 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -22,6 +22,23 @@ set __MSBuildBuildArch=x64 :: is already configured to use that toolset. Otherwise, we will fallback to using the VS2015 :: toolset if it is installed. Finally, we will fail the script if no supported VS instance :: can be found. +if defined VisualStudioVersion goto :Run + +set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" +if exist %_VSWHERE% ( + for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools +) +if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% +if not exist "%_VSCOMNTOOLS%" ( + echo Error: Visual Studio 2015 or 2017 required. + echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions. + exit /b 1 +) + +call "%_VSCOMNTOOLS%\VsDevCmd.bat" + +:Run + set __VSVersion=vs2017 if defined VS140COMNTOOLS set __VSVersion=vs2015 |