From: Ed Schouten Date: Mon, 5 Sep 2016 18:38:34 +0000 (+0000) Subject: Add support for targeting armv6-unknown-cloudabi-eabihf. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ce6fc0351abb66e383b5eac7b77ccd7c6e975d3f;p=clang Add support for targeting armv6-unknown-cloudabi-eabihf. 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 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 05afe215a7..2252c6bb2f 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -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(Triple, Opts); case llvm::Triple::Linux: return new LinuxTargetInfo(Triple, Opts); case llvm::Triple::FreeBSD: diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c index 5919c4de5f..88fc9bd2db 100644 --- a/test/Preprocessor/init.c +++ b/test/Preprocessor/init.c @@ -1975,6 +1975,11 @@ // 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