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

Toolset update: VS 2022 17.12 Preview 2, Clang 18.1.8 #4947

Merged
merged 30 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c55fc52
PowerShell 7.4.5.
StephanTLavavej Sep 10, 2024
c573e44
Python 3.12.6.
StephanTLavavej Sep 10, 2024
effa779
New pool.
StephanTLavavej Sep 10, 2024
758ad0d
VS 2022 17.12 Preview 2. (Still not updating yvals_core.h)
StephanTLavavej Sep 10, 2024
61fd79b
Clang 18.1.8 (we now require Clang 18).
StephanTLavavej Sep 10, 2024
bea0b23
Remove workarounds for VSO-2170500 (C1XX type trait optimization).
StephanTLavavej Sep 10, 2024
ba2fd03
Clang 18 fixed LLVM-59827.
StephanTLavavej Sep 10, 2024
eaefb98
Clang 18 fixed GH 1586 (remember to mark it as fixed by my PR).
StephanTLavavej Sep 10, 2024
cb41ff0
Clang 18 understands `-Wno-overriding-option`, so drop `-Wno-unknown-…
StephanTLavavej Sep 10, 2024
e1cc6d5
Clang 18 understands `-Wno-nan-infinity-disabled`, so drop `-Wno-unkn…
StephanTLavavej Sep 10, 2024
1b8a20f
Add 'TRANSITION, Clang 20' comment noting that `__builtin_isgreater` …
StephanTLavavej Sep 10, 2024
0852e27
Clang 18 fixed LLVM-62594.
StephanTLavavej Sep 10, 2024
049b2b3
Clang 18 fixed a bug with static call operators.
StephanTLavavej Sep 10, 2024
e7f938a
Expect clang-format 18.1.8.
StephanTLavavej Sep 10, 2024
2742a28
Update .clang-format.
StephanTLavavej Sep 11, 2024
951d4d3
Regen clang-format, no manual changes.
StephanTLavavej Sep 11, 2024
20c3d41
Change AllowBreakBeforeNoexceptSpecifier from Never to OnlyWithParen.
StephanTLavavej Sep 11, 2024
8b164e9
Regen clang-format, no manual changes.
StephanTLavavej Sep 11, 2024
fbce5b3
LLVM-51935 was fixed, but AlignArrayOfStructures appears to be more t…
StephanTLavavej Sep 11, 2024
6db42b6
Manual: Add parens to avoid spaces around arrow operator.
StephanTLavavej Sep 11, 2024
324ec0c
Manual: Detach comment.
StephanTLavavej Sep 11, 2024
1a6a0ee
Manual: Add forced wrapping before trailing return types.
StephanTLavavej Sep 11, 2024
ba89fdd
Manual: Remove forced wrapping.
StephanTLavavej Sep 11, 2024
6f8fa67
Manual: Remove lots of clang-format suppression.
StephanTLavavej Sep 11, 2024
16131a0
Manual: Remove clang-format suppression and introduce parens.
StephanTLavavej Sep 11, 2024
63bcdbb
Manual: Shrink clang-format suppression in `<concepts>` down to `conc…
StephanTLavavej Sep 11, 2024
b2e9e03
Comment: Mention `<Windows.h>` with correct capitalization.
StephanTLavavej Sep 11, 2024
7b5f243
Overhaul header sorting.
StephanTLavavej Sep 11, 2024
9204386
Clang 18 didn't fix the bug affecting `_Zip_transform_constraints` an…
StephanTLavavej Sep 10, 2024
4b3fbb9
Add newlines to save one column and stay within 120.
StephanTLavavej Sep 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 40 additions & 15 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# https://releases.llvm.org/17.0.1/tools/clang/docs/ClangFormatStyleOptions.html
# https://releases.llvm.org/18.1.8/tools/clang/docs/ClangFormatStyleOptions.html

# To update this .clang-format file for a new clang-format version:
# 1. Update the documentation link above.
# 2. Copy the output of `clang-format -dump-config` into a temporary file.
# a. Comment out all of its lines.
# b. Uncomment `BasedOnStyle: LLVM`.
# 3. Compare that temporary file to this .clang-format file.
# 4. Adjust this .clang-format file to record new and updated options.
# a. Read the new documentation to understand such changes.
# 5. The goal is for the comparison from the temporary file to this .clang-format file to be pure additions (green).
# a. That is, comments here are recording the defaults, while added lines are our customized settings.

---
# Language: Cpp
Expand All @@ -11,31 +22,34 @@ AccessModifierOffset: -4
# AlignAfterOpenBracket: Align
AlignAfterOpenBracket: DontAlign
# AlignArrayOfStructures: None
# TRANSITION, LLVM-51935 (try using AlignArrayOfStructures after this crash is fixed)
# AlignConsecutiveAssignments:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: true
AlignConsecutiveAssignments: Consecutive
# AlignConsecutiveBitFields:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveDeclarations:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveMacros:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
AlignConsecutiveMacros: Consecutive
# AlignConsecutiveShortCaseStatements:
Expand All @@ -54,8 +68,11 @@ AlignTrailingComments:
Kind: Never
# AllowAllArgumentsOnNextLine: true
# AllowAllParametersOfDeclarationOnNextLine: true
# AllowBreakBeforeNoexceptSpecifier: Never
AllowBreakBeforeNoexceptSpecifier: OnlyWithParen
# AllowShortBlocksOnASingleLine: Never
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortCompoundRequirementOnASingleLine: true
# AllowShortEnumsOnASingleLine: true
# AllowShortFunctionsOnASingleLine: All
AllowShortFunctionsOnASingleLine: Empty
Expand Down Expand Up @@ -91,7 +108,9 @@ AlwaysBreakTemplateDeclarations: Yes
# SplitEmptyFunction: true
# SplitEmptyRecord: true
# SplitEmptyNamespace: true
# BreakAfterAttributes: Never
# BreakAdjacentStringLiterals: true
# BreakAfterAttributes: Leave
BreakAfterAttributes: Never
# BreakAfterJavaFieldAnnotations: false
# BreakArrays: true
# BreakBeforeBinaryOperators: None
Expand Down Expand Up @@ -138,20 +157,23 @@ IncludeBlocks: Regroup
# SortPriority: 0
# CaseSensitive: false
IncludeCategories:
- Regex: '^<yvals(_core)?\.h>$'
Priority: 1
- Regex: '^<(Windows|userenv)\.h>$'
Priority: 3
SortPriority: 3
- Regex: '^<WinIoCtl\.h>$'
Priority: 3
SortPriority: 4
- Regex: '^<__.*\.hpp>$'
Priority: 2
- Regex: '^<(yvals|yvals_core)\.h>$'
Priority: 10
- Regex: '^<__msvc_.*\.hpp>$'
Priority: 20
- Regex: '^<initguid\.h>$' # <initguid.h> should be included before any header that includes <guiddef.h>
Priority: 30
SortPriority: 30
- Regex: '^<(DbgEng|DbgHelp|Shlwapi|Windows)\.h>$'
Priority: 30
SortPriority: 31
- Regex: '^<winioctl\.h>$'
Priority: 30
SortPriority: 32
- Regex: '\.hpp[>"]$'
Priority: 5
Priority: 40
- Regex: '.*'
Priority: 2
Priority: 20
# IncludeIsMainRegex: '(Test)?$'
# IncludeIsMainSourceRegex: ''
# IndentAccessModifiers: false
Expand Down Expand Up @@ -203,6 +225,7 @@ NamespaceIndentation: All
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakOpenParenthesis: 0
# PenaltyBreakScopeResolution: 500
# PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000
Expand All @@ -222,6 +245,7 @@ RemoveSemicolon: true
# RequiresExpressionIndentation: OuterScope
# SeparateDefinitionBlocks: Leave
# ShortNamespaceLines: 1
# SkipMacroDefinitionBody: false
# SortIncludes: CaseSensitive
# SortJavaStaticImport: Before
# SortUsingDeclarations: LexicographicNumeric
Expand All @@ -244,6 +268,7 @@ SpaceAfterCStyleCast: true
# AfterFunctionDeclarationName: false
# AfterIfMacros: true
# AfterOverloadedOperator: false
# AfterPlacementOperator: true
# AfterRequiresInClause: false
# AfterRequiresInExpression: false
# BeforeNonEmptyParentheses: false
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,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.12 Preview 1 or later.
1. Install Visual Studio 2022 17.12 Preview 2 or later.
* Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer.
* Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer
if you would like to build the ARM64/ARM64EC target.
Expand All @@ -160,7 +160,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.12 Preview 1 or later.
1. Install Visual Studio 2022 17.12 Preview 2 or later.
* Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer.
* Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer
if you would like to build the ARM64/ARM64EC target.
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

variables:
- name: poolName
value: 'StlBuild-2024-08-14T0018-Pool'
value: 'StlBuild-2024-09-10T1506-Pool'
readonly: true
- name: poolDemands
value: 'EnableSpotVM -equals false'
Expand Down
4 changes: 2 additions & 2 deletions azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ foreach ($workload in $VisualStudioWorkloads) {
}

# https://github.com/PowerShell/PowerShell/releases/latest
$PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.4.4/PowerShell-7.4.4-win-x64.msi'
$PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.4.5/PowerShell-7.4.5-win-x64.msi'
$PowerShellArgs = @('/quiet', '/norestart')

$PythonUrl = 'https://www.python.org/ftp/python/3.12.5/python-3.12.5-amd64.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.12.6/python-3.12.6-amd64.exe'
$PythonArgs = @('/quiet', 'InstallAllUsers=1', 'PrependPath=1', 'CompileAll=1', 'Include_doc=0')

$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_551.61_windows.exe'
Expand Down
27 changes: 0 additions & 27 deletions stl/inc/__msvc_bit_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,45 +127,18 @@ _NODISCARD int _Checked_x86_x64_countl_zero(const _Ty _Val) noexcept {
#endif // (defined(_M_IX86) && !defined(_M_HYBRID_X86_ARM64)) || (defined(_M_X64) && !defined(_M_ARM64EC))

#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC) || defined(_M_HYBRID_X86_ARM64)
#ifdef __clang__ // TRANSITION, GH-1586
_NODISCARD constexpr int _Clang_arm_arm64_countl_zero(const unsigned short _Val) {
return __builtin_clzs(_Val);
}

_NODISCARD constexpr int _Clang_arm_arm64_countl_zero(const unsigned int _Val) {
return __builtin_clz(_Val);
}

_NODISCARD constexpr int _Clang_arm_arm64_countl_zero(const unsigned long _Val) {
return __builtin_clzl(_Val);
}

_NODISCARD constexpr int _Clang_arm_arm64_countl_zero(const unsigned long long _Val) {
return __builtin_clzll(_Val);
}
#endif // TRANSITION, GH-1586

template <class _Ty>
_NODISCARD int _Checked_arm_arm64_countl_zero(const _Ty _Val) noexcept {
constexpr int _Digits = _Unsigned_integer_digits<_Ty>;
if (_Val == 0) {
return _Digits;
}

#ifdef __clang__ // TRANSITION, GH-1586
if constexpr (is_same_v<remove_cv_t<_Ty>, unsigned char>) {
return _Clang_arm_arm64_countl_zero(static_cast<unsigned short>(_Val))
- (_Unsigned_integer_digits<unsigned short> - _Digits);
} else {
return _Clang_arm_arm64_countl_zero(_Val);
}
#else // ^^^ workaround / no workaround vvv
if constexpr (_Digits <= 32) {
return static_cast<int>(_CountLeadingZeros(_Val)) - (_Unsigned_integer_digits<unsigned long> - _Digits);
} else {
return static_cast<int>(_CountLeadingZeros64(_Val));
}
#endif // ^^^ no workaround ^^^
}
#endif // defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC) || defined(_M_HYBRID_X86_ARM64)
#endif // _HAS_COUNTL_ZERO_INTRINSICS
Expand Down
Loading