Skip to content

Commit

Permalink
Merge branch 'main' into join_with
Browse files Browse the repository at this point in the history
  • Loading branch information
cpplearner authored May 1, 2022
2 parents 8958a22 + 39332e1 commit f12457c
Show file tree
Hide file tree
Showing 168 changed files with 7,109 additions and 3,766 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/update-status-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ">=17.5.0"
node-version: ">=17.8.0"
- name: Install Packages
run: |
npm ci
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ add_compile_definitions(
_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH WIN32_LEAN_AND_MEAN STRICT _CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS
_CRT_DECLARE_NONSTDC_NAMES=1 )

add_compile_options(/diagnostics:caret /W4 /WX /w14265 /w15038 /d1FastFail /guard:cf /Z7 /Gm- /Gy /Zp8 /std:c++latest /permissive- /Zc:threadSafeInit- /Zl /ZH:SHA_256)
add_compile_options(/diagnostics:caret /W4 /WX /w14265 /w15038 /d1FastFail /guard:cf /Z7 /Gy /Zp8 /std:c++latest /permissive- /Zc:threadSafeInit- /Zl)

set(VCLIBS_DEBUG_OPTIONS "/Od")
set(VCLIBS_RELEASE_OPTIONS "/O2;/Os") # TRANSITION: Potentially remove /Os
Expand Down Expand Up @@ -86,3 +86,9 @@ if(BUILD_TESTING)
enable_testing()
add_subdirectory(tests)
endif()

add_subdirectory(tools/format EXCLUDE_FROM_ALL)
if(TARGET clang-format-all)
add_custom_target(format)
add_dependencies(format clang-format-all)
endif()
49 changes: 49 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,52 @@ In addition, certain files include the notices provided below.
// of this Software are embedded into a machine-executable object form of such
// source code, you may redistribute such embedded portions in such object form
// without including the above copyright and permission notices.

----------------------

// UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
//
// See Terms of Use <https://www.unicode.org/copyright.html>
// for definitions of Unicode Inc.'s Data Files and Software.
//
// NOTICE TO USER: Carefully read the following legal agreement.
// BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
// DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
// YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
// TERMS AND CONDITIONS OF THIS AGREEMENT.
// IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
// THE DATA FILES OR SOFTWARE.
//
// COPYRIGHT AND PERMISSION NOTICE
//
// Copyright (c) 1991-2022 Unicode, Inc. All rights reserved.
// Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of the Unicode data files and any associated documentation
// (the "Data Files") or Unicode software and any associated documentation
// (the "Software") to deal in the Data Files or Software
// without restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, and/or sell copies of
// the Data Files or Software, and to permit persons to whom the Data Files
// or Software are furnished to do so, provided that either
// (a) this copyright and permission notice appear with all copies
// of the Data Files or Software, or
// (b) this copyright and permission notice appear in associated
// Documentation.
//
// THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT OF THIRD PARTY RIGHTS.
// IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
// NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
// DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
// DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
// TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THE DATA FILES OR SOFTWARE.
//
// Except as contained in this notice, the name of a copyright holder
// shall not be used in advertising or otherwise to promote the sale,
// use or other dealings in these Data Files or Software without prior
// written authorization of the copyright holder.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ issue. The [bug tag][] and [enhancement tag][] are being populated.

# Goals

We're implementing the latest C++ Working Draft, currently [N4901][], which will eventually become the next C++
We're implementing the latest C++ Working Draft, currently [N4910][], which will eventually become the next C++
International Standard. The terms Working Draft (WD) and Working Paper (WP) are interchangeable; we often
informally refer to these drafts as "the Standard" while being aware of the difference. (There are other relevant
Standards; for example, supporting `/std:c++14` and `/std:c++17` involves understanding how the C++14 and C++17
Expand Down Expand Up @@ -121,7 +121,7 @@ reproducing the bug.

* You should be reasonably confident that you're looking at an actual implementation bug, instead of undefined behavior
or surprising-yet-Standard behavior. Comparing against other implementations can help (but remember that implementations
can differ while conforming to the Standard); try Godbolt's [Compiler Explorer][] and [Wandbox][]. If you still aren't
can differ while conforming to the Standard); try Godbolt's [Compiler Explorer][]. If you still aren't
sure, ask the nearest C++ expert.

* You should prepare a self-contained command-line test case, ideally as small as possible. We need a source file, a
Expand All @@ -140,7 +140,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem

# How To Build With The Visual Studio IDE

1. Install Visual Studio 2022 17.2 Preview 2 or later.
1. Install Visual Studio 2022 17.2 Preview 3 or later.
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
This will ensure that you're using supported versions of CMake and Ninja.
* Otherwise, install [CMake][] 3.22 or later, and [Ninja][] 1.10.2 or later.
Expand All @@ -155,7 +155,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem

