Skip to content

Commit 18d19a7

Browse files
authored
Merge pull request #1 from llvm/main
add support for riscv64 llvm#68735
2 parents 0175a1e + 9b91c54 commit 18d19a7

File tree

4,164 files changed

+628661
-298014
lines changed

Some content is hidden

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

4,164 files changed

+628661
-298014
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#
1111
# This file generates a Buildkite pipeline that triggers the various CI jobs for
12-
# the LLVM project during pre-commit CI (each time a Phabricator diff is uploaded).
12+
# the LLVM project during pre-commit CI.
1313
#
1414
# See https://buildkite.com/docs/agent/v3/cli-pipeline#pipeline-format.
1515
#
@@ -22,19 +22,18 @@ set -o pipefail
2222

2323
# Environment variables script works with:
2424

25-
# Fetch origin/main to have an up to date merge base for main...HEAD diff.
26-
git fetch origin main:main
25+
# Set by buildkite
26+
: ${BUILDKITE_PULL_REQUEST_BASE_BRANCH:=}
27+
: ${BUILDKITE_COMMIT:=}
28+
: ${BUILDKITE_BRANCH:=}
29+
# Fetch origin to have an up to date merge base for the diff.
30+
git fetch origin
2731
# List of files affected by this commit
28-
: ${MODIFIED_FILES:=$(git diff --name-only main...HEAD)}
32+
: ${MODIFIED_FILES:=$(git diff --name-only origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}...HEAD)}
2933
# Filter rules for generic windows tests
3034
: ${WINDOWS_AGENTS:='{"queue": "windows"}'}
3135
# Filter rules for generic linux tests
3236
: ${LINUX_AGENTS:='{"queue": "linux"}'}
33-
# Service agents, for interacting with Phabricator.
34-
: ${SERVICE_AGENTS:='{"queue": "service"}'}
35-
# Set by buildkite
36-
: ${BUILDKITE_COMMIT:=}
37-
: ${BUILDKITE_BRANCH:=}
3837

3938
reviewID="$(git log --format=%B -n 1 | sed -nE 's/^Review-ID:[[:space:]]*(.+)$/\1/p')"
4039
if [[ "${reviewID}" != "" ]]; then
@@ -284,28 +283,3 @@ if [[ "${windows_projects}" != "" ]]; then
284283
- 'bash .ci/monolithic-windows.sh "$(echo ${windows_projects} | tr ' ' ';')" "$(echo ${windows_check_targets})"'
285284
EOF
286285
fi
287-
288-
# If build was triggered from a Phabricator review - send an update back.
289-
if [[ -n "${ph_target_phid:-}" ]]; then
290-
cat << EOF
291-
- continue_on_failure: true
292-
wait: '~'
293-
- label: ':phabricator: update build status on Phabricator'
294-
agents: ${SERVICE_AGENTS}
295-
artifact_paths:
296-
- 'artifacts/**/*'
297-
commands:
298-
- export SRC=\$\${BUILDKITE_BUILD_PATH}/llvm-premerge-checks
299-
- rm -rf \$\${SRC}
300-
- git clone --depth 1 https://github.com/google/llvm-premerge-checks.git "\$\${SRC}"
301-
- cd \$\${SRC}
302-
- git fetch origin "main":x
303-
- git checkout x
304-
- echo "llvm-premerge-checks commit"
305-
- git rev-parse HEAD
306-
- pip install -q -r \$\${SRC}/scripts/requirements.txt
307-
- cd "\$\$BUILDKITE_BUILD_CHECKOUT_PATH"
308-
- \$\${SRC}/scripts/summary.py
309-
timeout_in_minutes: 10
310-
EOF
311-
fi

.ci/generate-buildkite-pipeline-scheduled

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

