Add NativeClient operating system support.
authorIvan Krasin <krasin@chromium.org>
Thu, 18 Aug 2011 22:54:21 +0000 (22:54 +0000)
committerIvan Krasin <krasin@chromium.org>
Thu, 18 Aug 2011 22:54:21 +0000 (22:54 +0000)
This patch adds support of NativeClient (*-*-nacl) OS support to LLVM.
It's already supported in autoconf/config.sub.

The motivation for this change is to start upstreaming PNaCl work. The
whole set of patches include llvm backends (i686, x86_64, ARM),
llvm-gcc (probably, would not be upstreamed because it's deprecated)
and clang (the work has been just started, the amount of changes is
going to be low and the most of the work is expected to be done close
to the mainline).

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

autoconf/configure.ac
configure
include/llvm/ADT/Triple.h
lib/Support/Triple.cpp

index 8a0d73b7de6414617500e1013613b02bd9dd3a1d..f3e94e89dfb4958dc7e99e9ac1e6dfa5361c370f 100644 (file)
@@ -299,6 +299,8 @@ AC_CACHE_CHECK([type of operating system we're going to target],
     llvm_cv_target_os_type="Haiku" ;;
   *-*-rtems*)
     llvm_cv_target_os_type="RTEMS" ;;
+  *-*-nacl*)
+    llvm_cv_target_os_type="NativeClient" ;;
   *-unknown-eabi*)
     llvm_cv_target_os_type="Freestanding" ;;
   *)
index ebaec686b35eb6e07f5f848ce4a59002b263868a..c8ada54cb9b8a7e834fb0ce308084717c2dad5c2 100755 (executable)
--- a/configure
+++ b/configure
@@ -2341,6 +2341,8 @@ else
     llvm_cv_target_os_type="Haiku" ;;
   *-*-rtems*)
     llvm_cv_target_os_type="RTEMS" ;;
+  *-*-nacl*)
+    llvm_cv_target_os_type="NativeClient" ;;
   *-unknown-eabi*)
     llvm_cv_target_os_type="Freestanding" ;;
   *)
index a48620ed64204b437d56da8319d3135be56ae2db..86817e93c0ca59bb7f9f60e61c0a7b55fffaafc6 100644 (file)
@@ -94,7 +94,8 @@ public:
     Win32,
     Haiku,
     Minix,
-    RTEMS
+    RTEMS,
+    NativeClient
   };
   enum EnvironmentType {
     UnknownEnvironment,
index 05e1f9221995d3b4390a7cacc8b5e841a8987feb..8bb7f382329c88d170cf06d08cf02d79cca21a23 100644 (file)
@@ -110,6 +110,7 @@ const char *Triple::getOSTypeName(OSType Kind) {
   case Haiku: return "haiku";
   case Minix: return "minix";
   case RTEMS: return "rtems";
+  case NativeClient: return "nacl";
   }
 
   return "<invalid>";