Skip to content

Commit

Permalink
Merge pull request #12001 from ziglang/llvm14
Browse files Browse the repository at this point in the history
Upgrade to LLVM 14
  • Loading branch information
andrewrk authored Jul 10, 2022
2 parents 3f11d1d + f9bf488 commit b88151e
Show file tree
Hide file tree
Showing 783 changed files with 163,002 additions and 159,613 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ endif()
if(MSVC)
set(EXE_CFLAGS "${EXE_CFLAGS}")
else()
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")
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")
if(MINGW)
set(EXE_CFLAGS "${EXE_CFLAGS} -Wno-format")
endif()
Expand Down
22 changes: 9 additions & 13 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ pub fn build(b: *Builder) !void {
"llvm-has-csky",
"Whether LLVM has the experimental target csky enabled",
) orelse false;
const llvm_has_ve = b.option(
bool,
"llvm-has-ve",
"Whether LLVM has the experimental target ve enabled",
) orelse false;
const llvm_has_arc = b.option(
bool,
"llvm-has-arc",
Expand Down Expand Up @@ -172,7 +167,6 @@ pub fn build(b: *Builder) !void {
exe_options.addOption(bool, "have_llvm", enable_llvm);
exe_options.addOption(bool, "llvm_has_m68k", llvm_has_m68k);
exe_options.addOption(bool, "llvm_has_csky", llvm_has_csky);
exe_options.addOption(bool, "llvm_has_ve", llvm_has_ve);
exe_options.addOption(bool, "llvm_has_arc", llvm_has_arc);
exe_options.addOption(bool, "force_gpa", force_gpa);

Expand Down Expand Up @@ -396,7 +390,6 @@ pub fn build(b: *Builder) !void {
test_cases_options.addOption(bool, "have_llvm", enable_llvm);
test_cases_options.addOption(bool, "llvm_has_m68k", llvm_has_m68k);
test_cases_options.addOption(bool, "llvm_has_csky", llvm_has_csky);
test_cases_options.addOption(bool, "llvm_has_ve", llvm_has_ve);
test_cases_options.addOption(bool, "llvm_has_arc", llvm_has_arc);
test_cases_options.addOption(bool, "force_gpa", force_gpa);
test_cases_options.addOption(bool, "enable_qemu", b.enable_qemu);
Expand Down Expand Up @@ -997,15 +990,11 @@ const clang_libs = [_][]const u8{
"clangToolingCore",
};
const lld_libs = [_][]const u8{
"lldDriver",
"lldMinGW",
"lldELF",
"lldCOFF",
"lldMachO",
"lldWasm",
"lldReaderWriter",
"lldCore",
"lldYAML",
"lldMachO",
"lldCommon",
};
// This list can be re-generated with `llvm-config --libfiles` and then
Expand All @@ -1023,6 +1012,7 @@ const llvm_libs = [_][]const u8{
"LLVMXCoreCodeGen",
"LLVMXCoreDesc",
"LLVMXCoreInfo",
"LLVMX86TargetMCA",
"LLVMX86Disassembler",
"LLVMX86AsmParser",
"LLVMX86CodeGen",
Expand All @@ -1034,6 +1024,11 @@ const llvm_libs = [_][]const u8{
"LLVMWebAssemblyDesc",
"LLVMWebAssemblyUtils",
"LLVMWebAssemblyInfo",
"LLVMVEDisassembler",
"LLVMVEAsmParser",
"LLVMVECodeGen",
"LLVMVEDesc",
"LLVMVEInfo",
"LLVMSystemZDisassembler",
"LLVMSystemZAsmParser",
"LLVMSystemZCodeGen",
Expand Down Expand Up @@ -1093,6 +1088,7 @@ const llvm_libs = [_][]const u8{
"LLVMARMDesc",
"LLVMARMUtils",
"LLVMARMInfo",
"LLVMAMDGPUTargetMCA",
"LLVMAMDGPUDisassembler",
"LLVMAMDGPUAsmParser",
"LLVMAMDGPUCodeGen",
Expand Down Expand Up @@ -1138,7 +1134,6 @@ const llvm_libs = [_][]const u8{
"LLVMMIRParser",
"LLVMAsmPrinter",
"LLVMDebugInfoMSF",
"LLVMDebugInfoDWARF",
"LLVMSelectionDAG",
"LLVMCodeGen",
"LLVMIRReader",
Expand All @@ -1154,6 +1149,7 @@ const llvm_libs = [_][]const u8{
"LLVMBitWriter",
"LLVMAnalysis",
"LLVMProfileData",
"LLVMDebugInfoDWARF",
"LLVMObject",
"LLVMTextAPI",
"LLVMMCParser",
Expand Down
21 changes: 9 additions & 12 deletions ci/azure/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ pub fn build(b: *Builder) !void {
"llvm-has-csky",
"Whether LLVM has the experimental target csky enabled",
) orelse false;
const llvm_has_ve = b.option(
bool,
"llvm-has-ve",
"Whether LLVM has the experimental target ve enabled",
) orelse false;
const llvm_has_arc = b.option(
bool,
"llvm-has-arc",
Expand Down Expand Up @@ -131,7 +126,6 @@ pub fn build(b: *Builder) !void {
exe_options.addOption(bool, "have_llvm", enable_llvm);
exe_options.addOption(bool, "llvm_has_m68k", llvm_has_m68k);
exe_options.addOption(bool, "llvm_has_csky", llvm_has_csky);
exe_options.addOption(bool, "llvm_has_ve", llvm_has_ve);
exe_options.addOption(bool, "llvm_has_arc", llvm_has_arc);
exe_options.addOption(bool, "force_gpa", force_gpa);

Expand Down Expand Up @@ -808,15 +802,11 @@ const clang_libs = [_][]const u8{
"clangToolingCore",
};
const lld_libs = [_][]const u8{
"lldDriver",
"lldMinGW",
"lldELF",
"lldCOFF",
"lldMachO",
"lldWasm",
"lldReaderWriter",
"lldCore",
"lldYAML",
"lldMachO",
"lldCommon",
};
// This list can be re-generated with `llvm-config --libfiles` and then
Expand All @@ -834,6 +824,7 @@ const llvm_libs = [_][]const u8{
"LLVMXCoreCodeGen",
"LLVMXCoreDesc",
"LLVMXCoreInfo",
"LLVMX86TargetMCA",
"LLVMX86Disassembler",
"LLVMX86AsmParser",
"LLVMX86CodeGen",
Expand All @@ -845,6 +836,11 @@ const llvm_libs = [_][]const u8{
"LLVMWebAssemblyDesc",
"LLVMWebAssemblyUtils",
"LLVMWebAssemblyInfo",
"LLVMVEDisassembler",
"LLVMVEAsmParser",
"LLVMVECodeGen",
"LLVMVEDesc",
"LLVMVEInfo",
"LLVMSystemZDisassembler",
"LLVMSystemZAsmParser",
"LLVMSystemZCodeGen",
Expand Down Expand Up @@ -904,6 +900,7 @@ const llvm_libs = [_][]const u8{
"LLVMARMDesc",
"LLVMARMUtils",
"LLVMARMInfo",
"LLVMAMDGPUTargetMCA",
"LLVMAMDGPUDisassembler",
"LLVMAMDGPUAsmParser",
"LLVMAMDGPUCodeGen",
Expand Down Expand Up @@ -949,7 +946,6 @@ const llvm_libs = [_][]const u8{
"LLVMMIRParser",
"LLVMAsmPrinter",
"LLVMDebugInfoMSF",
"LLVMDebugInfoDWARF",
"LLVMSelectionDAG",
"LLVMCodeGen",
"LLVMIRReader",
Expand All @@ -965,6 +961,7 @@ const llvm_libs = [_][]const u8{
"LLVMBitWriter",
"LLVMAnalysis",
"LLVMProfileData",
"LLVMDebugInfoDWARF",
"LLVMObject",
"LLVMTextAPI",
"LLVMMCParser",
Expand Down
4 changes: 2 additions & 2 deletions ci/azure/macos_arm64_script
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ ZIGDIR="$(pwd)"
HOST_ARCH="x86_64"
HOST_TARGET="$HOST_ARCH-macos-none"
HOST_MCPU="baseline"
HOST_CACHE_BASENAME="zig+llvm+lld+clang-$HOST_TARGET-0.10.0-dev.2348+d43761808"
HOST_CACHE_BASENAME="zig+llvm+lld+clang-$HOST_TARGET-0.10.0-dev.2931+bdf3fa12f"
HOST_PREFIX="$HOME/$HOST_CACHE_BASENAME"

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

JOBS="-j2"
Expand Down
2 changes: 1 addition & 1 deletion ci/azure/macos_script
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ZIGDIR="$(pwd)"
ARCH="x86_64"
TARGET="$ARCH-macos-none"
MCPU="baseline"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.10.0-dev.2348+d43761808"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.10.0-dev.2931+bdf3fa12f"
PREFIX="$HOME/$CACHE_BASENAME"
JOBS="-j2"

Expand Down
2 changes: 1 addition & 1 deletion ci/azure/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
vmImage: 'windows-2019'
variables:
TARGET: 'x86_64-windows-gnu'
ZIG_LLVM_CLANG_LLD_NAME: 'zig+llvm+lld+clang-${{ variables.TARGET }}-0.9.1'
ZIG_LLVM_CLANG_LLD_NAME: 'zig+llvm+lld+clang-${{ variables.TARGET }}-0.10.0-dev.2931+bdf3fa12f'
ZIG_LLVM_CLANG_LLD_URL: 'https://ziglang.org/deps/${{ variables.ZIG_LLVM_CLANG_LLD_NAME }}.zip'
steps:
- pwsh: |
Expand Down
18 changes: 9 additions & 9 deletions ci/drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,56 +7,56 @@ platform:

steps:
- name: build
image: ziglang/static-base:llvm13-aarch64-1
image: ziglang/static-base:llvm14-aarch64-3
commands:
- ./ci/drone/linux_script_build

- name: test-1
depends_on:
- build
image: ziglang/static-base:llvm13-aarch64-1
image: ziglang/static-base:llvm14-aarch64-3
commands:
- ./ci/drone/linux_script_test 1

- name: test-2
depends_on:
- build
image: ziglang/static-base:llvm13-aarch64-1
image: ziglang/static-base:llvm14-aarch64-3
commands:
- ./ci/drone/linux_script_test 2

- name: test-3
depends_on:
- build
image: ziglang/static-base:llvm13-aarch64-1
image: ziglang/static-base:llvm14-aarch64-3
commands:
- ./ci/drone/linux_script_test 3

- name: test-4
depends_on:
- build
image: ziglang/static-base:llvm13-aarch64-1
image: ziglang/static-base:llvm14-aarch64-3
commands:
- ./ci/drone/linux_script_test 4

- name: test-5
depends_on:
- build
image: ziglang/static-base:llvm13-aarch64-1
image: ziglang/static-base:llvm14-aarch64-3
commands:
- ./ci/drone/linux_script_test 5

- name: test-6
depends_on:
- build
image: ziglang/static-base:llvm13-aarch64-1
image: ziglang/static-base:llvm14-aarch64-3
commands:
- ./ci/drone/linux_script_test 6

- name: test-7
depends_on:
- build
image: ziglang/static-base:llvm13-aarch64-1
image: ziglang/static-base:llvm14-aarch64-3
commands:
- ./ci/drone/linux_script_test 7

Expand All @@ -70,7 +70,7 @@ steps:
- test-5
- test-6
- test-7
image: ziglang/static-base:llvm13-aarch64-1
image: ziglang/static-base:llvm14-aarch64-3
environment:
SRHT_OAUTH_TOKEN:
from_secret: SRHT_OAUTH_TOKEN
Expand Down
2 changes: 1 addition & 1 deletion ci/srht/freebsd_script
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sudo pkg update -fq
sudo pkg install -y cmake py39-s3cmd wget curl jq samurai

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

cd $HOME
Expand Down
4 changes: 2 additions & 2 deletions ci/zinc/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ workspace:

steps:
- name: test
image: ci/debian-amd64:11.1-3
image: ci/debian-amd64:11.1-6
commands:
- ./ci/zinc/linux_test.sh

Expand All @@ -22,7 +22,7 @@ steps:
- master
event:
- push
image: ci/debian-amd64:11.1-3
image: ci/debian-amd64:11.1-6
environment:
AWS_ACCESS_KEY_ID:
from_secret: AWS_ACCESS_KEY_ID
Expand Down
46 changes: 23 additions & 23 deletions cmake/Findclang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@

find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
PATHS
/usr/lib/llvm/13/include
/usr/lib/llvm-13/include
/usr/lib/llvm-13.0/include
/usr/local/llvm130/include
/usr/local/llvm13/include
/usr/local/opt/llvm@13/include
/opt/homebrew/opt/llvm@13/include
/usr/lib/llvm/14/include
/usr/lib/llvm-14/include
/usr/lib/llvm-14.0/include
/usr/local/llvm140/include
/usr/local/llvm14/include
/usr/local/opt/llvm@14/include
/opt/homebrew/opt/llvm@14/include
/mingw64/include
)

if(ZIG_PREFER_CLANG_CPP_DYLIB)
find_library(CLANG_LIBRARIES
NAMES
clang-cpp-13.0
clang-cpp130
clang-cpp-14.0
clang-cpp140
clang-cpp
PATHS
${CLANG_LIBDIRS}
/usr/lib/llvm/13/lib
/usr/lib/llvm/13/lib64
/usr/lib/llvm-13/lib
/usr/local/llvm130/lib
/usr/local/llvm13/lib
/usr/local/opt/llvm@13/lib
/opt/homebrew/opt/llvm@13/lib
/usr/lib/llvm/14/lib
/usr/lib/llvm/14/lib64
/usr/lib/llvm-14/lib
/usr/local/llvm140/lib
/usr/local/llvm14/lib
/usr/local/opt/llvm@14/lib
/opt/homebrew/opt/llvm@14/lib
)
endif()

Expand All @@ -43,13 +43,13 @@ if(NOT CLANG_LIBRARIES)
find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
PATHS
${CLANG_LIBDIRS}
/usr/lib/llvm/13/lib
/usr/lib/llvm-13/lib
/usr/lib/llvm-13.0/lib
/usr/local/llvm130/lib
/usr/local/llvm13/lib
/usr/local/opt/llvm@13/lib
/opt/homebrew/opt/llvm@13/lib
/usr/lib/llvm/14/lib
/usr/lib/llvm-14/lib
/usr/lib/llvm-14.0/lib
/usr/local/llvm140/lib
/usr/local/llvm14/lib
/usr/local/opt/llvm@14/lib
/opt/homebrew/opt/llvm@14/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:\\msys64\\mingw64\\lib
Expand Down
Loading

0 comments on commit b88151e

Please sign in to comment.