Skip to content

Commit 19576c4

Browse files
committed
ports: bump llvm port to llvm-13
1 parent ae4a827 commit 19576c4

File tree

2 files changed

+61
-66
lines changed

2 files changed

+61
-66
lines changed

bootstrap.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ sources:
6565

6666
- name: llvm
6767
subdir: 'bundled'
68-
git: 'https://github.com/llvm/llvm-project'
69-
tag: 'llvmorg-10.0.0'
70-
version: '10.0.0'
68+
git: 'https://github.com/llvm/llvm-project.git'
69+
tag: 'llvmorg-13.0.0'
70+
version: '13.0.0'
7171

7272
# ---------------------------------------------------------------------------
7373
# Rust patched crates start

patches/llvm/llvm.patch

Lines changed: 58 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ index 70fac030b..93fc21c3d 100644
6262
@@ -342,6 +342,34 @@ public:
6363
: OSTargetInfo<Target>(Triple, Opts) {}
6464
};
65-
65+
6666
+// Aero Target
6767
+template <typename Target>
6868
+class LLVM_LIBRARY_VISIBILITY AeroTargetInfo : public OSTargetInfo<Target> {
@@ -628,10 +628,10 @@ index 000000000..e9016f4a8
628628
+
629629
+#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MANAGARM_H
630630
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
631-
index da197e476..7ea2887b7 100644
631+
index da39f29e4..b6f6bb439 100644
632632
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
633633
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
634-
@@ -261,6 +261,8 @@ static const char *getLDMOption(const llvm::Triple &T, const ArgList &Args) {
634+
@@ -246,6 +246,8 @@ static const char *getLDMOption(const llvm::Triple &T, const ArgList &Args) {
635635
return "elf_iamcu";
636636
return "elf_i386";
637637
case llvm::Triple::aarch64:
@@ -640,7 +640,7 @@ index da197e476..7ea2887b7 100644
640640
return "aarch64linux";
641641
case llvm::Triple::aarch64_be:
642642
return "aarch64linuxb";
643-
@@ -1997,7 +1999,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
643+
@@ -2077,7 +2079,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
644644
static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
645645
static const char *const AArch64Triples[] = {
646646
"aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
@@ -650,26 +650,26 @@ index da197e476..7ea2887b7 100644
650650
static const char *const AArch64beLibDirs[] = {"/lib"};
651651
static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",
652652
"aarch64_be-linux-gnu"};
653-
@@ -2025,7 +2028,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
653+
@@ -2105,7 +2108,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
654654
"x86_64-redhat-linux", "x86_64-suse-linux",
655655
"x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
656656
"x86_64-slackware-linux", "x86_64-unknown-linux",
657657
- "x86_64-amazon-linux", "x86_64-linux-android"};
658658
+ "x86_64-amazon-linux", "x86_64-linux-android",
659659
+ "x86_64-aero", "x86_64-aero-system", "x86_64-aero-kernel"};
660-
static const char *const X32LibDirs[] = {"/libx32"};
661-
static const char *const X86LibDirs[] = {"/lib32", "/lib"};
662-
static const char *const X86Triples[] = {
663-
@@ -2090,7 +2094,10 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
664-
static const char *const RISCV64Triples[] = {"riscv64-unknown-linux-gnu",
660+
static const char *const X32Triples[] = {"x86_64-linux-gnux32",
661+
"x86_64-pc-linux-gnux32"};
662+
static const char *const X32LibDirs[] = {"/libx32", "/lib"};
663+
@@ -2183,7 +2187,10 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
665664
"riscv64-linux-gnu",
666665
"riscv64-unknown-elf",
666+
"riscv64-redhat-linux",
667667
- "riscv64-suse-linux"};
668668
+ "riscv64-suse-linux",
669669
+ "riscv64-aero",
670670
+ "riscv64-aero-kernel",
671671
+ "riscv64-aero-system"};
672-
672+
673673
static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};
674674
static const char *const SPARCv8Triples[] = {"sparc-linux-gnu",
675675
diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake
@@ -711,68 +711,72 @@ index 76a754d67..5899b5449 100644
711711
enum ObjectFormatType {
712712
UnknownObjectFormat,
713713
diff --git a/llvm/include/llvm/Support/SwapByteOrder.h b/llvm/include/llvm/Support/SwapByteOrder.h
714-
index 6cec87006..ceefb0673 100644
714+
index e8612ba66..7c4e941bd 100644
715715
--- a/llvm/include/llvm/Support/SwapByteOrder.h
716716
+++ b/llvm/include/llvm/Support/SwapByteOrder.h
717717
@@ -22,7 +22,7 @@
718-
#include <stdlib.h>
719718
#endif
720-
721-
-#if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__)
722-
+#if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__) || defined(__aero__)
719+
720+
#if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__) || \
721+
- defined(__Fuchsia__) || defined(__EMSCRIPTEN__)
722+
+ defined(__Fuchsia__) || defined(__EMSCRIPTEN__) || defined(__aero__)
723723
#include <endian.h>
724724
#elif defined(_AIX)
725725
#include <sys/machine.h>
726726
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
727-
index 2c480c109..872511977 100644
727+
index 883115463..e27e27ecc 100644
728728
--- a/llvm/lib/Support/Triple.cpp
729729
+++ b/llvm/lib/Support/Triple.cpp
730-
@@ -201,6 +201,7 @@ StringRef Triple::getOSTypeName(OSType Kind) {
731-
case Linux: return "linux";
732-
case Lv2: return "lv2";
733-
case MacOSX: return "macosx";
730+
@@ -189,6 +189,7 @@ StringRef Triple::getOSTypeName(OSType Kind) {
731+
case UnknownOS: return "unknown";
732+
733+
case AIX: return "aix";
734734
+ case Aero: return "aero";
735-
case Mesa3D: return "mesa3d";
736-
case Minix: return "minix";
737-
case NVCL: return "nvcl";
738-
@@ -235,12 +236,14 @@ StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) {
739-
case GNUEABIHF: return "gnueabihf";
735+
case AMDHSA: return "amdhsa";
736+
case AMDPAL: return "amdpal";
737+
case Ananas: return "ananas";
738+
@@ -245,6 +246,7 @@ StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) {
740739
case GNUX32: return "gnux32";
740+
case GNUILP32: return "gnu_ilp32";
741741
case Itanium: return "itanium";
742742
+ case Kernel: return "kernel";
743743
case MSVC: return "msvc";
744744
case MacABI: return "macabi";
745745
case Musl: return "musl";
746-
case MuslEABI: return "musleabi";
746+
@@ -252,6 +254,7 @@ StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) {
747747
case MuslEABIHF: return "musleabihf";
748+
case MuslX32: return "muslx32";
748749
case Simulator: return "simulator";
749750
+ case System: return "system";
750751
}
751-
752+
752753
llvm_unreachable("Invalid EnvironmentType!");
753-
@@ -495,6 +498,7 @@ static Triple::OSType parseOS(StringRef OSName) {
754-
.StartsWith("linux", Triple::Linux)
755-
.StartsWith("lv2", Triple::Lv2)
756-
.StartsWith("macos", Triple::MacOSX)
754+
@@ -502,6 +505,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) {
755+
756+
static Triple::OSType parseOS(StringRef OSName) {
757+
return StringSwitch<Triple::OSType>(OSName)
757758
+ .StartsWith("aero", Triple::Aero)
758-
.StartsWith("netbsd", Triple::NetBSD)
759-
.StartsWith("openbsd", Triple::OpenBSD)
760-
.StartsWith("solaris", Triple::Solaris)
761-
@@ -544,6 +548,8 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
762-
.StartsWith("coreclr", Triple::CoreCLR)
763-
.StartsWith("simulator", Triple::Simulator)
764-
.StartsWith("macabi", Triple::MacABI)
765-
+ .StartsWith("kernel", Triple::Kernel)
766-
+ .StartsWith("system", Triple::System)
767-
.Default(Triple::UnknownEnvironment);
759+
.StartsWith("ananas", Triple::Ananas)
760+
.StartsWith("cloudabi", Triple::CloudABI)
761+
.StartsWith("darwin", Triple::Darwin)
762+
@@ -560,9 +564,11 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
763+
.StartsWith("musl", Triple::Musl)
764+
.StartsWith("msvc", Triple::MSVC)
765+
.StartsWith("itanium", Triple::Itanium)
766+
+ .StartsWith("kernel", Triple::Kernel)
767+
.StartsWith("cygnus", Triple::Cygnus)
768+
.StartsWith("coreclr", Triple::CoreCLR)
769+
.StartsWith("simulator", Triple::Simulator)
770+
+ .StartsWith("system", Triple::System)
771+
.StartsWith("macabi", Triple::MacABI)
772+
.Default(Triple::UnknownEnvironment);
768773
}
769-
770774
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
771775
index 2a03dc682..e75ff461d 100644
772776
--- a/llvm/lib/Support/Unix/Path.inc
773777
+++ b/llvm/lib/Support/Unix/Path.inc
774778
@@ -64,7 +64,7 @@ extern char **environ;
775-
779+
776780
#include <sys/types.h>
777781
#if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && \
778782
- !defined(__linux__) && !defined(__FreeBSD_kernel__) && !defined(_AIX)
@@ -791,7 +795,7 @@ index 2a03dc682..e75ff461d 100644
791795
#else
792796
@@ -431,7 +431,7 @@ std::error_code remove(const Twine &path, bool IgnoreNonExisting) {
793797
}
794-
798+
795799
static bool is_local_impl(struct STATVFS &Vfs) {
796800
-#if defined(__linux__) || defined(__GNU__)
797801
+#if defined(__linux__) || defined(__GNU__) || defined(__aero__)
@@ -809,15 +813,19 @@ index 520685a0e..e6c2ddf20 100644
809813
+#undef HAVE_POSIX_SPAWN
810814
#ifdef HAVE_POSIX_SPAWN
811815
#include <spawn.h>
812-
816+
813817
diff --git a/llvm/tools/llvm-dwarfdump/Statistics.cpp b/llvm/tools/llvm-dwarfdump/Statistics.cpp
814-
index 5bef4d514..2a237ef59 100644
818+
index 19a971afa..929184bfc 100644
815819
--- a/llvm/tools/llvm-dwarfdump/Statistics.cpp
816820
+++ b/llvm/tools/llvm-dwarfdump/Statistics.cpp
817-
@@ -1,3 +1,4 @@
821+
@@ -6,6 +6,8 @@
822+
//
823+
//===----------------------------------------------------------------------===//
824+
818825
+#include <cmath>
826+
+
827+
#include "llvm-dwarfdump.h"
819828
#include "llvm/ADT/DenseMap.h"
820-
#include "llvm/ADT/StringExtras.h"
821829
#include "llvm/ADT/StringSet.h"
822830
diff --git a/llvm/tools/llvm-shlib/CMakeLists.txt b/llvm/tools/llvm-shlib/CMakeLists.txt
823831
index 3eb6db33a..554264a07 100644
@@ -831,18 +839,5 @@ index 3eb6db33a..554264a07 100644
831839
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
832840
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
833841
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")
834-
diff --git a/llvm/utils/benchmark/src/benchmark_register.h b/llvm/utils/benchmark/src/benchmark_register.h
835-
index 0705e219f..6001fb8e0 100644
836-
--- a/llvm/utils/benchmark/src/benchmark_register.h
837-
+++ b/llvm/utils/benchmark/src/benchmark_register.h
838-
@@ -2,6 +2,7 @@
839-
#define BENCHMARK_REGISTER_H
840-
841-
#include <vector>
842-
+#include <limits>
843-
844-
#include "check.h"
845-
846-
--
842+
--
847843
2.34.1
848-

0 commit comments

Comments
 (0)