]> granicus.if.org Git - clang/commitdiff
Add support for targeting armv6-unknown-cloudabi-eabihf.
authorEd Schouten <ed@nuxi.nl>
Mon, 5 Sep 2016 18:38:34 +0000 (18:38 +0000)
committerEd Schouten <ed@nuxi.nl>
Mon, 5 Sep 2016 18:38:34 +0000 (18:38 +0000)
I'm in the progress of adding ARMv6 support to CloudABI. On the compiler
side, everything seems to work properly with this tiny change applied.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280672 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp
test/Preprocessor/init.c

index 05afe215a7f8365d074522c79bbed348d6fd975c..2252c6bb2f98f7915dafdd0235235135e1af43d5 100644 (file)
@@ -8261,6 +8261,8 @@ static TargetInfo *AllocateTarget(const llvm::Triple &Triple,
       return new DarwinARMTargetInfo(Triple, Opts);
 
     switch (os) {
+    case llvm::Triple::CloudABI:
+      return new CloudABITargetInfo<ARMleTargetInfo>(Triple, Opts);
     case llvm::Triple::Linux:
       return new LinuxTargetInfo<ARMleTargetInfo>(Triple, Opts);
     case llvm::Triple::FreeBSD:
index 5919c4de5f4fc1805e512ddb820a1154e9f13bb4..88fc9bd2db4de0d1baf25c13fda6ff5dbeeab298 100644 (file)
 // ARMEABIHARDFP:#define __arm 1
 // ARMEABIHARDFP:#define __arm__ 1
 
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=armv6-unknown-cloudabi-eabihf < /dev/null | FileCheck -match-full-lines -check-prefix ARMV6-CLOUDABI %s
+//
+// ARMV6-CLOUDABI:#define __CloudABI__ 1
+// ARMV6-CLOUDABI:#define __arm__ 1
+
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-netbsd-eabi < /dev/null | FileCheck -match-full-lines -check-prefix ARM-NETBSD %s
 //
 // ARM-NETBSD-NOT:#define _LP64