Skip to content

Commit f0367c3

Browse files
committed
Merge branch 'llvm-11.1.0-merge' into release_11.x
2 parents 6792293 + c65c52d commit f0367c3

File tree

836 files changed

+29479
-7336
lines changed

Some content is hidden

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

836 files changed

+29479
-7336
lines changed

Diff for: .github/workflows/clang-tests.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Clang Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/**'
7+
paths:
8+
- 'clang/**'
9+
- 'llvm/**'
10+
- '.github/workflows/clang-tests.yml'
11+
pull_request:
12+
paths:
13+
- 'clang/**'
14+
- 'llvm/**'
15+
- '.github/workflows/clang-tests.yml'
16+
17+
jobs:
18+
build_clang:
19+
name: clang check-all
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os:
25+
- ubuntu-latest
26+
- windows-latest
27+
- macOS-latest
28+
steps:
29+
- name: Setup Windows
30+
if: startsWith(matrix.os, 'windows')
31+
uses: llvm/actions/setup-windows@main
32+
with:
33+
arch: amd64
34+
- name: Install Ninja
35+
uses: llvm/actions/install-ninja@main
36+
- uses: actions/checkout@v1
37+
with:
38+
fetch-depth: 1
39+
- name: Test clang
40+
uses: llvm/actions/build-test-llvm-project@main
41+
with:
42+
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release
43+
build_target: check-clang

Diff for: .github/workflows/libclang-abi-tests.yml

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: libclang ABI Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/**'
7+
paths:
8+
- 'clang/**'
9+
- '.github/workflows/libclang-abi-tests.yml'
10+
pull_request:
11+
paths:
12+
- 'clang/**'
13+
- '.github/workflows/libclang-abi-tests.yml'
14+
15+
jobs:
16+
abi-dump-setup:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
BASELINE_REF: ${{ steps.vars.outputs.BASELINE_REF }}
20+
ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }}
21+
ABI_LIBS: ${{ steps.vars.outputs.ABI_LIBS }}
22+
BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }}
23+
LLVM_VERSION_MAJOR: ${{ steps.version.outputs.LLVM_VERSION_MAJOR }}
24+
LLVM_VERSION_MINOR: ${{ steps.version.outputs.LLVM_VERSION_MINOR }}
25+
LLVM_VERSION_PATCH: ${{ steps.version.outputs.LLVM_VERSION_PATCH }}
26+
steps:
27+
- name: Checkout source
28+
uses: actions/checkout@v1
29+
with:
30+
fetch-depth: 1
31+
32+
- name: Get LLVM version
33+
id: version
34+
uses: llvm/actions/get-llvm-version@main
35+
36+
- name: Setup Variables
37+
id: vars
38+
run: |
39+
if [ ${{ steps.version.outputs.LLVM_VERSION_MINOR }} -ne 0 -o ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then
40+
echo ::set-output name=BASELINE_VERSION_MAJOR::$(( ${{ steps.version.outputs.LLVM_VERSION_MAJOR }} - 1))
41+
echo ::set-output name=ABI_HEADERS::clang-c
42+
echo ::set-output name=ABI_LIBS::libclang.so
43+
else
44+
echo ::set-output name=BASELINE_VERSION_MAJOR::${{ steps.version.outputs.LLVM_VERSION_MAJOR }}
45+
echo ::set-output name=ABI_HEADERS::.
46+
echo ::set-output name=ABI_LIBS::libclang.so libclang-cpp.so
47+
fi
48+
49+
abi-dump:
50+
needs: abi-dump-setup
51+
runs-on: ubuntu-latest
52+
strategy:
53+
matrix:
54+
name:
55+
- build-baseline
56+
- build-latest
57+
include:
58+
- name: build-baseline
59+
llvm_version_major: ${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}
60+
ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.0.0
61+
repo: llvm/llvm-project
62+
- name: build-latest
63+
llvm_version_major: ${{ needs.abi-dump-setup.outputs.LLVM_VERSION_MAJOR }}
64+
ref: ${{ github.sha }}
65+
repo: ${{ github.repository }}
66+
steps:
67+
- name: Install Ninja
68+
uses: llvm/actions/install-ninja@main
69+
- name: Install abi-compliance-checker
70+
run: |
71+
sudo apt-get install abi-dumper autoconf pkg-config
72+
- name: Install universal-ctags
73+
run: |
74+
git clone https://github.com/universal-ctags/ctags.git
75+
cd ctags
76+
./autogen.sh
77+
./configure
78+
sudo make install
79+
- name: Download source code
80+
uses: llvm/actions/get-llvm-project-src@main
81+
with:
82+
ref: ${{ matrix.ref }}
83+
repo: ${{ matrix.repo }}
84+
- name: Configure
85+
run: |
86+
mkdir install
87+
cmake -B build -S llvm -G Ninja -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g -Og" -DCMAKE_INSTALL_PREFIX=`pwd`/install llvm
88+
- name: Build
89+
run: ninja -C build/ ${{ needs.abi-dump-setup.outputs.ABI_LIBS }} install-clang-headers
90+
- name: Dump ABI
91+
run: |
92+
parallel abi-dumper -lver ${{ matrix.ref }} -skip-cxx -public-headers ./install/include/${{ needs.abi-dump-setup.outputs.ABI_HEADERS }} -o {}-${{ matrix.ref }}.abi ./build/lib/{} ::: ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}
93+
for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do
94+
# Remove symbol versioning from dumps, so we can compare across major versions.
95+
sed -i 's/LLVM_${{ matrix.llvm_version_major }}/LLVM_NOVERSION/' $lib-${{ matrix.ref }}.abi
96+
tar -czf $lib-${{ matrix.ref }}.abi.tar.gz $lib-${{ matrix.ref }}.abi
97+
done
98+
- name: Upload ABI file
99+
uses: actions/upload-artifact@v2
100+
with:
101+
name: ${{ matrix.name }}
102+
path: "*${{ matrix.ref }}.abi.tar.gz"
103+
104+
abi-compare:
105+
runs-on: ubuntu-latest
106+
needs:
107+
- abi-dump-setup
108+
- abi-dump
109+
steps:
110+
- name: Download baseline
111+
uses: actions/download-artifact@v1
112+
with:
113+
name: build-baseline
114+
- name: Download latest
115+
uses: actions/download-artifact@v1
116+
with:
117+
name: build-latest
118+
119+
- name: Install abi-compliance-checker
120+
run: sudo apt-get install abi-compliance-checker
121+
- name: Compare ABI
122+
run: |
123+
for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do
124+
abi-compliance-checker -lib $lib -old build-baseline/$lib*.abi.tar.gz -new build-latest/$lib*.abi.tar.gz
125+
done
126+
- name: Upload ABI Comparison
127+
if: always()
128+
uses: actions/upload-artifact@v2
129+
with:
130+
name: compat-report-${{ github.sha }}
131+
path: compat_reports/
132+

Diff for: .github/workflows/libclc-tests.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: libclc Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/**'
7+
paths:
8+
- 'clang/**'
9+
- 'llvm/**'
10+
- 'libclc/**'
11+
- '.github/workflows/libclc-tests.yml'
12+
pull_request:
13+
paths:
14+
- 'clang/**'
15+
- 'llvm/**'
16+
- 'libclc/**'
17+
- '.github/workflows/libclc-tests.yml'
18+
19+
jobs:
20+
build_libclc:
21+
name: libclc test
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os:
27+
- ubuntu-latest
28+
# Disable build on windows, because I can't figure out where llvm-config is.
29+
#- windows-latest
30+
- macOS-latest
31+
steps:
32+
- name: Setup Windows
33+
if: startsWith(matrix.os, 'windows')
34+
uses: llvm/actions/setup-windows@main
35+
with:
36+
arch: amd64
37+
- name: Install Ninja
38+
uses: llvm/actions/install-ninja@main
39+
- uses: actions/checkout@v1
40+
with:
41+
fetch-depth: 1
42+
- name: Build clang
43+
uses: llvm/actions/build-test-llvm-project@main
44+
with:
45+
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release
46+
build_target: ""
47+
- name: Build and test libclc
48+
run: |
49+
mkdir libclc-build
50+
cd libclc-build
51+
cmake -G Ninja ../libclc -DLLVM_CONFIG=../build/bin/llvm-config
52+
ninja
53+
ninja test

Diff for: .github/workflows/lld-tests.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: LLD Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/**'
7+
paths:
8+
- 'lld/**'
9+
- 'llvm/**'
10+
- '.github/workflows/lld-tests.yml'
11+
pull_request:
12+
paths:
13+
- 'lld/**'
14+
- 'llvm/**'
15+
- '.github/workflows/lld-tests.yml'
16+
17+
jobs:
18+
build_lld:
19+
name: lld check-all
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os:
25+
- ubuntu-latest
26+
- windows-latest
27+
- macOS-latest
28+
steps:
29+
- name: Setup Windows
30+
if: startsWith(matrix.os, 'windows')
31+
uses: llvm/actions/setup-windows@main
32+
with:
33+
arch: amd64
34+
- name: Install Ninja
35+
uses: llvm/actions/install-ninja@main
36+
- uses: actions/checkout@v1
37+
with:
38+
fetch-depth: 1
39+
- name: Test lld
40+
uses: llvm/actions/build-test-llvm-project@main
41+
with:
42+
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="lld" -DCMAKE_BUILD_TYPE=Release
43+
build_target: check-lld

Diff for: .github/workflows/lldb-tests.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: lldb Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/**'
7+
paths:
8+
- 'clang/**'
9+
- 'llvm/**'
10+
- 'lldb/**'
11+
- '.github/workflows/lldb-tests.yml'
12+
pull_request:
13+
paths:
14+
- 'clang/**'
15+
- 'llvm/**'
16+
- 'lldb/**'
17+
- '.github/workflows/lldb-tests.yml'
18+
19+
jobs:
20+
build_lldb:
21+
name: lldb build
22+
runs-on: ${{ matrix.os }}
23+
# Workaround for build faliure on Mac OS X: llvm.org/PR46190, https://github.com/actions/virtual-environments/issues/2274
24+
env:
25+
CPLUS_INCLUDE_PATH: /usr/local/opt/llvm/include/c++/v1:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
os:
30+
- ubuntu-latest
31+
- windows-latest
32+
- macOS-latest
33+
steps:
34+
- name: Setup Windows
35+
if: startsWith(matrix.os, 'windows')
36+
uses: llvm/actions/setup-windows@main
37+
with:
38+
arch: amd64
39+
- name: Install Ninja
40+
uses: llvm/actions/install-ninja@main
41+
- uses: actions/checkout@v1
42+
with:
43+
fetch-depth: 1
44+
- name: Build lldb
45+
uses: llvm/actions/build-test-llvm-project@main
46+
with:
47+
# Mac OS requries that libcxx is enabled for lldb tests, so we need to disable them.
48+
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lldb" -DCMAKE_BUILD_TYPE=Release -DLLDB_INCLUDE_TESTS=OFF
49+
# check-lldb is not consistent, so we only build lldb.
50+
build_target: ""

0 commit comments

Comments
 (0)