diff options
Diffstat (limited to 'community/llvm3.7/llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch')
-rw-r--r-- | community/llvm3.7/llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/community/llvm3.7/llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch b/community/llvm3.7/llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch index 15f255aa38..d3e06ec1ac 100644 --- a/community/llvm3.7/llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch +++ b/community/llvm3.7/llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch @@ -10,11 +10,9 @@ Subject: [PATCH 1/3] Add Musl, MuslEABI and Musl EABIHF triples lib/Target/ARM/ARMTargetMachine.cpp | 2 ++ 4 files changed, 23 insertions(+) -diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h -index e01db0a..2fc4fc1 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h -@@ -174,6 +174,10 @@ public: +@@ -167,6 +167,10 @@ EABIHF, Android, @@ -25,25 +23,23 @@ index e01db0a..2fc4fc1 100644 MSVC, Itanium, Cygnus, -@@ -544,6 +548,13 @@ public: - /// Tests whether the target is Android - bool isAndroid() const { return getEnvironment() == Triple::Android; } - +@@ -548,6 +552,13 @@ + /// setOSAndEnvironmentName - Set the operating system and optional + /// environment components with a single string. + void setOSAndEnvironmentName(StringRef Str); ++ + /// Tests whether the target is musl libc + bool isMusl() const { + return getEnvironment() == Triple::Musl || + getEnvironment() == Triple::MuslEABI || + getEnvironment() == Triple::MuslEABIHF; + } -+ + /// @} - /// @name Mutators - /// @{ -diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp -index 11afcf7..d90a06a 100644 + /// @name Helpers to build variants of a particular triple. --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp -@@ -199,6 +199,9 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) { +@@ -192,6 +192,9 @@ case CODE16: return "code16"; case EABI: return "eabi"; case EABIHF: return "eabihf"; @@ -53,7 +49,7 @@ index 11afcf7..d90a06a 100644 case Android: return "android"; case MSVC: return "msvc"; case Itanium: return "itanium"; -@@ -454,6 +457,9 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) { +@@ -427,6 +430,9 @@ .StartsWith("code16", Triple::CODE16) .StartsWith("gnu", Triple::GNU) .StartsWith("android", Triple::Android) @@ -63,7 +59,7 @@ index 11afcf7..d90a06a 100644 .StartsWith("msvc", Triple::MSVC) .StartsWith("itanium", Triple::Itanium) .StartsWith("cygnus", Triple::Cygnus) -@@ -1431,6 +1437,7 @@ StringRef Triple::getARMCPUForArch(StringRef MArch) const { +@@ -1326,6 +1332,7 @@ switch (getEnvironment()) { case llvm::Triple::EABIHF: case llvm::Triple::GNUEABIHF: @@ -71,11 +67,9 @@ index 11afcf7..d90a06a 100644 return "arm1176jzf-s"; default: return "arm7tdmi"; -diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h -index 4d54e57..7ed7ab7 100644 --- a/lib/Target/ARM/ARMSubtarget.h +++ b/lib/Target/ARM/ARMSubtarget.h -@@ -405,8 +405,10 @@ public: +@@ -381,8 +381,10 @@ bool isTargetEHABICompatible() const { return (TargetTriple.getEnvironment() == Triple::EABI || TargetTriple.getEnvironment() == Triple::GNUEABI || @@ -83,10 +77,10 @@ index 4d54e57..7ed7ab7 100644 TargetTriple.getEnvironment() == Triple::EABIHF || TargetTriple.getEnvironment() == Triple::GNUEABIHF || + TargetTriple.getEnvironment() == Triple::MuslEABIHF || - TargetTriple.getEnvironment() == Triple::Android) && + TargetTriple.getEnvironment() == Triple::Android) && !isTargetDarwin() && !isTargetWindows(); } -@@ -415,6 +417,7 @@ public: +@@ -391,6 +393,7 @@ // FIXME: this is invalid for WindowsCE return TargetTriple.getEnvironment() == Triple::GNUEABIHF || TargetTriple.getEnvironment() == Triple::EABIHF || @@ -94,11 +88,9 @@ index 4d54e57..7ed7ab7 100644 isTargetWindows(); } bool isTargetAndroid() const { -diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp -index fca1901..25f5cf9 100644 --- a/lib/Target/ARM/ARMTargetMachine.cpp +++ b/lib/Target/ARM/ARMTargetMachine.cpp -@@ -101,6 +101,8 @@ computeTargetABI(const Triple &TT, StringRef CPU, +@@ -97,6 +97,8 @@ case llvm::Triple::GNUEABIHF: case llvm::Triple::EABIHF: case llvm::Triple::EABI: @@ -107,6 +99,3 @@ index fca1901..25f5cf9 100644 TargetABI = ARMBaseTargetMachine::ARM_ABI_AAPCS; break; case llvm::Triple::GNU: --- -2.7.3 - |