.github/new-prs-labeler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,13 +594,16 @@ mlgo:
594594
- llvm/include/llvm/Analysis/*Runner.h
595595
- llvm/unittests/Analysis/ML*
596596
- llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp
597+
- llvm/lib/Analysis/TrainingLogger.cpp
597598
- llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
599+
- llvm/include/llvm/Analysis/Utils/TrainingLogger.h
598600
- llvm/test/Analysis/FunctionPropertiesAnalysis/*
599601
- llvm/unittests/Analysis/FunctionPropertiesAnalysisTest.cpp
600602
- llvm/test/Transforms/inline/ML/**
601603
- llvm/lib/CodeGen/ML*
602604
- llvm/unittests/CodeGen/ML*
603605
- llvm/test/CodeGen/MLRegAlloc/**
606+
- llvm/utils/mlgo-utils/*
604607

605608
tools:llvm-exegesis:
606609
- llvm/tools/llvm-exegesis/**

.github/workflows/issue-release-workflow.yml

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
backport-commits:
3434
name: Backport Commits
3535
runs-on: ubuntu-latest
36+
permissions:
37+
issues: write
38+
pull-requests: write
3639
if: >-
3740
(github.repository == 'llvm/llvm-project') &&
3841
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
@@ -58,37 +61,8 @@ jobs:
5861
printf "%s" "$COMMENT_BODY" |
5962
./llvm/utils/git/github-automation.py \
6063
--repo "$GITHUB_REPOSITORY" \
61-
--token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
64+
--token "${{ secrets.RELEASE_WORKFLOW_PR_CREATE }}" \
6265
release-workflow \
66+
--branch-repo-token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
6367
--issue-number ${{ github.event.issue.number }} \
64-
--phab-token ${{ secrets.RELEASE_WORKFLOW_PHAB_TOKEN }} \
65-
auto
66-
67-
create-pull-request:
68-
name: Create Pull Request
69-
runs-on: ubuntu-latest
70-
if: >-
71-
(github.repository == 'llvm/llvm-project') &&
72-
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
73-
contains(github.event.comment.body, '/branch ')
74-
75-
steps:
76-
- name: Fetch LLVM sources
77-
uses: actions/checkout@v4
78-
with:
79-
persist-credentials: false
80-
81-
- name: Setup Environment
82-
run: |
83-
pip install -r ./llvm/utils/git/requirements.txt
84-
85-
- name: Create Pull Request
86-
run: |
87-
printf "%s" "$COMMENT_BODY" |
88-
./llvm/utils/git/github-automation.py \
89-
--repo "$GITHUB_REPOSITORY" \
90-
--token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
91-
release-workflow \
92-
--issue-number ${{ github.event.issue.number }} \
93-
--phab-token ${{ secrets.RELEASE_WORKFLOW_PHAB_TOKEN }} \
9468
auto

.github/workflows/issue-subscriber.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
- name: Setup Automation Script
2323
working-directory: ./llvm/utils/git/
2424
run: |
25-
chmod a+x github-automation.py
2625
pip install -r requirements.txt
2726
2827
- name: Update watchers
@@ -31,7 +30,7 @@ jobs:
3130
env:
3231
LABEL_NAME: ${{ github.event.label.name }}
3332
run: |
34-
./github-automation.py \
33+
python3 ./github-automation.py \
3534
--token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \
3635
issue-subscriber \
3736
--issue-number '${{ github.event.issue.number }}' \

.github/workflows/libclang-python-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ permissions:
66
on:
77
workflow_dispatch:
88
push:
9+
branches:
10+
- 'main'
911
paths:
1012
- 'clang/bindings/python/**'
1113
- 'clang/tools/libclang/**'
@@ -30,6 +32,7 @@ jobs:
3032
check-clang-python:
3133
# Build libclang and then run the libclang Python binding's unit tests.
3234
name: Build and run Python unit tests
35+
if: github.repository == 'llvm/llvm-project'
3336
strategy:
3437
fail-fast: false
3538
matrix:

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ on:
2323
- 'cmake/**'
2424
- '.github/workflows/libcxx-build-and-test.yaml'
2525
schedule:
26-
# Run nightly at 8 AM UTC (or roughly 3 AM eastern)
27-
- cron: '0 3 * * *'
26+
# Run nightly at 08:00 UTC (aka 00:00 Pacific, aka 03:00 Eastern)
27+
- cron: '0 8 * * *'
2828

2929
permissions:
3030
contents: read # Default everything to read-only
@@ -35,7 +35,6 @@ concurrency:
3535

3636

3737
env:
38-
CMAKE: "/opt/bin/cmake"
3938
# LLVM POST-BRANCH bump version
4039
# LLVM POST-BRANCH add compiler test for ToT - 1, e.g. "Clang 17"
4140
# LLVM RELEASE bump remove compiler ToT - 3, e.g. "Clang 15"
@@ -76,7 +75,7 @@ jobs:
7675
CC: ${{ matrix.cc }}
7776
CXX: ${{ matrix.cxx }}
7877
ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
79-
- uses: actions/upload-artifact@v3
78+
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
8079
if: always()
8180
with:
8281
name: ${{ matrix.config }}-${{ matrix.cxx }}-results
@@ -125,10 +124,10 @@ jobs:
125124
CC: ${{ matrix.cc }}
126125
CXX: ${{ matrix.cxx }}
127126
ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
128-
- uses: actions/upload-artifact@v3
127+
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
129128
if: always() # Upload artifacts even if the build or test suite fails
130129
with:
131-
name: ${{ matrix.config }}-results
130+
name: ${{ matrix.config }}-${{ matrix.cxx }}-results
132131
path: |
133132
**/test-results.xml
134133
**/*.abilist
@@ -169,24 +168,18 @@ jobs:
169168
'bootstrapping-build'
170169
]
171170
machine: [ 'libcxx-runners-8-set' ]
172-
std_modules: [ 'OFF' ]
173171
include:
174172
- config: 'generic-cxx26'
175173
machine: libcxx-runners-8-set
176-
std_modules: 'ON'
177174
- config: 'generic-asan'
178175
machine: libcxx-runners-8-set
179-
std_modules: 'OFF'
180176
- config: 'generic-tsan'
181177
machine: libcxx-runners-8-set
182-
std_modules: 'OFF'
183178
- config: 'generic-ubsan'
184179
machine: libcxx-runners-8-set
185-
std_modules: 'OFF'
186180
# Use a larger machine for MSAN to avoid timeout and memory allocation issues.
187181
- config: 'generic-msan'
188182
machine: libcxx-runners-8-set
189-
std_modules: 'OFF'
190183
runs-on: ${{ matrix.machine }}
191184
steps:
192185
- uses: actions/checkout@v4
@@ -196,8 +189,7 @@ jobs:
196189
CC: clang-18
197190
CXX: clang++-18
198191
ENABLE_CLANG_TIDY: "OFF"
199-
ENABLE_STD_MODULES: ${{ matrix.std_modules }}
200-
- uses: actions/upload-artifact@v3
192+
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
201193
if: always()
202194
with:
203195
name: ${{ matrix.config }}-results
@@ -207,3 +199,45 @@ jobs:
207199
**/CMakeError.log
208200
**/CMakeOutput.log
209201
**/crash_diagnostics/*
202+
windows:
203+
runs-on: windows-2022
204+
needs: [ stage1 ]
205+
strategy:
206+
fail-fast: false
207+
matrix:
208+
include:
209+
- { config: clang-cl-dll, mingw: false }
210+
- { config: clang-cl-static, mingw: false }
211+
- { config: clang-cl-no-vcruntime, mingw: false }
212+
- { config: clang-cl-debug, mingw: false }
213+
- { config: clang-cl-static-crt, mingw: false }
214+
- { config: mingw-dll, mingw: true }
215+
- { config: mingw-static, mingw: true }
216+
- { config: mingw-dll-i686, mingw: true }
217+
steps:
218+
- uses: actions/checkout@v4
219+
- name: Install dependencies
220+
run: |
221+
choco install -y ninja wget
222+
pip install psutil
223+
- name: Install a current LLVM
224+
if: ${{ matrix.mingw != true }}
225+
run: |
226+
choco install -y llvm --version=17.0.6
227+
- name: Install llvm-mingw
228+
if: ${{ matrix.mingw == true }}
229+
run: |
230+
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-ucrt-x86_64.zip
231+
powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
232+
del llvm-mingw*.zip
233+
mv llvm-mingw* c:\llvm-mingw
234+
echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
235+
- name: Add Git Bash to the path
236+
run: |
237+
echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
238+
- name: Set up the MSVC dev environment
239+
if: ${{ matrix.mingw != true }}
240+
uses: ilammy/msvc-dev-cmd@v1
241+
- name: Build and test
242+
run: |
243+
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}

.github/workflows/llvm-project-tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
required: false
1515
os_list:
1616
required: false
17-
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
17+
default: '["ubuntu-latest", "windows-2019", "macOS-13"]'
1818
python_version:
1919
required: false
2020
type: string
@@ -38,9 +38,7 @@ on:
3838
type: string
3939
# Use windows-2019 due to:
4040
# https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317
41-
# We're using a specific version of macOS due to:
42-
# https://github.com/actions/virtual-environments/issues/5900
43-
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
41+
default: '["ubuntu-latest", "windows-2019", "macOS-13"]'
4442

4543
python_version:
4644
required: false
@@ -95,7 +93,8 @@ jobs:
9593
# run creates a new cache entry so we want to ensure that we have
9694
# enough cache space for all the tests to run at once and still
9795
# fit under the 10 GB limit.
98-
max-size: 500M
96+
# Default to 2G to workaround: https://github.com/hendrikmuhs/ccache-action/issues/174
97+
max-size: 2G
9998
key: ${{ matrix.os }}
10099
variant: sccache
101100
- name: Build and Test

0 commit comments

Comments
 (0)