Skip to content

Commit b88151e

Browse files
authored
Merge pull request #12001 from ziglang/llvm14
Upgrade to LLVM 14
2 parents 3f11d1d + f9bf488 commit b88151e

File tree

783 files changed

+163002
-159613
lines changed

Some content is hidden

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

783 files changed

+163002
-159613
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ endif()
854854
if(MSVC)
855855
set(EXE_CFLAGS "${EXE_CFLAGS}")
856856
else()
857-
set(EXE_CFLAGS "${EXE_CFLAGS} -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Werror=type-limits -Wno-missing-braces -Wno-comment")
857+
set(EXE_CFLAGS "${EXE_CFLAGS} -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Werror=type-limits -Wno-missing-braces -Wno-comment -Wno-deprecated-declarations")
858858
if(MINGW)
859859
set(EXE_CFLAGS "${EXE_CFLAGS} -Wno-format")
860860
endif()

build.zig

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ pub fn build(b: *Builder) !void {
7676
"llvm-has-csky",
7777
"Whether LLVM has the experimental target csky enabled",
7878
) orelse false;
79-
const llvm_has_ve = b.option(
80-
bool,
81-
"llvm-has-ve",
82-
"Whether LLVM has the experimental target ve enabled",
83-
) orelse false;
8479
const llvm_has_arc = b.option(
8580
bool,
8681
"llvm-has-arc",
@@ -172,7 +167,6 @@ pub fn build(b: *Builder) !void {
172167
exe_options.addOption(bool, "have_llvm", enable_llvm);
173168
exe_options.addOption(bool, "llvm_has_m68k", llvm_has_m68k);
174169
exe_options.addOption(bool, "llvm_has_csky", llvm_has_csky);
175-
exe_options.addOption(bool, "llvm_has_ve", llvm_has_ve);
176170
exe_options.addOption(bool, "llvm_has_arc", llvm_has_arc);
177171
exe_options.addOption(bool, "force_gpa", force_gpa);
178172

@@ -396,7 +390,6 @@ pub fn build(b: *Builder) !void {
396390
test_cases_options.addOption(bool, "have_llvm", enable_llvm);
397391
test_cases_options.addOption(bool, "llvm_has_m68k", llvm_has_m68k);
398392
test_cases_options.addOption(bool, "llvm_has_csky", llvm_has_csky);
399-
test_cases_options.addOption(bool, "llvm_has_ve", llvm_has_ve);
400393
test_cases_options.addOption(bool, "llvm_has_arc", llvm_has_arc);
401394
test_cases_options.addOption(bool, "force_gpa", force_gpa);
402395
test_cases_options.addOption(bool, "enable_qemu", b.enable_qemu);
@@ -997,15 +990,11 @@ const clang_libs = [_][]const u8{
997990
"clangToolingCore",
998991
};
999992
const lld_libs = [_][]const u8{
1000-
"lldDriver",
1001993
"lldMinGW",
1002994
"lldELF",
1003995
"lldCOFF",
1004-
"lldMachO",
1005996
"lldWasm",
1006-
"lldReaderWriter",
1007-
"lldCore",
1008-
"lldYAML",
997+
"lldMachO",
1009998
"lldCommon",
1010999
};
10111000
// This list can be re-generated with `llvm-config --libfiles` and then
@@ -1023,6 +1012,7 @@ const llvm_libs = [_][]const u8{
10231012
"LLVMXCoreCodeGen",
10241013
"LLVMXCoreDesc",
10251014
"LLVMXCoreInfo",
1015+
"LLVMX86TargetMCA",
10261016
"LLVMX86Disassembler",
10271017
"LLVMX86AsmParser",
10281018
"LLVMX86CodeGen",
@@ -1034,6 +1024,11 @@ const llvm_libs = [_][]const u8{
10341024
"LLVMWebAssemblyDesc",
10351025
"LLVMWebAssemblyUtils",
10361026
"LLVMWebAssemblyInfo",
1027+
"LLVMVEDisassembler",
1028+
"LLVMVEAsmParser",
1029+
"LLVMVECodeGen",
1030+
"LLVMVEDesc",
1031+
"LLVMVEInfo",
10371032
"LLVMSystemZDisassembler",
10381033
"LLVMSystemZAsmParser",
10391034
"LLVMSystemZCodeGen",
@@ -1093,6 +1088,7 @@ const llvm_libs = [_][]const u8{
10931088
"LLVMARMDesc",
10941089
"LLVMARMUtils",
10951090
"LLVMARMInfo",
1091+
"LLVMAMDGPUTargetMCA",
10961092
"LLVMAMDGPUDisassembler",
10971093
"LLVMAMDGPUAsmParser",
10981094
"LLVMAMDGPUCodeGen",
@@ -1138,7 +1134,6 @@ const llvm_libs = [_][]const u8{
11381134
"LLVMMIRParser",
11391135
"LLVMAsmPrinter",
11401136
"LLVMDebugInfoMSF",
1141-
"LLVMDebugInfoDWARF",
11421137
"LLVMSelectionDAG",
11431138
"LLVMCodeGen",
11441139
"LLVMIRReader",
@@ -1154,6 +1149,7 @@ const llvm_libs = [_][]const u8{
11541149
"LLVMBitWriter",
11551150
"LLVMAnalysis",
11561151
"LLVMProfileData",
1152+
"LLVMDebugInfoDWARF",
11571153
"LLVMObject",
11581154
"LLVMTextAPI",
11591155
"LLVMMCParser",

ci/azure/build.zig

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ pub fn build(b: *Builder) !void {
5151
"llvm-has-csky",
5252
"Whether LLVM has the experimental target csky enabled",
5353
) orelse false;
54-
const llvm_has_ve = b.option(
55-
bool,
56-
"llvm-has-ve",
57-
"Whether LLVM has the experimental target ve enabled",
58-
) orelse false;
5954
const llvm_has_arc = b.option(
6055
bool,
6156
"llvm-has-arc",
@@ -131,7 +126,6 @@ pub fn build(b: *Builder) !void {
131126
exe_options.addOption(bool, "have_llvm", enable_llvm);
132127
exe_options.addOption(bool, "llvm_has_m68k", llvm_has_m68k);
133128
exe_options.addOption(bool, "llvm_has_csky", llvm_has_csky);
134-
exe_options.addOption(bool, "llvm_has_ve", llvm_has_ve);
135129
exe_options.addOption(bool, "llvm_has_arc", llvm_has_arc);
136130
exe_options.addOption(bool, "force_gpa", force_gpa);
137131

@@ -808,15 +802,11 @@ const clang_libs = [_][]const u8{
808802
"clangToolingCore",
809803
};
810804
const lld_libs = [_][]const u8{
811-
"lldDriver",
812805
"lldMinGW",
813806
"lldELF",
814807
"lldCOFF",
815-
"lldMachO",
816808
"lldWasm",
817-
"lldReaderWriter",
818-
"lldCore",
819-
"lldYAML",
809+
"lldMachO",
820810
"lldCommon",
821811
};
822812
// This list can be re-generated with `llvm-config --libfiles` and then
@@ -834,6 +824,7 @@ const llvm_libs = [_][]const u8{
834824
"LLVMXCoreCodeGen",
835825
"LLVMXCoreDesc",
836826
"LLVMXCoreInfo",
827+
"LLVMX86TargetMCA",
837828
"LLVMX86Disassembler",
838829
"LLVMX86AsmParser",
839830
"LLVMX86CodeGen",
@@ -845,6 +836,11 @@ const llvm_libs = [_][]const u8{
845836
"LLVMWebAssemblyDesc",
846837
"LLVMWebAssemblyUtils",
847838
"LLVMWebAssemblyInfo",
839+
"LLVMVEDisassembler",
840+
"LLVMVEAsmParser",
841+
"LLVMVECodeGen",
842+
"LLVMVEDesc",
843+
"LLVMVEInfo",
848844
"LLVMSystemZDisassembler",
849845
"LLVMSystemZAsmParser",
850846
"LLVMSystemZCodeGen",
@@ -904,6 +900,7 @@ const llvm_libs = [_][]const u8{
904900
"LLVMARMDesc",
905901
"LLVMARMUtils",
906902
"LLVMARMInfo",
903+
"LLVMAMDGPUTargetMCA",
907904
"LLVMAMDGPUDisassembler",
908905
"LLVMAMDGPUAsmParser",
909906
"LLVMAMDGPUCodeGen",
@@ -949,7 +946,6 @@ const llvm_libs = [_][]const u8{
949946
"LLVMMIRParser",
950947
"LLVMAsmPrinter",
951948
"LLVMDebugInfoMSF",
952-
"LLVMDebugInfoDWARF",
953949
"LLVMSelectionDAG",
954950
"LLVMCodeGen",
955951
"LLVMIRReader",
@@ -965,6 +961,7 @@ const llvm_libs = [_][]const u8{
965961
"LLVMBitWriter",
966962
"LLVMAnalysis",
967963
"LLVMProfileData",
964+
"LLVMDebugInfoDWARF",
968965
"LLVMObject",
969966
"LLVMTextAPI",
970967
"LLVMMCParser",

ci/azure/macos_arm64_script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ ZIGDIR="$(pwd)"
1010
HOST_ARCH="x86_64"
1111
HOST_TARGET="$HOST_ARCH-macos-none"
1212
HOST_MCPU="baseline"
13-
HOST_CACHE_BASENAME="zig+llvm+lld+clang-$HOST_TARGET-0.10.0-dev.2348+d43761808"
13+
HOST_CACHE_BASENAME="zig+llvm+lld+clang-$HOST_TARGET-0.10.0-dev.2931+bdf3fa12f"
1414
HOST_PREFIX="$HOME/$HOST_CACHE_BASENAME"
1515

1616
ARCH="aarch64"
1717
TARGET="$ARCH-macos-none"
1818
MCPU="apple_a14"
19-
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.10.0-dev.2348+d43761808"
19+
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.10.0-dev.2931+bdf3fa12f"
2020
PREFIX="$HOME/$CACHE_BASENAME"
2121

2222
JOBS="-j2"

ci/azure/macos_script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ZIGDIR="$(pwd)"
99
ARCH="x86_64"
1010
TARGET="$ARCH-macos-none"
1111
MCPU="baseline"
12-
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.10.0-dev.2348+d43761808"
12+
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.10.0-dev.2931+bdf3fa12f"
1313
PREFIX="$HOME/$CACHE_BASENAME"
1414
JOBS="-j2"
1515

ci/azure/pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
vmImage: 'windows-2019'
2828
variables:
2929
TARGET: 'x86_64-windows-gnu'
30-
ZIG_LLVM_CLANG_LLD_NAME: 'zig+llvm+lld+clang-${{ variables.TARGET }}-0.9.1'
30+
ZIG_LLVM_CLANG_LLD_NAME: 'zig+llvm+lld+clang-${{ variables.TARGET }}-0.10.0-dev.2931+bdf3fa12f'
3131
ZIG_LLVM_CLANG_LLD_URL: 'https://ziglang.org/deps/${{ variables.ZIG_LLVM_CLANG_LLD_NAME }}.zip'
3232
steps:
3333
- pwsh: |

ci/drone/drone.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,56 @@ platform:
77

88
steps:
99
- name: build
10-
image: ziglang/static-base:llvm13-aarch64-1
10+
image: ziglang/static-base:llvm14-aarch64-3
1111
commands:
1212
- ./ci/drone/linux_script_build
1313

1414
- name: test-1
1515
depends_on:
1616
- build
17-
image: ziglang/static-base:llvm13-aarch64-1
17+
image: ziglang/static-base:llvm14-aarch64-3
1818
commands:
1919
- ./ci/drone/linux_script_test 1
2020

2121
- name: test-2
2222
depends_on:
2323
- build
24-
image: ziglang/static-base:llvm13-aarch64-1
24+
image: ziglang/static-base:llvm14-aarch64-3
2525
commands:
2626
- ./ci/drone/linux_script_test 2
2727

2828
- name: test-3
2929
depends_on:
3030
- build
31-
image: ziglang/static-base:llvm13-aarch64-1
31+
image: ziglang/static-base:llvm14-aarch64-3
3232
commands:
3333
- ./ci/drone/linux_script_test 3
3434

3535
- name: test-4
3636
depends_on:
3737
- build
38-
image: ziglang/static-base:llvm13-aarch64-1
38+
image: ziglang/static-base:llvm14-aarch64-3
3939
commands:
4040
- ./ci/drone/linux_script_test 4
4141

4242
- name: test-5
4343
depends_on:
4444
- build
45-
image: ziglang/static-base:llvm13-aarch64-1
45+
image: ziglang/static-base:llvm14-aarch64-3
4646
commands:
4747
- ./ci/drone/linux_script_test 5
4848

4949
- name: test-6
5050
depends_on:
5151
- build
52-
image: ziglang/static-base:llvm13-aarch64-1
52+
image: ziglang/static-base:llvm14-aarch64-3
5353
commands:
5454
- ./ci/drone/linux_script_test 6
5555

5656
- name: test-7
5757
depends_on:
5858
- build
59-
image: ziglang/static-base:llvm13-aarch64-1
59+
image: ziglang/static-base:llvm14-aarch64-3
6060
commands:
6161
- ./ci/drone/linux_script_test 7
6262

@@ -70,7 +70,7 @@ steps:
7070
- test-5
7171
- test-6
7272
- test-7
73-
image: ziglang/static-base:llvm13-aarch64-1
73+
image: ziglang/static-base:llvm14-aarch64-3
7474
environment:
7575
SRHT_OAUTH_TOKEN:
7676
from_secret: SRHT_OAUTH_TOKEN

ci/srht/freebsd_script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sudo pkg update -fq
77
sudo pkg install -y cmake py39-s3cmd wget curl jq samurai
88

99
ZIGDIR="$(pwd)"
10-
CACHE_BASENAME="zig+llvm+lld+clang-x86_64-freebsd-gnu-0.9.1"
10+
CACHE_BASENAME="zig+llvm+lld+clang-x86_64-freebsd-gnu-0.10.0-dev.2931+bdf3fa12f"
1111
PREFIX="$HOME/$CACHE_BASENAME"
1212

1313
cd $HOME

ci/zinc/drone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ workspace:
1010

1111
steps:
1212
- name: test
13-
image: ci/debian-amd64:11.1-3
13+
image: ci/debian-amd64:11.1-6
1414
commands:
1515
- ./ci/zinc/linux_test.sh
1616

@@ -22,7 +22,7 @@ steps:
2222
- master
2323
event:
2424
- push
25-
image: ci/debian-amd64:11.1-3
25+
image: ci/debian-amd64:11.1-6
2626
environment:
2727
AWS_ACCESS_KEY_ID:
2828
from_secret: AWS_ACCESS_KEY_ID

cmake/Findclang.cmake

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,31 @@
99

1010
find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
1111
PATHS
12-
/usr/lib/llvm/13/include
13-
/usr/lib/llvm-13/include
14-
/usr/lib/llvm-13.0/include
15-
/usr/local/llvm130/include
16-
/usr/local/llvm13/include
17-
/usr/local/opt/llvm@13/include
18-
/opt/homebrew/opt/llvm@13/include
12+
/usr/lib/llvm/14/include
13+
/usr/lib/llvm-14/include
14+
/usr/lib/llvm-14.0/include
15+
/usr/local/llvm140/include
16+
/usr/local/llvm14/include
17+
/usr/local/opt/llvm@14/include
18+
/opt/homebrew/opt/llvm@14/include
1919
/mingw64/include
2020
)
2121

2222
if(ZIG_PREFER_CLANG_CPP_DYLIB)
2323
find_library(CLANG_LIBRARIES
2424
NAMES
25-
clang-cpp-13.0
26-
clang-cpp130
25+
clang-cpp-14.0
26+
clang-cpp140
2727
clang-cpp
2828
PATHS
2929
${CLANG_LIBDIRS}
30-
/usr/lib/llvm/13/lib
31-
/usr/lib/llvm/13/lib64
32-
/usr/lib/llvm-13/lib
33-
/usr/local/llvm130/lib
34-
/usr/local/llvm13/lib
35-
/usr/local/opt/llvm@13/lib
36-
/opt/homebrew/opt/llvm@13/lib
30+
/usr/lib/llvm/14/lib
31+
/usr/lib/llvm/14/lib64
32+
/usr/lib/llvm-14/lib
33+
/usr/local/llvm140/lib
34+
/usr/local/llvm14/lib
35+
/usr/local/opt/llvm@14/lib
36+
/opt/homebrew/opt/llvm@14/lib
3737
)
3838
endif()
3939

@@ -43,13 +43,13 @@ if(NOT CLANG_LIBRARIES)
4343
find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
4444
PATHS
4545
${CLANG_LIBDIRS}
46-
/usr/lib/llvm/13/lib
47-
/usr/lib/llvm-13/lib
48-
/usr/lib/llvm-13.0/lib
49-
/usr/local/llvm130/lib
50-
/usr/local/llvm13/lib
51-
/usr/local/opt/llvm@13/lib
52-
/opt/homebrew/opt/llvm@13/lib
46+
/usr/lib/llvm/14/lib
47+
/usr/lib/llvm-14/lib
48+
/usr/lib/llvm-14.0/lib
49+
/usr/local/llvm140/lib
50+
/usr/local/llvm14/lib
51+
/usr/local/opt/llvm@14/lib
52+
/opt/homebrew/opt/llvm@14/lib
5353
/mingw64/lib
5454
/c/msys64/mingw64/lib
5555
c:\\msys64\\mingw64\\lib

0 commit comments

Comments
 (0)