Skip to content

Commit

Permalink
Merge attempt by ./merge_from_main.sh into branch amd-trunk-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikAdamski committed Feb 1, 2024
2 parents 7be1097 + f8be7f2 commit c6b4fd3
Show file tree
Hide file tree
Showing 2,454 changed files with 542,332 additions and 268,183 deletions.
13 changes: 7 additions & 6 deletions .ci/generate-buildkite-pipeline-premerge
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@ set -o pipefail

# Environment variables script works with:

# Fetch origin/main to have an up to date merge base for main...HEAD diff.
git fetch origin main:main
# Set by buildkite
: ${BUILDKITE_PULL_REQUEST_BASE_BRANCH:=}
: ${BUILDKITE_COMMIT:=}
: ${BUILDKITE_BRANCH:=}
# Fetch origin to have an up to date merge base for the diff.
git fetch origin
# List of files affected by this commit
: ${MODIFIED_FILES:=$(git diff --name-only main...HEAD)}
: ${MODIFIED_FILES:=$(git diff --name-only origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}...HEAD)}
# Filter rules for generic windows tests
: ${WINDOWS_AGENTS:='{"queue": "windows"}'}
# Filter rules for generic linux tests
: ${LINUX_AGENTS:='{"queue": "linux"}'}
# Set by buildkite
: ${BUILDKITE_COMMIT:=}
: ${BUILDKITE_BRANCH:=}

reviewID="$(git log --format=%B -n 1 | sed -nE 's/^Review-ID:[[:space:]]*(.+)$/\1/p')"
if [[ "${reviewID}" != "" ]]; then
Expand Down
5 changes: 5 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,8 @@ f6d557ee34b6bbdb1dc32f29e34b4a4a8ad35e81

# [libc++] Format the code base (#74334)
9783f28cbb155e4a8d49c12e1c60ce14dcfaf0c7

