Skip to content

Commit b9ef974

Browse files
Merge pull request #1615 from StephanTLavavej/merge_spaceship
feature/spaceship: Merge LLVM update
2 parents 091958d + 05a1c4f commit b9ef974

File tree

63 files changed

+5454
-1079
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+5454
-1079
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ which ships as part of the MSVC toolset and the Visual Studio IDE.
77
* Our [Status Chart][] displays our overall progress over time.
88
* Join our [Discord server][].
99

10-
[![Build Status](https://dev.azure.com/vclibs/STL/_apis/build/status/microsoft.STL?branchName=master)][Pipelines]
10+
[![Build Status](https://dev.azure.com/vclibs/STL/_apis/build/status/microsoft.STL?branchName=main)][Pipelines]
1111

1212
# What This Repo Is Useful For
1313

@@ -57,12 +57,12 @@ issue. The [bug tag][] and [enhancement tag][] are being populated.
5757

5858
# Goals
5959

60-
We're implementing the latest C++ Working Draft, currently [N4868][], which will eventually become the next C++
61-
International Standard, C++20. The terms Working Draft (WD) and Working Paper (WP) are interchangeable; we often
60+
We're implementing the latest C++ Working Draft, currently [N4878][], which will eventually become the next C++
61+
International Standard. The terms Working Draft (WD) and Working Paper (WP) are interchangeable; we often
6262
informally refer to these drafts as "the Standard" while being aware of the difference. (There are other relevant
6363
Standards; for example, supporting `/std:c++14` and `/std:c++17` involves understanding how the C++14 and C++17
6464
Standards differ from the Working Paper, and we often need to refer to the C Standard Library and ECMAScript regular
65-
expression specifications.)
65+
expression specifications.) We're currently prioritizing C++20 features before starting any work on C++23.
6666

6767
Our primary goals are conformance, performance, usability, and compatibility.
6868

@@ -405,10 +405,10 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
405405
[LWG issues]: https://cplusplus.github.io/LWG/lwg-toc.html
406406
[LWG tag]: https://github.com/microsoft/STL/issues?q=is%3Aopen+is%3Aissue+label%3ALWG
407407
[Microsoft Open Source Code of Conduct]: https://opensource.microsoft.com/codeofconduct/
408-
[N4868]: https://wg21.link/n4868
408+
[N4878]: https://wg21.link/n4878
409409
[NOTICE.txt]: NOTICE.txt
410410
[Ninja]: https://ninja-build.org
411-
[Pipelines]: https://dev.azure.com/vclibs/STL/_build/latest?definitionId=4&branchName=master
411+
[Pipelines]: https://dev.azure.com/vclibs/STL/_build/latest?definitionId=4&branchName=main
412412
[Python]: https://www.python.org/downloads/windows/
413413
[Roadmap]: https://github.com/microsoft/STL/wiki/Roadmap
414414
[Status Chart]: https://microsoft.github.io/STL/

azure-devops/checkout-sources.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3+
4+
parameters:
5+
- name: vcpkgSHAVar
6+
type: string
7+
default: vcpkgSHA
8+
- name: llvmSHAVar
9+
type: string
10+
default: llvmSHA
11+
steps:
12+
- checkout: self
13+
clean: true
14+
submodules: false
15+
- task: PowerShell@2
16+
displayName: 'Get submodule SHAs'
17+
timeoutInMinutes: 1
18+
inputs:
19+
targetType: inline
20+
script: |
21+
cd $(Build.SourcesDirectory)
22+
$regexSubmoduleSHA = '^[ \-+]([0-9a-f]+) .*$'
23+
$llvmSHA = git submodule status --cached llvm-project | %{$_ -replace $regexSubmoduleSHA, '$1'}
24+
Write-Host "##vso[task.setvariable variable=${{ parameters.llvmSHAVar }};]$llvmSHA"
25+
$vcpkgSHA = git submodule status --cached vcpkg | %{$_ -replace $regexSubmoduleSHA, '$1'}
26+
Write-Host "##vso[task.setvariable variable=${{ parameters.vcpkgSHAVar }};]$vcpkgSHA"
27+
- script: |
28+
cd $(Build.SourcesDirectory)
29+
if not exist "llvm-project" (
30+
mkdir llvm-project
31+
)
32+
cd llvm-project
33+
34+
if not exist ".git" (
35+
del /S /Q *
36+
git init
37+
)
38+
39+
git remote get-url llvm
40+
if errorlevel 1 (
41+
git remote add llvm https://github.com/llvm/llvm-project.git
42+
git config --local extensions.partialClone llvm
43+
)
44+
45+
git fetch --filter=tree:0 --depth=1 llvm $(${{ parameters.llvmSHAVar }})
46+
git sparse-checkout init --cone
47+
git sparse-checkout set libcxx/test libcxx/utils/libcxx llvm/utils/lit
48+
git reset --quiet --hard FETCH_HEAD
49+
git clean --quiet -x -d -f
50+
displayName: "Checkout LLVM source"
51+
- script: |
52+
cd $(Build.SourcesDirectory)
53+
if not exist "vcpkg" (
54+
mkdir vcpkg
55+
)
56+
cd vcpkg
57+
58+
if not exist ".git" (
59+
del /S /Q *
60+
git init
61+
)
62+
63+
git remote get-url vcpkg
64+
if errorlevel 1 (
65+
git remote add vcpkg https://github.com/Microsoft/vcpkg.git
66+
git config --local extensions.partialClone vcpkg
67+
)
68+
69+
git fetch --filter=tree:0 --depth=1 vcpkg $(${{ parameters.vcpkgSHAVar }})
70+
git checkout -f FETCH_HEAD
71+
displayName: "Checkout vcpkg source"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3+
4+
parameters:
5+
- name: hostArch
6+
type: string
7+
- name: targetArch
8+
type: string
9+
- name: vcpkgLocationVar
10+
type: string
11+
default: vcpkgLocation
12+
- name: targetPlatform
13+
type: string
14+
- name: buildOutputLocationVar
15+
type: string
16+
default: buildOutputLocation
17+
- name: cmakeAdditionalFlags
18+
type: string
19+
default: ''
20+
steps:
21+
- task: PowerShell@2
22+
displayName: 'Get Test Parallelism'
23+
timeoutInMinutes: 1
24+
inputs:
25+
targetType: inline
26+
script: |
27+
$testParallelism = $env:NUMBER_OF_PROCESSORS - 2
28+
Write-Host "##vso[task.setvariable variable=testParallelism;]$testParallelism"
29+
- script: |
30+
if exist "$(${{ parameters.buildOutputLocationVar }})" (
31+
rmdir /S /Q "$(${{ parameters.buildOutputLocationVar }})"
32+
)
33+
call "%PROGRAMFILES(X86)%\Microsoft Visual Studio\2019\Preview\Common7\Tools\VsDevCmd.bat" ^
34+
-host_arch=${{ parameters.hostArch }} -arch=${{ parameters.targetArch }} -no_logo
35+
cmake ${{ parameters.cmakeAdditionalFlags}} -G Ninja ^
36+
-DCMAKE_TOOLCHAIN_FILE=$(${{ parameters.vcpkgLocationVar }})\scripts\buildsystems\vcpkg.cmake ^
37+
-DVCPKG_TARGET_TRIPLET=${{ parameters.targetPlatform }}-windows ^
38+
-DCMAKE_CXX_COMPILER=cl ^
39+
-DCMAKE_BUILD_TYPE=Release ^
40+
-DLIT_FLAGS=$(litFlags) ^
41+
-DCMAKE_CXX_FLAGS=/analyze:autolog- ^
42+
-S $(Build.SourcesDirectory) -B $(${{ parameters.buildOutputLocationVar }})
43+
displayName: 'Configure the STL'
44+
timeoutInMinutes: 2
45+
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
46+
- script: |
47+
call "%PROGRAMFILES(X86)%\Microsoft Visual Studio\2019\Preview\Common7\Tools\VsDevCmd.bat" ^
48+
-host_arch=${{ parameters.hostArch }} -arch=${{ parameters.targetArch }} -no_logo
49+
cmake --build $(${{ parameters.buildOutputLocationVar }})
50+
displayName: 'Build the STL'
51+
timeoutInMinutes: 10
52+
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }

azure-devops/cross-build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3+
4+
parameters:
5+
- name: hostArch
6+
type: string
7+
default: amd64
8+
- name: targetPlatform
9+
type: string
10+
- name: vsDevCmdArch
11+
type: string
12+
- name: buildOutputLocationVar
13+
type: string
14+
default: buildOutputLocation
15+
- name: numShards
16+
type: number
17+
default: 8
18+
jobs:
19+
- job: '${{ parameters.targetPlatform }}'
20+
variables:
21+
fixedFlags: '--timeout=240;--shuffle'
22+
parallelismFlag: '-j$(testParallelism)'
23+
xmlOutputFlag: '--xunit-xml-output=$(${{ parameters.buildOutputLocationVar }})/test-results.xml'
24+
shardFlags: '--num-shards=$(System.TotalJobsInPhase);--run-shard=$(System.JobPositionInPhase)'
25+
litFlags: '$(fixedFlags);$(parallelismFlag);$(xmlOutputFlag);$(shardFlags)'
26+
strategy:
27+
parallel: ${{ parameters.numShards }}
28+
timeoutInMinutes: 360
29+
steps:
30+
- script: |
31+
if exist "$(tmpDir)" (rmdir /S /Q $(tmpDir))
32+
mkdir $(tmpDir)
33+
displayName: 'Setup TMP Directory'
34+
35+
- template: checkout-sources.yml
36+
- template: vcpkg-dependencies.yml
37+
parameters:
38+
targetPlatform: ${{ parameters.targetPlatform }}
39+
- template: cmake-configure-build.yml
40+
parameters:
41+
targetPlatform: ${{ parameters.targetPlatform }}
42+
hostArch: ${{ parameters.hostArch }}
43+
targetArch: ${{ parameters.vsDevCmdArch }}
44+
cmakeAdditionalFlags: '-DTESTS_BUILD_ONLY=ON'
45+
- template: run-tests.yml
46+
parameters:
47+
hostArch: ${{ parameters.hostArch }}
48+
targetPlatform: ${{ parameters.targetPlatform }}
49+
targetArch: ${{ parameters.vsDevCmdArch }}
50+
displayName: 'Build Tests'
51+
publishArtifact: true

azure-devops/native-build-test.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3+
4+
parameters:
5+
- name: targetPlatform
6+
type: string
7+
- name: vsDevCmdArch
8+
type: string
9+
- name: buildOutputLocationVar
10+
type: string
11+
default: buildOutputLocation
12+
- name: numShards
13+
type: number
14+
default: 8
15+
jobs:
16+
- job: '${{ parameters.targetPlatform }}'
17+
variables:
18+
fixedFlags: '--timeout=240;--shuffle'
19+
parallelismFlag: '-j$(testParallelism)'
20+
xmlOutputFlag: '--xunit-xml-output=$(${{ parameters.buildOutputLocationVar }})/test-results.xml'
21+
shardFlags: '--num-shards=$(System.TotalJobsInPhase);--run-shard=$(System.JobPositionInPhase)'
22+
litFlags: '$(fixedFlags);$(parallelismFlag);$(xmlOutputFlag);$(shardFlags)'
23+
strategy:
24+
parallel: ${{ parameters.numShards }}
25+
timeoutInMinutes: 360
26+
steps:
27+
- script: |
28+
if exist "$(tmpDir)" (rmdir /S /Q $(tmpDir))
29+
mkdir $(tmpDir)
30+
displayName: 'Setup TMP Directory'
31+
32+
- template: checkout-sources.yml
33+
- template: vcpkg-dependencies.yml
34+
parameters:
35+
targetPlatform: ${{ parameters.targetPlatform }}
36+
- template: cmake-configure-build.yml
37+
parameters:
38+
targetPlatform: ${{ parameters.targetPlatform }}
39+
targetArch: ${{ parameters.vsDevCmdArch }}
40+
hostArch: ${{ parameters.vsDevCmdArch }}
41+
- template: run-tests.yml
42+
parameters:
43+
hostArch: ${{ parameters.vsDevCmdArch }}
44+
targetPlatform: ${{ parameters.targetPlatform }}
45+
targetArch: ${{ parameters.vsDevCmdArch }}

azure-devops/run-build.yml

Lines changed: 0 additions & 130 deletions
This file was deleted.

0 commit comments

Comments
 (0)