Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade toolset to VS 2019 16.8 Preview 1 #1153

Merged
merged 2 commits into from
Aug 9, 2020

Conversation

StephanTLavavej
Copy link
Member

@StephanTLavavej StephanTLavavej commented Aug 6, 2020

Fixes #1051.

Infrastructure

  • azure-devops/create-vmss.ps1
    • Link to the always-latest version of the Azure PowerShell docs, currently 4.5.0.
    • Add an extra dash to resource names for clarity, changing 'StlBuild-2020-08-07Vmss' to 'StlBuild-2020-08-07-Vmss'.
    • Print $ProvisionImageResult.value.Message, allowing us to see what's happening during VM setup.
  • azure-devops/provision-image.ps1
    • This script is started as NT AUTHORITY\SYSTEM, and then runs itself as an AdminUser (because SYSTEM can't be used to install MSIs). To capture output from the nested invocation, we can use PowerShell's Start-Transcript feature. The AdminUser invocation will save this to a fixed location, C:\provision-image-transcript.txt, so the original invocation can print it out. (This is what's sent to create-vmss.ps1.)
    • Adjust punctuation in messages. Use 'single quote strings' when we don't need to expand variables.
    • Fix Write-Host "Executing $PsExecPath " + @PsExecArgs which was printing a spurious +.
    • Sort the VS workloads for style.
    • Install CMake (including Ninja) and Clang/LLVM via VS.
    • Upgrade the Win10 SDK from 18362 to the latest 19041.
    • Don't manually install CMake 3.16.5; VS installs a customized version of 3.17.
    • Don't manually install LLVM 10.0.0; VS installs this.
    • Don't manually install Ninja 1.10.0; VS installs 1.8.2.
    • Upgrade Python from 3.8.2 to 3.8.5.
    • We don't need the InstallMSI, InstallZip, InstallLLVM functions anymore. (They can always be restored from history if they're ever needed again.)
    • In PipInstall, we need to use "double quote strings to expand $Package".
    • Exclude test.exe from Windows Defender, hoping that this will make test runs faster (it probably won't).
    • Add comments to the PATH update machinery, explaining why it's necessary.
    • Don't add CMake and LLVM to the system-wide PATH; they're available in VS command prompts.
  • azure-devops/enforce-clang-format.cmd
    • Now that LLVM is no longer on the system-wide PATH, use an x64-native VS Dev Command Prompt
      so we can run clang-format.exe here.
  • CMakeLists.txt
    • Increase our required CMake version to 3.17.
    • Increase our required Boost version to 1.73.0 (after the recent vcpkg submodule update).
  • azure-devops/sysprep.ps1
  • azure-pipelines.yml
    • Use the new Agent Pool.

Documentation

  • README.md
    • VS 2019 16.8 Preview 1 is now required.
    • Update the instructions to recommend installing CMake/Ninja and Clang/LLVM via VS.

Product Code

  • stl/inc/bit
  • stl/inc/limits
    • intrin0.h now declares these intrinsics.
  • stl/inc/experimental/coroutine
  • stl/inc/xstring
    • Testing defined(_MSC_VER) is unnecessary; everyone pretends to be MSVC.
  • stl/inc/experimental/resumable
    • _MSC_VER >= 1928 is now always true.
  • stl/inc/system_error
    • _MSC_VER > 1927 is now always true.
    • Provide a new codepath for Clang, which doesn't understand [[msvc::noop_dtor]]. Instead, we can use a
      non-constexpr variable that's static, marked with [[clang::require_constant_initialization]].
  • stl/src/excptptr.cpp
    • _MSC_VER > 1927 is now always true.
  • stl/inc/yvals_core.h
    • Require MSVC 19.28.
    • Provide a simpler form of Temporarily disable concepts usage with EDG #1158. In _HAS_CXX20 mode, we no longer need to inspect __cpp_concepts, as both MSVC and Clang will pass that test.
    • __cpp_lib_coroutine can't be defined to its final value yet. This might be possible (but isn't guaranteed) for VS 2019 16.8 Preview 3.

Test Code

  • tests/std/tests/VSO_0157762_feature_test_macros/test.cpp
  • tests/std/tests/VSO_0971246_legacy_await_headers/env.lst
    • This workaround is no longer needed.

@StephanTLavavej StephanTLavavej added the infrastructure Related to repository automation label Aug 6, 2020
@StephanTLavavej StephanTLavavej self-assigned this Aug 6, 2020
@cbezault

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

stl/inc/system_error Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@StephanTLavavej

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@StephanTLavavej

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@StephanTLavavej

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@StephanTLavavej StephanTLavavej removed their assignment Aug 8, 2020
Fixes microsoft#1051.

Infrastructure
===
* `azure-devops/create-vmss.ps1`
  + Link to the always-latest version of the Azure PowerShell docs, currently 4.5.0.
  + Add an extra dash to resource names for clarity, changing 'StlBuild-2020-08-07Vmss' to 'StlBuild-2020-08-07-Vmss'.
  + Print `$ProvisionImageResult.value.Message`, allowing us to see what's happening during VM setup.
* `azure-devops/provision-image.ps1`
  + This script is started as an ordinary user, and then runs itself as an AdminUser. To capture output from the nested
  invocation, we can use PowerShell's `Start-Transcript` feature. The AdminUser invocation will save this to a fixed
  location, `C:\provision-image-transcript.txt`, so the original invocation can print it out. (This is what's sent
  to `create-vmss.ps1`.)
  + Adjust punctuation in messages. Use `'single quote strings'` when we don't need to expand variables.
  + Fix `Write-Host "Executing $PsExecPath " + @PsExecArgs` which was printing a spurious `+`.
  + Sort the VS workloads for style.
  + Install CMake (including Ninja) and Clang/LLVM via VS.
  + Upgrade the Win10 SDK from 18362 to the latest 19041.
  + Don't manually install CMake 3.16.5; VS installs a customized version of 3.17.
  + Don't manually install LLVM 10.0.0; VS installs this.
  + Don't manually install Ninja 1.10.0; VS installs 1.8.2.
  + Upgrade Python from 3.8.2 to 3.8.5.
  + We don't need the `InstallMSI`, `InstallZip`, `InstallLLVM` functions anymore. (They can always be restored from
  history if they're ever needed again.)
  + In `PipInstall`, we need to use `"double quote strings to expand $Package"`.
  + Exclude `test.exe` from Windows Defender, hoping that this will make test runs faster (it probably won't).
  + Add comments to the PATH update machinery, explaining why it's necessary.
  + Don't add CMake and LLVM to the system-wide PATH; they're available in VS command prompts.
* `azure-devops/enforce-clang-format.cmd`
  + Now that LLVM is no longer on the system-wide PATH, use an x64-native VS Dev Command Prompt
  so we can run `clang-format.exe` here.
* `CMakeLists.txt`
  + Increase our required CMake version to 3.17.
  + Increase our required Boost version to 1.73.0 (after the recent vcpkg submodule update).
* `azure-devops/sysprep.ps1`
  + Add the `/mode:vm` option, documented by
  https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep-command-line-options . This reportedly
  skips a lot of hardware detection, making it faster to boot up the sysprepped image. It also appears to make the
  sysprep step much faster (I timed it at 31 seconds; before this change, it seemed to take an eternity).
* `azure-pipelines.yml`
  + Use the new Agent Pool.

Documentation
===
* `README.md`
  + VS 2019 16.8 Preview 1 is now required.
  + Update the instructions to recommend installing CMake/Ninja and Clang/LLVM via VS.

Product Code
===
* `stl/inc/bit`
* `stl/inc/limits`
  + `intrin0.h` now declares these intrinsics.
* `stl/inc/experimental/coroutine`
* `stl/inc/xstring`
  + Testing `defined(_MSC_VER)` is unnecessary; everyone pretends to be MSVC.
* `stl/inc/experimental/resumable`
  + `_MSC_VER >= 1928` is now always true.
* `stl/inc/system_error`
  + `_MSC_VER > 1927` is now always true.
  + Provide a new codepath for Clang, which doesn't understand `[[msvc::noop_dtor]]`. Instead, we can use a
  non-`constexpr` variable that's `static`, marked with `[[clang::require_constant_initialization]]`.
* `stl/src/excptptr.cpp`
  + `_MSC_VER > 1927` is now always true.
* `stl/inc/yvals_core.h`
  + Require MSVC 19.28.
  + Provide a simpler form of microsoft#1158. In `_HAS_CXX20` mode, we no longer need to inspect `__cpp_concepts`,
  as both MSVC and Clang will pass that test.
  + `__cpp_lib_coroutine` can't be defined to its final value yet. This might be possible (but isn't guaranteed)
  for VS 2019 16.8 Preview 3.

Test Code
===
* `tests/std/tests/VSO_0157762_feature_test_macros/test.cpp`
  + Update the `__cpp_lib_concepts` test accordingly. (microsoft#1158 didn't need to do this, because it was still being built
  with VS 2019 16.7.)
* `tests/std/tests/VSO_0971246_legacy_await_headers/env.lst`
  + This workaround is no longer needed.
azure-devops/provision-image.ps1 Show resolved Hide resolved
@BillyONeal
Copy link
Member

This script is started as an ordinary user, and then runs itself as an AdminUser.

Actually it starts as the most privileged user on the system, NT AUTHORITY\SYSTEM; unfortunately we are using installers that use Windows Installer (MSI) which effectively can't be run from 'service' accounts like SYSTEM, so we needed to make a real user to 'downgrade' to.

Now that LLVM is no longer on the system-wide PATH, use an x64-native VS Dev Command Prompt
so we can run clang-format.exe here.

You might want to just call the cmake scripts that build parallelize.exe in there too so that there's less fragile 'run this thing and pass the path into this thing' if you are embedding that assumption anyway.

@StephanTLavavej
Copy link
Member Author

Thanks for the SYSTEM explanation; I updated the PR description accordingly.

You might want to just call the cmake scripts that build parallelize.exe in there too so that there's less fragile 'run this thing and pass the path into this thing' if you are embedding that assumption anyway.

I thought about that, but if the parallelize.exe build fails, I think that the current scheme is better equipped to report the error. (I also thought about passing the path of clang-format.exe in, but that would involve assuming its location, which VS might conceivably change in the future.)

@BillyONeal
Copy link
Member

Don't manually install Ninja 1.10.0; VS installs 1.8.2.

Do we know why they're up to date on everything but this?

@StephanTLavavej
Copy link
Member Author

Do we know why they're up to date on everything but this?

No; I just sent a mail to the dev team asking about this.

@StephanTLavavej StephanTLavavej self-assigned this Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Related to repository automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

README.md: clang-cl will be added to the Developer Command Prompt PATH
5 participants