# [RFC] compiler-rt builtins cleanup and refactoring
082b89b25faae3e45a023caf51b65ca0f02f377f
0ba22f51d128bee9d69756c56c4678097270e10b
84da0e1bb75f8666cf222d2f600f37bebb9ea389
50 changes: 50 additions & 0 deletions .github/new-prs-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,49 @@ mc:
clang:driver:
- clang/*/Driver/**

compiler-rt:asan:
- compiler-rt/lib/asan/**
- compiler-rt/include/sanitizer/asan_interface.h
- compiler-rt/test/asan/**
- compiler-rt/lib/asan_abi/**
- compiler-rt/test/asan_abi/**

compiler-rt:builtins:
- compiler-rt/lib/builtins/**
- compiler-rt/test/builtins/**

compiler-rt:cfi:
- compiler-rt/lib/cfi/**
- compiler-rt/test/cfi/**

compiler-rt:fuzzer:
- compiler-rt/lib/fuzzer/**
- compiler-rt/include/fuzzer/**
- compiler-rt/test/fuzzer/**

compiler-rt:hwasan:
- compiler-rt/lib/hwasan/**
- compiler-rt/include/sanitizer/hwasan_interface.h
- compiler-rt/test/hwasan/**

compiler-rt:lsan:
- compiler-rt/lib/lsan/**
- compiler-rt/include/sanitizer/lsan_interface.h
- compiler-rt/test/lsan/**

compiler-rt:msan:
- compiler-rt/lib/msan/**
- compiler-rt/include/sanitizer/msan_interface.h
- compiler-rt/test/msan/**

compiler-rt:sanitizer:
- llvm/lib/Transforms/Instrumentation/*Sanitizer*
- compiler-rt/lib/interception/**
- compiler-rt/lib/*san*/**
- compiler-rt/include/sanitizer/**
- compiler-rt/test/*san*/**
- compiler-rt/lib/fuzzer/**
- compiler-rt/include/fuzzer/**
- compiler-rt/test/fuzzer/**
- compiler-rt/lib/scudo/**
- compiler-rt/test/scudo/**
Expand All @@ -89,6 +126,19 @@ compiler-rt:scudo:
- compiler-rt/lib/scudo/**
- compiler-rt/test/scudo/**

compiler-rt:tsan:
- compiler-rt/lib/tsan/**
- compiler-rt/include/sanitizer/tsan_interface.h
- compiler-rt/include/sanitizer/tsan_interface_atomic.h
- compiler-rt/test/tsan/**

compiler-rt:ubsan:
- compiler-rt/lib/ubsan/**
- compiler-rt/include/sanitizer/ubsan_interface.h
- compiler-rt/test/ubsan/**
- compiler-rt/lib/ubsan_minimal/**
- compiler-rt/test/ubsan_minimal/**

xray:
- llvm/tools/llvm-xray/**
- compiler-rt/*/xray/**
Expand Down
38 changes: 22 additions & 16 deletions .github/workflows/containers/github-action-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,35 @@ FROM docker.io/library/ubuntu:22.04 as base
ENV LLVM_SYSROOT=/opt/llvm/

FROM base as toolchain
ENV LLVM_MAJOR=17
ENV LLVM_VERSION=${LLVM_MAJOR}.0.6
ENV LLVM_DIRNAME=clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-22.04
ENV LLVM_FILENAME=${LLVM_DIRNAME}.tar.xz
ENV LLVM_VERSION=17.0.6

RUN apt-get update && \
apt-get install -y \
curl \
xz-utils
wget \
gcc \
g++ \
cmake \
ninja-build \
python3

RUN wget https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-$LLVM_VERSION.tar.gz && tar -xf llvmorg-$LLVM_VERSION.tar.gz

RUN mkdir -p $LLVM_SYSROOT/bin/ $LLVM_SYSROOT/lib/
WORKDIR /llvm-project-llvmorg-$LLVM_VERSION

RUN curl -O -L https://github.com/llvm/llvm-project/releases/download/llvmorg-$LLVM_VERSION/$LLVM_FILENAME
RUN mkdir build

RUN tar -C $LLVM_SYSROOT --strip-components=1 -xJf $LLVM_FILENAME \
$LLVM_DIRNAME/bin/clang \
$LLVM_DIRNAME/bin/clang++ \
$LLVM_DIRNAME/bin/clang-cl \
$LLVM_DIRNAME/bin/clang-$LLVM_MAJOR \
$LLVM_DIRNAME/bin/lld \
$LLVM_DIRNAME/bin/ld.lld \
$LLVM_DIRNAME/lib/clang/
RUN cmake -B ./build -G Ninja ./llvm \
-C ./clang/cmake/caches/BOLT-PGO.cmake \
-DBOOTSTRAP_LLVM_ENABLE_LLD=ON \
-DBOOTSTRAP_BOOTSTRAP_LLVM_ENABLE_LLD=ON \
-DPGO_INSTRUMENT_LTO=Thin \
-DLLVM_ENABLE_RUNTIMES="compiler-rt" \
-DCMAKE_INSTALL_PREFIX="$LLVM_SYSROOT" \
-DLLVM_ENABLE_PROJECTS="bolt;clang;lld;clang-tools-extra" \
-DLLVM_DISTRIBUTION_COMPONENTS="lld;compiler-rt;clang-format" \
-DCLANG_DEFAULT_LINKER="lld"

RUN ninja -C ./build stage2-install-distribution && ninja -C ./build install-distribution && rm -rf ./build

FROM base

Expand Down
35 changes: 2 additions & 33 deletions .github/workflows/issue-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
if: >-
(github.repository == 'llvm/llvm-project') &&
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
Expand All @@ -60,39 +61,7 @@ jobs:
printf "%s" "$COMMENT_BODY" |
./llvm/utils/git/github-automation.py \
--repo "$GITHUB_REPOSITORY" \
--token ${{ github.token }} \
release-workflow \
--branch-repo-token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
--issue-number ${{ github.event.issue.number }} \
auto
create-pull-request:
name: Create Pull Request
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
if: >-
(github.repository == 'llvm/llvm-project') &&
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
contains(github.event.comment.body, '/branch ')
steps:
- name: Fetch LLVM sources
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Environment
run: |
pip install -r ./llvm/utils/git/requirements.txt
- name: Create Pull Request
run: |
printf "%s" "$COMMENT_BODY" |
./llvm/utils/git/github-automation.py \
--repo "$GITHUB_REPOSITORY" \
--token ${{ github.token }} \
--token "${{ secrets.RELEASE_WORKFLOW_PR_CREATE }}" \
release-workflow \
--branch-repo-token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
--issue-number ${{ github.event.issue.number }} \
Expand Down
50 changes: 46 additions & 4 deletions .github/workflows/libcxx-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
if: always()
with:
name: ${{ matrix.config }}-${{ matrix.cxx }}-results
Expand Down Expand Up @@ -124,10 +124,10 @@ jobs:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
if: always() # Upload artifacts even if the build or test suite fails
with:
name: ${{ matrix.config }}-results
name: ${{ matrix.config }}-${{ matrix.cxx }}-results
path: |
**/test-results.xml
**/*.abilist
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
CC: clang-18
CXX: clang++-18
ENABLE_CLANG_TIDY: "OFF"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
if: always()
with:
name: ${{ matrix.config }}-results
Expand All @@ -199,3 +199,45 @@ jobs:
**/CMakeError.log
**/CMakeOutput.log
**/crash_diagnostics/*
windows:
runs-on: windows-2022
needs: [ stage1 ]
strategy:
fail-fast: false
matrix:
include:
- { config: clang-cl-dll, mingw: false }
- { config: clang-cl-static, mingw: false }
- { config: clang-cl-no-vcruntime, mingw: false }
- { config: clang-cl-debug, mingw: false }
- { config: clang-cl-static-crt, mingw: false }
- { config: mingw-dll, mingw: true }
- { config: mingw-static, mingw: true }
- { config: mingw-dll-i686, mingw: true }
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
choco install -y ninja wget
pip install psutil
- name: Install a current LLVM
if: ${{ matrix.mingw != true }}
run: |
choco install -y llvm --version=17.0.6
- name: Install llvm-mingw
if: ${{ matrix.mingw == true }}
run: |
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-ucrt-x86_64.zip
powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
del llvm-mingw*.zip
mv llvm-mingw* c:\llvm-mingw
echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
- name: Add Git Bash to the path
run: |
echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
- name: Set up the MSVC dev environment
if: ${{ matrix.mingw != true }}
uses: ilammy/msvc-dev-cmd@v1
- name: Build and test
run: |
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
9 changes: 4 additions & 5 deletions .github/workflows/llvm-project-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
required: false
os_list:
required: false
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
default: '["ubuntu-latest", "windows-2019", "macOS-13"]'
python_version:
required: false
type: string
Expand All @@ -38,9 +38,7 @@ on:
type: string
# Use windows-2019 due to:
# https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317
# We're using a specific version of macOS due to:
# https://github.com/actions/virtual-environments/issues/5900
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
default: '["ubuntu-latest", "windows-2019", "macOS-13"]'

python_version:
required: false
Expand Down Expand Up @@ -95,7 +93,8 @@ jobs:
# run creates a new cache entry so we want to ensure that we have
# enough cache space for all the tests to run at once and still
# fit under the 10 GB limit.
max-size: 500M
# Default to 2G to workaround: https://github.com/hendrikmuhs/ccache-action/issues/174
max-size: 2G
key: ${{ matrix.os }}
variant: sccache
- name: Build and Test
Expand Down
28 changes: 5 additions & 23 deletions .github/workflows/llvm-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,13 @@ concurrency:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
check_all:
check-all:
if: github.repository_owner == 'llvm'
name: Test llvm,clang,libclc
name: Build and Test
uses: ./.github/workflows/llvm-project-tests.yml
with:
build_target: check-all
projects: clang;libclc

# These need to be separate from the check_all job, becuase there is not enough disk
# space to build all these projects on Windows.
build_lldb:
if: github.repository_owner == 'llvm'
name: Build lldb
uses: ./.github/workflows/llvm-project-tests.yml
with:
build_target: ''
projects: clang;lldb

check_lld:
if: github.repository_owner == 'llvm'
name: Test lld
uses: ./.github/workflows/llvm-project-tests.yml
with:
build_target: check-lld
projects: lld
projects: clang;lld;libclc;lldb

abi-dump-setup:
if: github.repository_owner == 'llvm'
Expand Down Expand Up @@ -143,7 +125,7 @@ jobs:
else
touch llvm.symbols
fi
abi-dumper "$EXTRA_ARGS" -lver ${{ matrix.ref }} -skip-cxx -public-headers ./install/include/${{ needs.abi-dump-setup.outputs.ABI_HEADERS }} -o ${{ matrix.ref }}.abi ./install/lib/libLLVM.so
abi-dumper $EXTRA_ARGS -lver ${{ matrix.ref }} -skip-cxx -public-headers ./install/include/${{ needs.abi-dump-setup.outputs.ABI_HEADERS }} -o ${{ matrix.ref }}.abi ./install/lib/libLLVM.so
# Remove symbol versioning from dumps, so we can compare across major versions.
sed -i 's/LLVM_${{ matrix.llvm_version_major }}/LLVM_NOVERSION/' ${{ matrix.ref }}.abi
- name: Upload ABI file
Expand Down Expand Up @@ -193,7 +175,7 @@ jobs:
# FIXME: Reading of gzip'd abi files on the GitHub runners stop
# working some time in March of 2021, likely due to a change in the
# runner's environment.
abi-compliance-checker "$EXTRA_ARGS" -l libLLVM.so -old build-baseline/*.abi -new build-latest/*.abi || test "${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}" = "llvm-c"
abi-compliance-checker $EXTRA_ARGS -l libLLVM.so -old build-baseline/*.abi -new build-latest/*.abi || test "${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}" = "llvm-c"
- name: Upload ABI Comparison
if: always()
uses: actions/upload-artifact@v3
Expand Down
Loading

0 comments on commit c6b4fd3

Please sign in to comment.