Skip to content

Commit f49cd73

Browse files
committed
Merge remote-tracking branch 'upstream/main' into lldb-dap-readme
2 parents 006f7cb + efb5831 commit f49cd73

File tree

9,472 files changed

+730306
-589554
lines changed

Some content is hidden

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

9,472 files changed

+730306
-589554
lines changed

.github/new-prs-labeler.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ mlgo:
668668
- llvm/lib/CodeGen/ML*
669669
- llvm/unittests/CodeGen/ML*
670670
- llvm/test/CodeGen/MLRegAlloc/**
671-
- llvm/utils/mlgo-utils/*
671+
- llvm/utils/mlgo-utils/**
672672

673673
tools:llvm-exegesis:
674674
- llvm/tools/llvm-exegesis/**
@@ -1008,3 +1008,8 @@ bazel:
10081008

10091009
offload:
10101010
- offload/**
1011+
1012+
tablegen:
1013+
- llvm/include/TableGen/**
1014+
- llvm/lib/TableGen/**
1015+
- llvm/utils/TableGen/**

.github/workflows/commit-access-review.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,10 @@ def main():
358358
gh = github.Github(login_or_token=token)
359359
org = gh.get_organization("llvm")
360360
repo = org.get_repo("llvm-project")
361-
team = org.get_team_by_slug("llvm-committers")
362361
one_year_ago = datetime.datetime.now() - datetime.timedelta(days=365)
363362
triage_list = {}
364-
for member in team.get_members():
365-
triage_list[member.login] = User(member.login, triage_list)
363+
for collaborator in repo.get_collaborators(permission="push"):
364+
triage_list[collaborator.login] = User(collaborator.login, triage_list)
366365

367366
print("Start:", len(triage_list), "triagers")
368367
# Step 0 Check if users have requested commit access in the last year.

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

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,42 @@ jobs:
191191
**/CMakeError.log
192192
**/CMakeOutput.log
193193
**/crash_diagnostics/*
194+
195+
macos:
196+
runs-on: macos-14
197+
needs: [ stage1 ]
198+
strategy:
199+
fail-fast: true
200+
matrix:
201+
config: [
202+
generic-cxx03,
203+
generic-cxx23,
204+
generic-modules,
205+
apple-configuration
206+
]
207+
steps:
208+
- uses: actions/checkout@v4
209+
- uses: maxim-lobanov/setup-xcode@v1
210+
with:
211+
xcode-version: 'latest'
212+
- uses: seanmiddleditch/gha-setup-ninja@master
213+
- name: Build and test
214+
run: |
215+
python3 -m venv .venv
216+
source .venv/bin/activate
217+
python -m pip install psutil
218+
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
219+
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
220+
if: always() # Upload artifacts even if the build or test suite fails
221+
with:
222+
name: macos-${{ matrix.config }}-results
223+
path: |
224+
**/test-results.xml
225+
**/*.abilist
226+
**/CMakeError.log
227+
**/CMakeOutput.log
228+
**/crash_diagnostics/*
229+
194230
windows:
195231
runs-on: windows-2022
196232
needs: [ stage1 ]
@@ -206,6 +242,7 @@ jobs:
206242
- { config: mingw-dll, mingw: true }
207243
- { config: mingw-static, mingw: true }
208244
- { config: mingw-dll-i686, mingw: true }
245+
- { config: mingw-incomplete-sysroot, mingw: true }
209246
steps:
210247
- uses: actions/checkout@v4
211248
- name: Install dependencies
@@ -224,6 +261,12 @@ jobs:
224261
del llvm-mingw*.zip
225262
mv llvm-mingw* c:\llvm-mingw
226263
echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
264+
- name: Simulate a from-scratch build of llvm-mingw
265+
if: ${{ matrix.config == 'mingw-incomplete-sysroot' }}
266+
run: |
267+
rm -r c:\llvm-mingw\include\c++
268+
rm -r c:\llvm-mingw\*-w64-mingw32\lib\libc++*
269+
rm -r c:\llvm-mingw\*-w64-mingw32\lib\libunwind*
227270
- name: Add Git Bash to the path
228271
run: |
229272
echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append

.github/workflows/pr-code-format.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
jobs:
1313
code_formatter:
1414
runs-on: ubuntu-latest
15+
timeout-minutes: 30
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
18+
cancel-in-progress: true
1519
if: github.repository == 'llvm/llvm-project'
1620
steps:
1721
- name: Fetch LLVM sources

.github/workflows/release-asset-audit.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
import github
22
import sys
33

4+
_SPECIAL_CASE_BINARIES = {
5+
"keith": {"clang+llvm-18.1.8-arm64-apple-macos11.tar.xz"},
6+
}
7+
8+
9+
def _is_valid(uploader_name, valid_uploaders, asset_name):
10+
if uploader_name in valid_uploaders:
11+
return True
12+
13+
if uploader_name in _SPECIAL_CASE_BINARIES:
14+
return asset_name in _SPECIAL_CASE_BINARIES[uploader_name]
15+
16+
return False
17+
18+
419
def main():
520
token = sys.argv[1]
621

@@ -41,7 +56,7 @@ def main():
4156
print(
4257
f"{asset.name} : {asset.uploader.login} [{created_at} {updated_at}] ( {asset.download_count} )"
4358
)
44-
if asset.uploader.login not in uploaders:
59+
if not _is_valid(asset.uploader.login, uploaders, asset.name):
4560
with open('comment', 'w') as file:
4661
file.write(f'@{asset.uploader.login} is not a valid uploader.')
4762
sys.exit(1)

.github/workflows/release-binaries-save-stage/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ inputs:
1010
required: true
1111
type: 'string'
1212

13+
permissions:
14+
contents: read
15+
1316
runs:
1417
using: "composite"
1518
steps:
@@ -18,6 +21,9 @@ runs:
1821
- name: Package Build and Source Directories
1922
shell: bash
2023
run: |
24+
# Remove .git/config to avoid leaking GITHUB_TOKEN stored there.
25+
# See https://unit42.paloaltonetworks.com/github-repo-artifacts-leak-tokens/
26+
rm -Rf .git/config
2127
# Windows does not support symlinks, so we need to dereference them.
2228
tar --exclude build/ ${{ (runner.os == 'Windows' && '-h') || '' }} -c . | zstd -T0 -c > ../llvm-project.tar.zst
2329
mv ../llvm-project.tar.zst .

.github/workflows/release-binaries.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,8 @@ jobs:
135135
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_DARWIN_osx_ARCHS=$arches -DBOOTSTRAP_DARWIN_osx_BUILTIN_ARCHS=$arches"
136136
fi
137137
138-
# x86 macOS and x86 Windows have trouble building flang, so disable it.
139-
# Windows: https://github.com/llvm/llvm-project/issues/100202
140-
# macOS: 'rebase opcodes terminated early at offset 1 of 80016' when building __fortran_builtins.mod
141138
build_flang="true"
142139
143-
if [ "$target" = "Windows-X64" ]; then
144-
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_PROJECTS=\"clang;lld;lldb;clang-tools-extra;bolt;polly;mlir\""
145-
build_flang="false"
146-
fi
147-
148140
if [ "${{ runner.os }}" = "Windows" ]; then
149141
# The build times out on Windows, so we need to disable LTO.
150142
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
@@ -450,11 +442,22 @@ jobs:
450442
name: ${{ needs.prepare.outputs.release-binary-filename }}-attestation
451443
path: ${{ needs.prepare.outputs.release-binary-filename }}.jsonl
452444

445+
- name: Checkout Release Scripts
446+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
447+
with:
448+
sparse-checkout: |
449+
llvm/utils/release/github-upload-release.py
450+
llvm/utils/git/requirements.txt
451+
sparse-checkout-cone-mode: false
452+
453+
- name: Install Python Requirements
454+
run: |
455+
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
456+
453457
- name: Upload Release
454458
shell: bash
455459
run: |
456-
sudo apt install python3-github
457-
./llvm-project/llvm/utils/release/github-upload-release.py \
460+
./llvm/utils/release/github-upload-release.py \
458461
--token ${{ github.token }} \
459462
--release ${{ needs.prepare.outputs.release-version }} \
460463
upload \

.github/workflows/release-doxygen.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ on:
2525
description: 'Upload documentation'
2626
required: false
2727
type: boolean
28+
secrets:
29+
RELEASE_TASKS_USER_TOKEN:
30+
description: "Secret used to check user permissions."
31+
required: false
2832

2933
jobs:
3034
release-doxygen:
@@ -63,5 +67,6 @@ jobs:
6367
if: env.upload
6468
env:
6569
GITHUB_TOKEN: ${{ github.token }}
70+
USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
6671
run: |
67-
./llvm/utils/release/github-upload-release.py --token "$GITHUB_TOKEN" --release "${{ inputs.release-version }}" --user "${{ github.actor }}" upload --files ./*doxygen*.tar.xz
72+
./llvm/utils/release/github-upload-release.py --token "$GITHUB_TOKEN" --release "${{ inputs.release-version }}" --user "${{ github.actor }}" --user-token "$USER_TOKEN" upload --files ./*doxygen*.tar.xz

.github/workflows/release-lit.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
description: 'Release Version'
1818
required: true
1919
type: string
20+
secrets:
21+
RELEASE_TASKS_USER_TOKEN:
22+
description: "Secret used to check user permissions."
23+
required: false
2024

2125
jobs:
2226
release-lit:
@@ -36,8 +40,9 @@ jobs:
3640
- name: Check Permissions
3741
env:
3842
GITHUB_TOKEN: ${{ github.token }}
43+
USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
3944
run: |
40-
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} check-permissions
45+
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions
4146
4247
- name: Setup Cpp
4348
uses: aminya/setup-cpp@v1

.github/workflows/release-sources.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
description: Release Version
1717
required: true
1818
type: string
19+
secrets:
20+
RELEASE_TASKS_USER_TOKEN:
21+
description: "Secret used to check user permissions."
22+
required: false
1923
# Run on pull_requests for testing purposes.
2024
pull_request:
2125
paths:

.github/workflows/release-tasks.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,19 @@ jobs:
6666
with:
6767
release-version: ${{ needs.validate-tag.outputs.release-version }}
6868
upload: true
69+
# Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.
70+
secrets:
71+
RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
6972

7073
release-lit:
7174
name: Release Lit
7275
needs: validate-tag
7376
uses: ./.github/workflows/release-lit.yml
7477
with:
7578
release-version: ${{ needs.validate-tag.outputs.release-version }}
79+
# Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.
80+
secrets:
81+
RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
7682

7783
release-binaries:
7884
name: Build Release Binaries
@@ -97,6 +103,9 @@ jobs:
97103
release-version: ${{ needs.validate-tag.outputs.release-version }}
98104
upload: true
99105
runs-on: ${{ matrix.runs-on }}
106+
# Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.
107+
secrets:
108+
RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
100109

101110
release-sources:
102111
name: Package Release Sources
@@ -109,3 +118,6 @@ jobs:
109118
uses: ./.github/workflows/release-sources.yml
110119
with:
111120
release-version: ${{ needs.validate-tag.outputs.release-version }}
121+
# Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.
122+
secrets:
123+
RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,6 +1692,8 @@ class BinaryFunction {
16921692

16931693
void setPseudo(bool Pseudo) { IsPseudo = Pseudo; }
16941694

1695+
void setPreserveNops(bool Value) { PreserveNops = Value; }
1696+
16951697
BinaryFunction &setUsesGnuArgsSize(bool Uses = true) {
16961698
UsesGnuArgsSize = Uses;
16971699
return *this;

0 commit comments

Comments
 (0)