# How To Build With A Native Tools Command Prompt

1. Install Visual Studio 2022 17.2 Preview 2 or later.
1. Install Visual Studio 2022 17.2 Preview 3 or later.
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
This will ensure that you're using supported versions of CMake and Ninja.
* Otherwise, install [CMake][] 3.22 or later, and [Ninja][] 1.10.2 or later.
Expand Down Expand Up @@ -484,14 +484,13 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
[LWG issues]: https://cplusplus.github.io/LWG/lwg-toc.html
[LWG tag]: https://github.com/microsoft/STL/issues?q=is%3Aopen+is%3Aissue+label%3ALWG
[Microsoft Open Source Code of Conduct]: https://opensource.microsoft.com/codeofconduct/
[N4901]: https://wg21.link/n4901
[N4910]: https://wg21.link/n4910
[NOTICE.txt]: NOTICE.txt
[Ninja]: https://ninja-build.org
[Pipelines]: https://dev.azure.com/vclibs/STL/_build/latest?definitionId=4&branchName=main
[Python]: https://www.python.org/downloads/windows/
[Roadmap]: https://github.com/microsoft/STL/wiki/Roadmap
[Status Chart]: https://microsoft.github.io/STL/
[Wandbox]: https://wandbox.org
[bug tag]: https://github.com/microsoft/STL/issues?q=is%3Aopen+is%3Aissue+label%3Abug
[cxx20 tag]: https://github.com/microsoft/STL/issues?q=is%3Aopen+is%3Aissue+label%3Acxx20
[enhancement tag]: https://github.com/microsoft/STL/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement
Expand Down
29 changes: 29 additions & 0 deletions azure-devops/create-prdiff.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

[CmdletBinding(PositionalBinding = $False)]
Param(
[Parameter(Mandatory = $True)]
[String]$DiffFile
)

Start-Process -FilePath 'git' -ArgumentList 'diff' `
-NoNewWindow -Wait `
-RedirectStandardOutput $DiffFile
if (0 -ne (Get-Item -LiteralPath $DiffFile).Length) {
$message = @(
'##vso[task.logissue type=error]The formatting of the files in the repo was not what we expected.'
'Please access the diff from format.diff in the build artifacts'
'(you can download it by clicking the three dots at the right)'
'and apply it with `git apply`.'
'Alternatively, you can run the `format` CMake target:'
' cmake --build <builddir> --target format'
''
'##[group]Expected formatting - click to expand diff'
Get-Content -LiteralPath $DiffFile -Raw
'##[endgroup]'
"##vso[artifact.upload artifactname=format.diff]$DiffFile"
'##vso[task.complete result=Failed]DONE'
)
Write-Host ($message -join "`n")
}
14 changes: 0 additions & 14 deletions azure-devops/enforce-clang-format.cmd

This file was deleted.

5 changes: 2 additions & 3 deletions azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,13 @@ $Workloads = @(
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
'Microsoft.VisualStudio.Component.VC.Tools.ARM64EC',
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
# TRANSITION, LLVM-51128 (Clang 12 targeting ARM64 is incompatible with WinSDK 10.0.20348.0)
'Microsoft.VisualStudio.Component.Windows10SDK.19041'
'Microsoft.VisualStudio.Component.Windows11SDK.22000'
)

$ReleaseInPath = 'Preview'
$Sku = 'Enterprise'
$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.10.3/python-3.10.3-amd64.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe'

$CudaUrl = `
'https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe'
Expand Down
4 changes: 0 additions & 4 deletions azure-devops/validate-files.cmd

This file was deleted.

47 changes: 23 additions & 24 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ variables:
tmpDir: 'D:\Temp'
buildOutputLocation: 'D:\build'

pool: 'StlBuild-2022-03-17-T1445'
pool: 'StlBuild-2022-04-12-T1624'

stages:
- stage: Code_Format
Expand All @@ -17,7 +17,8 @@ stages:
timeoutInMinutes: 90
displayName: 'Validation'
variables:
buildOutputLocation: 'D:\tools'
- name: DiffFile
value: '$(Build.ArtifactStagingDirectory)/format.diff'
steps:
- script: |
if exist "$(tmpDir)" (
Expand All @@ -29,34 +30,32 @@ stages:
clean: true
submodules: false
- script: |
if exist "$(buildOutputLocation)" (
rmdir /S /Q "$(buildOutputLocation)"
)
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
-host_arch=amd64 -arch=amd64 -no_logo
cmake -G Ninja -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release ^
-S $(Build.SourcesDirectory)\tools -B $(buildOutputLocation)
cmake --build $(buildOutputLocation)
displayName: 'Build Support Tools'
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
- task: BatchScript@1
displayName: 'Enforce clang-format'
timeoutInMinutes: 60
-host_arch=amd64 -arch=amd64 -no_logo
cmake -G Ninja -S $(Build.SourcesDirectory)/tools/format -B $(tmpDir)/format-build
cmake --build $(tmpDir)/format-build
displayName: 'clang-format'
timeoutInMinutes: 5
condition: succeededOrFailed()
inputs:
filename: 'azure-devops/enforce-clang-format.cmd'
failOnStandardError: true
arguments: '$(buildOutputLocation)/parallelize/parallelize.exe'
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
- task: BatchScript@1
- script: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
-host_arch=amd64 -arch=amd64 -no_logo
cmake -G Ninja -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release ^
-S $(Build.SourcesDirectory)/tools/validate -B $(tmpDir)/validate-build
cmake --build $(tmpDir)/validate-build
"$(tmpDir)\validate-build\validate.exe"
displayName: 'Validate Files'
timeoutInMinutes: 2
timeoutInMinutes: 5
condition: succeededOrFailed()
inputs:
filename: 'azure-devops/validate-files.cmd'
failOnStandardError: true
arguments: '$(buildOutputLocation)/validate/validate.exe'
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
- task: Powershell@2
displayName: 'Create Diff'
inputs:
filePath: azure-devops/create-prdiff.ps1
arguments: '-DiffFile $(DiffFile)'
pwsh: false
condition: succeededOrFailed()

- stage: Build_And_Test_x64
dependsOn: Code_Format
Expand Down
4 changes: 2 additions & 2 deletions docs/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"type": "git",
"git": {
"repositoryUrl": "https://github.com/llvm/llvm-project.git",
"commitHash": "fc2a5ef9c8754fe3fbdf96483901ca3f13406b35"
"commitHash": "b8d38e8b4fcab071c5c4cb698e154023d06de69e"
}
}
},
Expand All @@ -23,7 +23,7 @@
"type": "git",
"git": {
"repositoryUrl": "https://github.com/microsoft/STL.git",
"commitHash": "ee5a216b516ef033d9153b324842369eee7653d1"
"commitHash": "9bf8f3f9b03ff71ea83baff189eb1d6a46dd48e1"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion stl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
set(HEADERS
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_all_public_headers.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_chrono.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_format_ucd_tables.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_int128.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_system_error_abi.hpp
${CMAKE_CURRENT_LIST_DIR}/inc/__msvc_tzdb.hpp
Expand Down Expand Up @@ -458,7 +459,7 @@ function(add_stl_dlls D_SUFFIX THIS_CONFIG_DEFINITIONS THIS_CONFIG_COMPILE_OPTIO
target_compile_options(msvcp${D_SUFFIX}_eha_objects PRIVATE "${THIS_CONFIG_COMPILE_OPTIONS};${GL_FLAG};/EHa")

add_library(msvcp${D_SUFFIX} SHARED)
target_link_libraries(msvcp${D_SUFFIX} PRIVATE msvcp${D_SUFFIX}_eha_objects msvcp${D_SUFFIX}_objects msvcp${D_SUFFIX}_init_objects "${TOOLSET_LIB}/vcruntime${D_SUFFIX}.lib" "${TOOLSET_LIB}/msvcrt${D_SUFFIX}.lib" "ucrt${D_SUFFIX}.lib")
target_link_libraries(msvcp${D_SUFFIX} PRIVATE msvcp${D_SUFFIX}_eha_objects msvcp${D_SUFFIX}_objects msvcp${D_SUFFIX}_init_objects "${TOOLSET_LIB}/vcruntime${D_SUFFIX}.lib" "${TOOLSET_LIB}/msvcrt${D_SUFFIX}.lib" "ucrt${D_SUFFIX}.lib" "ole32.lib")
set_target_properties(msvcp${D_SUFFIX} PROPERTIES ARCHIVE_OUTPUT_NAME "msvcp140_base${D_SUFFIX}${VCLIBS_SUFFIX}")
set_target_properties(msvcp${D_SUFFIX} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
set_target_properties(msvcp${D_SUFFIX} PROPERTIES OUTPUT_NAME "msvcp140${D_SUFFIX}${VCLIBS_SUFFIX}")
Expand Down
1 change: 0 additions & 1 deletion stl/inc/__msvc_all_public_headers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#endif // TRANSITION, OS-17090155 (UCRT)

#define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING
#define _SILENCE_CXX17_STRSTREAM_DEPRECATION_WARNING
#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS

Expand Down
Loading

0 comments on commit f12457c

Please sign in to comment.