diff --git a/include/__config b/include/__config
index c3cf8c7..a19b297 100644
--- a/include/__config
+++ b/include/__config
@@ -90,6 +90,10 @@
 #define _LIBCPP_NO_EXCEPTIONS
 #endif
 
+#if !(__has_feature(cxx_rtti))
+#define _LIBCPP_NO_RTTI
+#endif
+
 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE
 #define _LIBCPP_HAS_NO_STRONG_USING
 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
@@ -139,6 +143,10 @@
 #define _LIBCPP_NO_EXCEPTIONS
 #endif
 
+#ifndef __GXX_RTTI
+#define _LIBCPP_NO_RTTI
+#endif
+
 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
 
 #ifndef __GXX_EXPERIMENTAL_CXX0X__
diff --git a/include/__functional_03 b/include/__functional_03
index ffbb165..fa318df 100644
--- a/include/__functional_03
+++ b/include/__functional_03
@@ -243,8 +243,10 @@
     virtual void destroy() = 0;
     virtual void destroy_deallocate() = 0;
     virtual _R operator()() = 0;
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* target(const type_info&) const = 0;
     virtual const std::type_info& target_type() const = 0;
+#endif
 };
 
 template<class _R, class _A0>
@@ -260,8 +262,10 @@
     virtual void destroy() = 0;
     virtual void destroy_deallocate() = 0;
     virtual _R operator()(_A0) = 0;
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* target(const type_info&) const = 0;
     virtual const std::type_info& target_type() const = 0;
+#endif
 };
 
 template<class _R, class _A0, class _A1>
@@ -277,8 +281,10 @@
     virtual void destroy() = 0;
     virtual void destroy_deallocate() = 0;
     virtual _R operator()(_A0, _A1) = 0;
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* target(const type_info&) const = 0;
     virtual const std::type_info& target_type() const = 0;
+#endif
 };
 
 template<class _R, class _A0, class _A1, class _A2>
@@ -294,8 +300,10 @@
     virtual void destroy() = 0;
     virtual void destroy_deallocate() = 0;
     virtual _R operator()(_A0, _A1, _A2) = 0;
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* target(const type_info&) const = 0;
     virtual const std::type_info& target_type() const = 0;
+#endif
 };
 
 template<class _FD, class _Alloc, class _FB> class __func;
@@ -313,8 +321,10 @@
     virtual void destroy();
     virtual void destroy_deallocate();
     virtual _R operator()();
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* target(const type_info&) const;
     virtual const std::type_info& target_type() const;
+#endif
 };
 
 template<class _F, class _Alloc, class _R>
@@ -360,6 +370,8 @@
     return __invoke<_R>(__f_.first());
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 template<class _F, class _Alloc, class _R>
 const void*
 __func<_F, _Alloc, _R()>::target(const type_info& __ti) const
@@ -376,6 +388,8 @@
     return typeid(_F);
 }
 
+#endif
+
 template<class _F, class _Alloc, class _R, class _A0>
 class __func<_F, _Alloc, _R(_A0)>
     : public  __base<_R(_A0)>
@@ -389,8 +403,10 @@
     virtual void destroy();
     virtual void destroy_deallocate();
     virtual _R operator()(_A0);
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* target(const type_info&) const;
     virtual const std::type_info& target_type() const;
+#endif
 };
 
 template<class _F, class _Alloc, class _R, class _A0>
@@ -436,6 +452,8 @@
     return __invoke(__f_.first(), __a0);
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 template<class _F, class _Alloc, class _R, class _A0>
 const void*
 __func<_F, _Alloc, _R(_A0)>::target(const type_info& __ti) const
@@ -452,6 +470,8 @@
     return typeid(_F);
 }
 
+#endif
+
 template<class _F, class _Alloc, class _R, class _A0, class _A1>
 class __func<_F, _Alloc, _R(_A0, _A1)>
     : public  __base<_R(_A0, _A1)>
@@ -465,8 +485,10 @@
     virtual void destroy();
     virtual void destroy_deallocate();
     virtual _R operator()(_A0, _A1);
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* target(const type_info&) const;
     virtual const std::type_info& target_type() const;
+#endif
 };
 
 template<class _F, class _Alloc, class _R, class _A0, class _A1>
@@ -512,6 +534,8 @@
     return __invoke(__f_.first(), __a0, __a1);
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 template<class _F, class _Alloc, class _R, class _A0, class _A1>
 const void*
 __func<_F, _Alloc, _R(_A0, _A1)>::target(const type_info& __ti) const
@@ -528,6 +552,8 @@
     return typeid(_F);
 }
 
+#endif
+
 template<class _F, class _Alloc, class _R, class _A0, class _A1, class _A2>
 class __func<_F, _Alloc, _R(_A0, _A1, _A2)>
     : public  __base<_R(_A0, _A1, _A2)>
@@ -541,8 +567,10 @@
     virtual void destroy();
     virtual void destroy_deallocate();
     virtual _R operator()(_A0, _A1, _A2);
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* target(const type_info&) const;
     virtual const std::type_info& target_type() const;
+#endif
 };
 
 template<class _F, class _Alloc, class _R, class _A0, class _A1, class _A2>
@@ -588,6 +616,8 @@
     return __invoke(__f_.first(), __a0, __a1, __a2);
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 template<class _F, class _Alloc, class _R, class _A0, class _A1, class _A2>
 const void*
 __func<_F, _Alloc, _R(_A0, _A1, _A2)>::target(const type_info& __ti) const
@@ -604,6 +634,8 @@
     return typeid(_F);
 }
 
+#endif
+
 }  // __function
 
 template<class _R>
@@ -669,10 +701,12 @@
     // 20.7.16.2.4, function invocation:
     _R operator()() const;
 
+#ifndef _LIBCPP_NO_RTTI
     // 20.7.16.2.5, function target access:
     const std::type_info& target_type() const;
     template <typename _T> _T* target();
     template <typename _T> const _T* target() const;
+#endif
 };
 
 template<class _R>
@@ -797,11 +831,15 @@
 _R
 function<_R()>::operator()() const
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__f_ == 0)
         throw bad_function_call();
+#endif
     return (*__f_)();
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 template<class _R>
 const std::type_info&
 function<_R()>::target_type() const
@@ -831,6 +869,8 @@
     return (const _T*)__f_->target(typeid(_T));
 }
 
+#endif
+
 template<class _R, class _A0>
 class function<_R(_A0)>
     : public unary_function<_A0, _R>
@@ -905,10 +945,12 @@
     // 20.7.16.2.4, function invocation:
     _R operator()(_A0) const;
 
+#ifndef _LIBCPP_NO_RTTI
     // 20.7.16.2.5, function target access:
     const std::type_info& target_type() const;
     template <typename _T> _T* target();
     template <typename _T> const _T* target() const;
+#endif
 };
 
 template<class _R, class _A0>
@@ -1033,11 +1075,15 @@
 _R
 function<_R(_A0)>::operator()(_A0 __a0) const
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__f_ == 0)
         throw bad_function_call();
+#endif
     return (*__f_)(__a0);
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 template<class _R, class _A0>
 const std::type_info&
 function<_R(_A0)>::target_type() const
@@ -1067,6 +1113,8 @@
     return (const _T*)__f_->target(typeid(_T));
 }
 
+#endif
+
 template<class _R, class _A0, class _A1>
 class function<_R(_A0, _A1)>
     : public binary_function<_A0, _A1, _R>
@@ -1141,10 +1189,12 @@
     // 20.7.16.2.4, function invocation:
     _R operator()(_A0, _A1) const;
 
+#ifndef _LIBCPP_NO_RTTI
     // 20.7.16.2.5, function target access:
     const std::type_info& target_type() const;
     template <typename _T> _T* target();
     template <typename _T> const _T* target() const;
+#endif
 };
 
 template<class _R, class _A0, class _A1>
@@ -1269,11 +1319,15 @@
 _R
 function<_R(_A0, _A1)>::operator()(_A0 __a0, _A1 __a1) const
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__f_ == 0)
         throw bad_function_call();
+#endif
     return (*__f_)(__a0, __a1);
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 template<class _R, class _A0, class _A1>
 const std::type_info&
 function<_R(_A0, _A1)>::target_type() const
@@ -1303,6 +1357,8 @@
     return (const _T*)__f_->target(typeid(_T));
 }
 
+#endif
+
 template<class _R, class _A0, class _A1, class _A2>
 class function<_R(_A0, _A1, _A2)>
 {
@@ -1376,10 +1432,12 @@
     // 20.7.16.2.4, function invocation:
     _R operator()(_A0, _A1, _A2) const;
 
+#ifndef _LIBCPP_NO_RTTI
     // 20.7.16.2.5, function target access:
     const std::type_info& target_type() const;
     template <typename _T> _T* target();
     template <typename _T> const _T* target() const;
+#endif
 };
 
 template<class _R, class _A0, class _A1, class _A2>
@@ -1504,11 +1562,15 @@
 _R
 function<_R(_A0, _A1, _A2)>::operator()(_A0 __a0, _A1 __a1, _A2 __a2) const
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__f_ == 0)
         throw bad_function_call();
+#endif
     return (*__f_)(__a0, __a1, __a2);
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 template<class _R, class _A0, class _A1, class _A2>
 const std::type_info&
 function<_R(_A0, _A1, _A2)>::target_type() const
@@ -1538,6 +1600,8 @@
     return (const _T*)__f_->target(typeid(_T));
 }
 
+#endif
+
 template <class _F> 
 inline _LIBCPP_INLINE_VISIBILITY
 bool
diff --git a/include/__locale b/include/__locale
index c2146d9..743b393 100644
--- a/include/__locale
+++ b/include/__locale
@@ -134,8 +134,10 @@
 locale
 locale::combine(const locale& __other) const
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (!_STD::has_facet<_Facet>(__other))
         throw runtime_error("locale::combine: locale missing facet");
+#endif
     return locale(*this, &const_cast<_Facet&>(_STD::use_facet<_Facet>(__other)));
 }
 
diff --git a/include/__tree b/include/__tree
index 53c1e1f..18363dc 100644
--- a/include/__tree
+++ b/include/__tree
@@ -1102,8 +1102,10 @@
     if (size() != 0)
     {
         __node_pointer __cache = __detach();
+#ifndef _LIBCPP_NO_EXCEPTIONS
         try
         {
+#endif
             for (; __cache != nullptr && __first != __last; ++__first)
             {
                 __cache->__value_ = *__first;
@@ -1111,6 +1113,7 @@
                 __node_insert_unique(__cache);
                 __cache = __next;
             }
+#ifndef _LIBCPP_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1119,6 +1122,7 @@
             destroy(__cache);
             throw;
         }
+#endif
         if (__cache != nullptr)
         {
             while (__cache->__parent_ != nullptr)
@@ -1138,8 +1142,10 @@
     if (size() != 0)
     {
         __node_pointer __cache = __detach();
+#ifndef _LIBCPP_NO_EXCEPTIONS
         try
         {
+#endif
             for (; __cache != nullptr && __first != __last; ++__first)
             {
                 __cache->__value_ = *__first;
@@ -1147,6 +1153,7 @@
                 __node_insert_multi(__cache);
                 __cache = __next;
             }
+#ifndef _LIBCPP_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1155,6 +1162,7 @@
             destroy(__cache);
             throw;
         }
+#endif
         if (__cache != nullptr)
         {
             while (__cache->__parent_ != nullptr)
@@ -1253,8 +1261,10 @@
         if (size() != 0)
         {
             __node_pointer __cache = __detach();
+#ifndef _LIBCPP_NO_EXCEPTIONS
             try
             {
+#endif
                 while (__cache != nullptr && __t.size() != 0)
                 {
                     __cache->__value_ = _STD::move(__t.remove(__t.begin())->__value_);
@@ -1262,6 +1272,7 @@
                     __node_insert_multi(__cache);
                     __cache = __next;
                 }
+#ifndef _LIBCPP_NO_EXCEPTIONS
             }
             catch (...)
             {
@@ -1270,6 +1281,7 @@
                 destroy(__cache);
                 throw;
             }
+#endif
             if (__cache != nullptr)
             {
                 while (__cache->__parent_ != nullptr)
diff --git a/include/exception b/include/exception
index 51e8313..772ada4 100644
--- a/include/exception
+++ b/include/exception
@@ -141,6 +141,7 @@
 exception_ptr
 make_exception_ptr(_E __e)
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     try
     {
         throw __e;
@@ -149,6 +150,7 @@
     {
         return current_exception();
     }
+#endif
 }
 
 // nested_exception
@@ -188,7 +190,9 @@
                                     >::type* = 0)
 #endif
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     throw __nested<typename remove_reference<_Tp>::type>(_STD::forward<_Tp>(__t));
+#endif
 }
 
 template <class _Tp>
@@ -204,7 +208,9 @@
                                     >::type* = 0)
 #endif
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     throw _STD::forward<_Tp>(__t);
+#endif
 }
 
 template <class _E>
diff --git a/include/functional b/include/functional
index e645a55..430f325 100644
--- a/include/functional
+++ b/include/functional
@@ -1000,8 +1000,10 @@
     virtual void destroy() = 0;
     virtual void destroy_deallocate() = 0;
     virtual _R operator()(_ArgTypes&& ...) = 0;
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* target(const type_info&) const = 0;
     virtual const std::type_info& target_type() const = 0;
+#endif
 };
 
 template<class _FD, class _Alloc, class _FB> class __func;
@@ -1019,8 +1021,10 @@
     virtual void destroy();
     virtual void destroy_deallocate();
     virtual _R operator()(_ArgTypes&& ... __arg);
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* target(const type_info&) const;
     virtual const std::type_info& target_type() const;
+#endif
 };
 
 template<class _F, class _Alloc, class _R, class ..._ArgTypes>
@@ -1066,6 +1070,8 @@
     return __invoke(__f_.first(), _STD::forward<_ArgTypes>(__arg)...);
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 template<class _F, class _Alloc, class _R, class ..._ArgTypes>
 const void*
 __func<_F, _Alloc, _R(_ArgTypes...)>::target(const type_info& __ti) const
@@ -1082,6 +1088,8 @@
     return typeid(_F);
 }
 
+#endif
+
 }  // __function
 
 template<class _R, class ..._ArgTypes>
@@ -1163,10 +1171,12 @@
     // 20.7.16.2.4, function invocation:
     _R operator()(_ArgTypes...) const;
 
+#ifndef _LIBCPP_NO_RTTI
     // 20.7.16.2.5, function target access:
     const std::type_info& target_type() const;
     template <typename _T> _T* target();
     template <typename _T> const _T* target() const;
+#endif
 };
 
 template<class _R, class ..._ArgTypes>
@@ -1331,11 +1341,15 @@
 _R
 function<_R(_ArgTypes...)>::operator()(_ArgTypes... __arg) const
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__f_ == 0)
         throw bad_function_call();
+#endif
     return (*__f_)(_STD::forward<_ArgTypes>(__arg)...);
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 template<class _R, class ..._ArgTypes>
 const std::type_info&
 function<_R(_ArgTypes...)>::target_type() const
@@ -1365,6 +1379,8 @@
     return (const _T*)__f_->target(typeid(_T));
 }
 
+#endif
+
 template <class _R, class... _ArgTypes> 
 inline _LIBCPP_INLINE_VISIBILITY
 bool
diff --git a/include/locale b/include/locale
index f48a75e..b86143e 100644
--- a/include/locale
+++ b/include/locale
@@ -3690,8 +3690,10 @@
         if (__r == codecvt_base::ok)
             return __ws;
     }
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__wide_err_string_.empty())
         throw range_error("wstring_convert: from_bytes error");
+#endif
     return __wide_err_string_;
 }
 
@@ -3776,8 +3778,10 @@
                 return __bs;
         }
     }
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__byte_err_string_.empty())
         throw range_error("wstring_convert: to_bytes error");
+#endif
     return __byte_err_string_;
 }
 
diff --git a/include/map b/include/map
index 3998fdf..fd06c21 100644
--- a/include/map
+++ b/include/map
@@ -1136,8 +1136,10 @@
 {
     __node_base_pointer __parent;
     __node_base_pointer& __child = __find_equal_key(__parent, __k);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__child == nullptr)
         throw out_of_range("map::at:  key not found");
+#endif
     return static_cast<__node_pointer>(__child)->__value_.second;
 }
 
@@ -1147,8 +1149,10 @@
 {
     __node_base_const_pointer __parent;
     __node_base_const_pointer __child = __find_equal_key(__parent, __k);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__child == nullptr)
         throw out_of_range("map::at:  key not found");
+#endif
     return static_cast<__node_const_pointer>(__child)->__value_.second;
 }
 
diff --git a/include/memory b/include/memory
index 3358a19..5aa2fad 100644
--- a/include/memory
+++ b/include/memory
@@ -2642,7 +2642,9 @@
     long use_count() const {return __shared_count::use_count();}
     __shared_weak_count* lock();
 
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* __get_deleter(const type_info&) const;
+#endif
 private:
     virtual void __on_zero_shared_weak() = 0;
 };
@@ -2656,13 +2658,17 @@
     __shared_ptr_pointer(_Tp __p, _Dp __d, _Alloc __a)
         :  __data_(__compressed_pair<_Tp, _Dp>(__p, _STD::move(__d)), _STD::move(__a)) {}
 
+#ifndef _LIBCPP_NO_RTTI
     virtual const void* __get_deleter(const type_info&) const;
+#endif
 
 private:
     virtual void __on_zero_shared();
     virtual void __on_zero_shared_weak();
 };
 
+#ifndef _LIBCPP_NO_RTTI
+
 template <class _Tp, class _Dp, class _Alloc>
 const void*
 __shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const type_info& __t) const
@@ -2670,6 +2676,8 @@
     return __t == typeid(_Dp) ? &__data_.first().second() : 0;
 }
 
+#endif
+
 template <class _Tp, class _Dp, class _Alloc>
 void
 __shared_ptr_pointer<_Tp, _Dp, _Alloc>::__on_zero_shared()
@@ -2834,9 +2842,11 @@
     template <class _U> bool owner_before(weak_ptr<_U> const& __p) const
         {return __cntrl_ < __p.__cntrl_;}
 
+#ifndef _LIBCPP_NO_RTTI
     template <class _Dp>
         _Dp* __get_deleter() const
             {return (_Dp*)(__cntrl_ ? __cntrl_->__get_deleter(typeid(_Dp)) : 0);}
+#endif
 
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
@@ -3591,6 +3601,8 @@
     return shared_ptr<_Tp>(__r, const_cast<_Tp*>(__r.get()));
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 template<class _Dp, class _Tp>
 inline _LIBCPP_INLINE_VISIBILITY
 _Dp*
@@ -3599,6 +3611,8 @@
     return __p.template __get_deleter<_Dp>();
 }
 
+#endif
+
 template<class _Tp>
 class weak_ptr
 {
diff --git a/include/regex b/include/regex
index 51ba1ea..be49cd2 100644
--- a/include/regex
+++ b/include/regex
@@ -2263,8 +2263,10 @@
             }
             else
             {
+#ifndef _LIBCPP_NO_EXCEPTIONS
                 if (__b.size() != 1 || __e.size() != 1)
                     throw regex_error(regex_constants::error_collate);
+#endif
                 if (__icase_)
                 {
                     __b[0] = __traits_.translate_nocase(__b[0]);
@@ -2894,8 +2896,10 @@
     case egrep:
         __first = __parse_egrep(__first, __last);
         break;
+#ifndef _LIBCPP_NO_EXCEPTIONS
     default:
         throw regex_error(regex_constants::__re_err_grammar);
+#endif
     }
     return __first;
 }
@@ -2926,8 +2930,10 @@
                 }
             }
         }
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (__first != __last)
             throw regex_error(regex_constants::__re_err_empty);
+#endif
     }
     return __first;
 }
@@ -2940,15 +2946,19 @@
 {
     __owns_one_state<_CharT>* __sa = __end_;
     _ForwardIterator __temp = __parse_ERE_branch(__first, __last);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__temp == __first)
         throw regex_error(regex_constants::__re_err_empty);
+#endif
     __first = __temp;
     while (__first != __last && *__first == '|')
     {
         __owns_one_state<_CharT>* __sb = __end_;
         __temp = __parse_ERE_branch(++__first, __last);
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (__temp == __first)
             throw regex_error(regex_constants::__re_err_empty);
+#endif
         __push_alternation(__sa, __sb);
         __first = __temp;
     }
@@ -2962,8 +2972,10 @@
                                                  _ForwardIterator __last)
 {
     _ForwardIterator __temp = __parse_ERE_expression(__first, __last);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__temp == __first)
         throw regex_error(regex_constants::__re_err_empty);
+#endif
     do
     {
         __first = __temp;
@@ -2998,8 +3010,10 @@
             unsigned __temp_count = __marked_count_;
             ++__open_count_;
             __temp = __parse_extended_reg_exp(++__temp, __last);
+#ifndef _LIBCPP_NO_EXCEPTIONS
             if (__temp == __last || *__temp != ')')
                 throw regex_error(regex_constants::error_paren);
+#endif
             __push_end_marked_subexpression(__temp_count);
             --__open_count_;
             ++__temp;
@@ -3064,8 +3078,10 @@
             unsigned __temp_count = __marked_count_;
             __first = __parse_RE_expression(__temp, __last);
             __temp = __parse_Back_close_paren(__first, __last);
+#ifndef _LIBCPP_NO_EXCEPTIONS
             if (__temp == __first)
                 throw regex_error(regex_constants::error_paren);
+#endif
             __push_end_marked_subexpression(__temp_count);
             __first = __temp;
         }
@@ -3374,16 +3390,22 @@
                 int __min = 0;
                 __first = __temp;
                 __temp = __parse_DUP_COUNT(__first, __last, __min);
+#ifndef _LIBCPP_NO_EXCEPTIONS
                 if (__temp == __first)
                     throw regex_error(regex_constants::error_badbrace);
+#endif
                 __first = __temp;
+#ifndef _LIBCPP_NO_EXCEPTIONS
                 if (__first == __last)
                     throw regex_error(regex_constants::error_brace);
+#endif
                 if (*__first != ',')
                 {
                     __temp = __parse_Back_close_brace(__first, __last);
+#ifndef _LIBCPP_NO_EXCEPTIONS
                     if (__temp == __first)
                         throw regex_error(regex_constants::error_brace);
+#endif
                     __push_loop(__min, __min, __s, __mexp_begin, __mexp_end,
                                     true);
                     __first = __temp;
@@ -3394,14 +3416,18 @@
                     int __max = -1;
                     __first = __parse_DUP_COUNT(__first, __last, __max);
                     __temp = __parse_Back_close_brace(__first, __last);
+#ifndef _LIBCPP_NO_EXCEPTIONS
                     if (__temp == __first)
                         throw regex_error(regex_constants::error_brace);
+#endif
                     if (__max == -1)
                         __push_greedy_inf_repeat(__min, __s, __mexp_begin, __mexp_end);
                     else
                     {
+#ifndef _LIBCPP_NO_EXCEPTIONS
                         if (__max < __min)
                             throw regex_error(regex_constants::error_badbrace);
+#endif
                         __push_loop(__min, __max, __s, __mexp_begin, __mexp_end,
                                     true);
                     }
@@ -3461,11 +3487,15 @@
             {
                 int __min;
                 _ForwardIterator __temp = __parse_DUP_COUNT(++__first, __last, __min);
+#ifndef _LIBCPP_NO_EXCEPTIONS
                 if (__temp == __first)
                     throw regex_error(regex_constants::error_badbrace);
+#endif
                 __first = __temp;
+#ifndef _LIBCPP_NO_EXCEPTIONS
                 if (__first == __last)
                     throw regex_error(regex_constants::error_brace);
+#endif
                 switch (*__first)
                 {
                 case '}':
@@ -3479,8 +3509,11 @@
                         __push_loop(__min, __min, __s, __mexp_begin, __mexp_end);
                     break;
                 case ',':
-                    if (++__first == __last)
+                    ++__first;
+#ifndef _LIBCPP_NO_EXCEPTIONS
+                    if (__first == __last)
                         throw regex_error(regex_constants::error_badbrace);
+#endif
                     if (*__first == '}')
                     {
                         ++__first;
@@ -3496,14 +3529,20 @@
                     {
                         int __max = -1;
                         __temp = __parse_DUP_COUNT(__first, __last, __max);
+#ifndef _LIBCPP_NO_EXCEPTIONS
                         if (__temp == __first)
                             throw regex_error(regex_constants::error_brace);
+#endif
                         __first = __temp;
+#ifndef _LIBCPP_NO_EXCEPTIONS
                         if (__first == __last || *__first != '}')
                             throw regex_error(regex_constants::error_brace);
+#endif
                         ++__first;
+#ifndef _LIBCPP_NO_EXCEPTIONS
                         if (__max < __min)
                             throw regex_error(regex_constants::error_badbrace);
+#endif
                         if (__grammar == ECMAScript && __first != __last && *__first == '?')
                         {
                             ++__first;
@@ -3513,8 +3552,10 @@
                             __push_loop(__min, __max, __s, __mexp_begin, __mexp_end);
                     }
                     break;
+#ifndef _LIBCPP_NO_EXCEPTIONS
                 default:
                     throw regex_error(regex_constants::error_badbrace);
+#endif
                 }
             }
             break;
@@ -3531,8 +3572,11 @@
 {
     if (__first != __last && *__first == '[')
     {
-        if (++__first == __last)
+        ++__first;
+#ifndef _LIBCPP_NO_EXCEPTIONS
+        if (__first == __last)
             throw regex_error(regex_constants::error_brack);
+#endif
         bool __negate = false;
         if (*__first == '^')
         {
@@ -3541,23 +3585,29 @@
         }
         __bracket_expression<_CharT, _Traits>* __ml = __start_matching_list(__negate);
         // __ml owned by *this
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (__first == __last)
             throw regex_error(regex_constants::error_brack);
+#endif
         if ((__flags_ & 0x1F0) != ECMAScript && *__first == ']')
         {
             __ml->__add_char(']');
             ++__first;
         }
         __first = __parse_follow_list(__first, __last, __ml);
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (__first == __last)
             throw regex_error(regex_constants::error_brack);
+#endif
         if (*__first == '-')
         {
             __ml->__add_char('-');
             ++__first;
         }
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (__first == __last || *__first != ']')
             throw regex_error(regex_constants::error_brack);
+#endif
         ++__first;
     }
     return __first;
@@ -3677,8 +3727,10 @@
                           basic_string<_CharT>& __str,
                           __bracket_expression<_CharT, _Traits>* __ml)
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__first == __last)
         throw regex_error(regex_constants::error_escape);
+#endif
     switch (*__first)
     {
     case 0:
@@ -3719,8 +3771,10 @@
                           _ForwardIterator __last,
                           basic_string<_CharT>* __str)
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__first == __last)
         throw regex_error(regex_constants::error_escape);
+#endif
     switch (*__first)
     {
     case '\\':
@@ -3788,8 +3842,10 @@
         else
             __push_char(_CharT(__val));
     }
+#ifndef _LIBCPP_NO_EXCEPTIONS
     else
         throw regex_error(regex_constants::error_escape);
+#endif
     return __first;
 }
 
@@ -3805,14 +3861,18 @@
     value_type _Equal_close[2] = {'=', ']'};
     _ForwardIterator __temp = _STD::search(__first, __last, _Equal_close,
                                                             _Equal_close+2);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__temp == __last)
         throw regex_error(regex_constants::error_brack);
+#endif
     // [__first, __temp) contains all text in [= ... =]
     typedef typename _Traits::string_type string_type;
     string_type __collate_name =
         __traits_.lookup_collatename(__first, __temp);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__collate_name.empty())
         throw regex_error(regex_constants::error_collate);
+#endif
     string_type __equiv_name =
         __traits_.transform_primary(__collate_name.begin(),
                                     __collate_name.end());
@@ -3828,8 +3888,10 @@
         case 2:
             __ml->__add_digraph(__collate_name[0], __collate_name[1]);
             break;
+#ifndef _LIBCPP_NO_EXCEPTIONS
         default:
             throw regex_error(regex_constants::error_collate);
+#endif
         }
     }
     __first = next(__temp, 2);
@@ -3848,14 +3910,18 @@
     value_type _Colon_close[2] = {':', ']'};
     _ForwardIterator __temp = _STD::search(__first, __last, _Colon_close,
                                                             _Colon_close+2);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__temp == __last)
         throw regex_error(regex_constants::error_brack);
+#endif
     // [__first, __temp) contains all text in [: ... :]
     typedef typename _Traits::char_class_type char_class_type;
     char_class_type __class_type =
         __traits_.lookup_classname(__first, __temp, __flags_ & icase);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__class_type == 0)
         throw regex_error(regex_constants::error_brack);
+#endif
     __ml->__add_class(__class_type);
     __first = next(__temp, 2);
     return __first;
@@ -3873,8 +3939,10 @@
     value_type _Dot_close[2] = {'.', ']'};
     _ForwardIterator __temp = _STD::search(__first, __last, _Dot_close,
                                                             _Dot_close+2);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__temp == __last)
         throw regex_error(regex_constants::error_brack);
+#endif
     // [__first, __temp) contains all text in [. ... .]
     typedef typename _Traits::string_type string_type;
     __col_sym = __traits_.lookup_collatename(__first, __temp);
@@ -3883,8 +3951,10 @@
     case 1:
     case 2:
         break;
+#ifndef _LIBCPP_NO_EXCEPTIONS
     default:
         throw regex_error(regex_constants::error_collate);
+#endif
     }
     __first = next(__temp, 2);
     return __first;
@@ -4022,8 +4092,10 @@
                                 __temp = __exp.__parse(++__temp, __last);
                                 __exp.__push_l_anchor();
                                 __push_lookahead(_STD::move(__exp), false);
+#ifndef _LIBCPP_NO_EXCEPTIONS
                                 if (__temp == __last || *__temp != ')')
                                     throw regex_error(regex_constants::error_paren);
+#endif
                                 __first = ++__temp;
                             }
                             break;
@@ -4034,8 +4106,10 @@
                                 __temp = __exp.__parse(++__temp, __last);
                                 __exp.__push_l_anchor();
                                 __push_lookahead(_STD::move(__exp), true);
+#ifndef _LIBCPP_NO_EXCEPTIONS
                                 if (__temp == __last || *__temp != ')')
                                     throw regex_error(regex_constants::error_paren);
+#endif
                                 __first = ++__temp;
                             }
                             break;
@@ -4071,15 +4145,20 @@
             break;
         case '(':
             {
-                if (++__first == __last)
+                ++__first;
+#ifndef _LIBCPP_NO_EXCEPTIONS
+                if (__first == __last)
                     throw regex_error(regex_constants::error_paren);
+#endif
                 _ForwardIterator __temp = _STD::next(__first);
                 if (__temp != __last && *__first == '?' && *__temp == ':')
                 {
                     ++__open_count_;
                     __first = __parse_ecma_exp(++__temp, __last);
+#ifndef _LIBCPP_NO_EXCEPTIONS
                     if (__first == __last || *__first != ')')
                         throw regex_error(regex_constants::error_paren);
+#endif
                     --__open_count_;
                     ++__first;
                 }
@@ -4089,8 +4168,10 @@
                     unsigned __temp_count = __marked_count_;
                     ++__open_count_;
                     __first = __parse_ecma_exp(__first, __last);
+#ifndef _LIBCPP_NO_EXCEPTIONS
                     if (__first == __last || *__first != ')')
                         throw regex_error(regex_constants::error_paren);
+#endif
                     __push_end_marked_subexpression(__temp_count);
                     --__open_count_;
                     ++__first;
@@ -4151,8 +4232,10 @@
             unsigned __v = *__first - '0';
             for (++__first; '0' <= *__first && *__first <= '9'; ++__first)
                 __v = 10 * __v + *__first - '0';
+#ifndef _LIBCPP_NO_EXCEPTIONS
             if (__v > mark_count())
                 throw regex_error(regex_constants::error_backref);
+#endif
             __push_back_ref(__v);
         }
     }
@@ -4270,31 +4353,51 @@
             }
             break;
         case 'u':
-            if (++__first == __last)
+            ++__first;
+#ifndef _LIBCPP_NO_EXCEPTIONS
+            if (__first == __last)
                 throw regex_error(regex_constants::error_escape);
+#endif
             __hd = __traits_.value(*__first, 16);
+#ifndef _LIBCPP_NO_EXCEPTIONS
             if (__hd == -1)
                 throw regex_error(regex_constants::error_escape);
+#endif
             __sum = 16 * __sum + __hd;
-            if (++__first == __last)
+            ++__first;
+#ifndef _LIBCPP_NO_EXCEPTIONS
+            if (__first == __last)
                 throw regex_error(regex_constants::error_escape);
+#endif
             __hd = __traits_.value(*__first, 16);
+#ifndef _LIBCPP_NO_EXCEPTIONS
             if (__hd == -1)
                 throw regex_error(regex_constants::error_escape);
+#endif
             __sum = 16 * __sum + __hd;
             // drop through
         case 'x':
-            if (++__first == __last)
+            ++__first;
+#ifndef _LIBCPP_NO_EXCEPTIONS
+            if (__first == __last)
                 throw regex_error(regex_constants::error_escape);
+#endif
             __hd = __traits_.value(*__first, 16);
+#ifndef _LIBCPP_NO_EXCEPTIONS
             if (__hd == -1)
                 throw regex_error(regex_constants::error_escape);
+#endif
             __sum = 16 * __sum + __hd;
-            if (++__first == __last)
+            ++__first;
+#ifndef _LIBCPP_NO_EXCEPTIONS
+            if (__first == __last)
                 throw regex_error(regex_constants::error_escape);
+#endif
             __hd = __traits_.value(*__first, 16);
+#ifndef _LIBCPP_NO_EXCEPTIONS
             if (__hd == -1)
                 throw regex_error(regex_constants::error_escape);
+#endif
             __sum = 16 * __sum + __hd;
             if (__str)
                 *__str = _CharT(__sum);
@@ -4311,8 +4414,10 @@
                     __push_char(*__first);
                 ++__first;
             }
+#ifndef _LIBCPP_NO_EXCEPTIONS
             else if (__str)
                 throw regex_error(regex_constants::error_escape);
+#endif
             break;
         }
     }
@@ -5206,8 +5311,11 @@
                 __states.pop_back();
                 break;
             default:
+#ifndef _LIBCPP_NO_EXCEPTIONS
                 throw regex_error(regex_constants::__re_err_unknown);
+#endif
                 break;
+
             }
         } while (!__states.empty());
     }
@@ -5274,7 +5382,9 @@
                 __states.pop_back();
                 break;
             default:
+#ifndef _LIBCPP_NO_EXCEPTIONS
                 throw regex_error(regex_constants::__re_err_unknown);
+#endif
                 break;
             }
         } while (!__states.empty());
@@ -5354,7 +5464,9 @@
                 __states.pop_back();
                 break;
             default:
+#ifndef _LIBCPP_NO_EXCEPTIONS
                 throw regex_error(regex_constants::__re_err_unknown);
+#endif
                 break;
             }
         } while (!__states.empty());
diff --git a/lib/buildit b/lib/buildit
index 44e7c3a..89b38b6 100755
--- a/lib/buildit
+++ b/lib/buildit
@@ -21,7 +21,7 @@
   *-apple-*)
     if [ -z $RC_BUILDIT ]
     then
-      RC_CFLAGS="-arch i386 -arch x86_64"
+      RC_CFLAGS="-arch i386 -arch x86_64 -fno-exceptions -fno-rtti"
     fi
     SOEXT=dylib
     LDSHARED_FLAGS="-o libc++.1.dylib \
diff --git a/src/exception.cpp b/src/exception.cpp
index 9bed6f4..7c52115 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -54,15 +54,21 @@
 void
 std::terminate()
 {
-    try {
+#ifndef _LIBCPP_NO_EXCEPTIONS
+    try
+    {
+#endif
         (*__terminate_handler)();
         // handler should not return
         ::abort ();
+#ifndef _LIBCPP_NO_EXCEPTIONS
     } 
-    catch (...) {
+    catch (...)
+    {
         // handler should not throw exception
         ::abort ();
     }
+#endif
 }
 
 
diff --git a/src/ios.cpp b/src/ios.cpp
index eb597bf..4139cd4 100644
--- a/src/ios.cpp
+++ b/src/ios.cpp
@@ -260,8 +260,10 @@
         __rdstate_ = state;
     else
         __rdstate_ = state | badbit;
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (((state | (__rdbuf_ ? goodbit : badbit)) & __exceptions_) != 0)
         throw failure("ios_base::clear");
+#endif
 }
 
 // init
@@ -300,23 +302,31 @@
     if (__event_cap_ < rhs.__event_size_)
     {
         new_callbacks.reset((event_callback*)malloc(sizeof(event_callback) * rhs.__event_size_));
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (!new_callbacks)
             throw bad_alloc();
+#endif
         new_ints.reset((int*)malloc(sizeof(int) * rhs.__event_size_));
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (!new_ints)
             throw bad_alloc();
+#endif
     }
     if (__iarray_cap_ < rhs.__iarray_size_)
     {
         new_longs.reset((long*)malloc(sizeof(long) * rhs.__iarray_size_));
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (!new_longs)
             throw bad_alloc();
+#endif
     }
     if (__parray_cap_ < rhs.__parray_size_)
     {
         new_pointers.reset((void**)malloc(sizeof(void*) * rhs.__parray_size_));
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (!new_pointers)
             throw bad_alloc();
+#endif
     }
     // Got everything we need.  Copy everything but __rdstate_, __rdbuf_ and __exceptions_
     __fmtflags_ = rhs.__fmtflags_;
@@ -417,16 +427,20 @@
 ios_base::__set_badbit_and_consider_rethrow()
 {
     __rdstate_ |= badbit;
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__exceptions_ & badbit)
         throw;
+#endif
 }
 
 void
 ios_base::__set_failbit_and_consider_rethrow()
 {
     __rdstate_ |= failbit;
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__exceptions_ & failbit)
         throw;
+#endif
 }
 
 bool
diff --git a/src/locale.cpp b/src/locale.cpp
index e0d97dc..93d881e 100644
--- a/src/locale.cpp
+++ b/src/locale.cpp
@@ -132,8 +132,10 @@
       name_(name),
       facets_(N)
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     try
     {
+#endif
         facets_ = locale::classic().__locale_->facets_;
         for (unsigned i = 0; i < facets_.size(); ++i)
             if (facets_[i])
@@ -158,6 +160,7 @@
         install(new time_put_byname<wchar_t>(name_));
         install(new messages_byname<char>(name_));
         install(new messages_byname<wchar_t>(name_));
+#ifndef _LIBCPP_NO_EXCEPTIONS
     }
     catch (...)
     {
@@ -166,6 +169,7 @@
                 facets_[i]->__release_shared();
         throw;
     }
+#endif
 }
 
 locale::__imp::__imp(const __imp& other)
@@ -186,8 +190,10 @@
     for (unsigned i = 0; i < facets_.size(); ++i)
         if (facets_[i])
             facets_[i]->__add_shared();
+#ifndef _LIBCPP_NO_EXCEPTIONS
     try
     {
+#endif
         if (c & locale::collate)
         {
             install(new collate_byname<char>(name));
@@ -226,6 +232,7 @@
             install(new messages_byname<char>(name));
             install(new messages_byname<wchar_t>(name));
         }
+#ifndef _LIBCPP_NO_EXCEPTIONS
     }
     catch (...)
     {
@@ -234,6 +241,7 @@
                 facets_[i]->__release_shared();
         throw;
     }
+#endif
 }
 
 template<class F>
@@ -253,8 +261,10 @@
     for (unsigned i = 0; i < facets_.size(); ++i)
         if (facets_[i])
             facets_[i]->__add_shared();
+#ifndef _LIBCPP_NO_EXCEPTIONS
     try
     {
+#endif
         if (c & locale::collate)
         {
             install_from<_STD::collate<char> >(one);
@@ -301,6 +311,7 @@
             install_from<_STD::messages<char> >(one);
             install_from<_STD::messages<wchar_t> >(one);
         }
+#ifndef _LIBCPP_NO_EXCEPTIONS
     }
     catch (...)
     {
@@ -309,6 +320,7 @@
                 facets_[i]->__release_shared();
         throw;
     }
+#endif
 }
 
 locale::__imp::__imp(const __imp& other, facet* f, long id)
@@ -346,8 +358,10 @@
 const locale::facet*
 locale::__imp::use_facet(long id) const
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (!has_facet(id))
         throw bad_cast();
+#endif
     return facets_[id];
 }
 
@@ -414,8 +428,12 @@
 }
 
 locale::locale(const char* name)
+#ifndef _LIBCPP_NO_EXCEPTIONS
     : __locale_(name ? new __imp(name)
                      : throw runtime_error("locale constructed with null"))
+#else
+    : __locale_(new __imp(name))
+#endif
 {
     __locale_->__add_shared();
 }
@@ -427,8 +445,12 @@
 }
 
 locale::locale(const locale& other, const char* name, category c)
+#ifndef _LIBCPP_NO_EXCEPTIONS
     : __locale_(name ? new __imp(*other.__locale_, name, c)
                      : throw runtime_error("locale constructed with null"))
+#else
+    : __locale_(new __imp(*other.__locale_, name, c))
+#endif
 {
     __locale_->__add_shared();
 }
@@ -545,18 +567,22 @@
     : collate<char>(refs),
       __l(newlocale(LC_ALL_MASK, n, 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__l == 0)
         throw runtime_error("collate_byname<char>::collate_byname"
                             " failed to construct for " + string(n));
+#endif
 }
 
 collate_byname<char>::collate_byname(const string& name, size_t refs)
     : collate<char>(refs),
       __l(newlocale(LC_ALL_MASK, name.c_str(), 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__l == 0)
         throw runtime_error("collate_byname<char>::collate_byname"
                             " failed to construct for " + name);
+#endif
 }
 
 collate_byname<char>::~collate_byname()
@@ -593,18 +619,22 @@
     : collate<wchar_t>(refs),
       __l(newlocale(LC_ALL_MASK, n, 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__l == 0)
         throw runtime_error("collate_byname<wchar_t>::collate_byname(size_t refs)"
                             " failed to construct for " + string(n));
+#endif
 }
 
 collate_byname<wchar_t>::collate_byname(const string& name, size_t refs)
     : collate<wchar_t>(refs),
       __l(newlocale(LC_ALL_MASK, name.c_str(), 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__l == 0)
         throw runtime_error("collate_byname<wchar_t>::collate_byname(size_t refs)"
                             " failed to construct for " + name);
+#endif
 }
 
 collate_byname<wchar_t>::~collate_byname()
@@ -828,18 +858,22 @@
     : ctype<char>(0, false, refs),
       __l(newlocale(LC_ALL_MASK, name, 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__l == 0)
         throw runtime_error("ctype_byname<char>::ctype_byname"
                             " failed to construct for " + string(name));
+#endif
 }
 
 ctype_byname<char>::ctype_byname(const string& name, size_t refs)
     : ctype<char>(0, false, refs),
       __l(newlocale(LC_ALL_MASK, name.c_str(), 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__l == 0)
         throw runtime_error("ctype_byname<char>::ctype_byname"
                             " failed to construct for " + name);
+#endif
 }
 
 ctype_byname<char>::~ctype_byname()
@@ -881,18 +915,22 @@
     : ctype<wchar_t>(refs),
       __l(newlocale(LC_ALL_MASK, name, 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__l == 0)
         throw runtime_error("ctype_byname<wchar_t>::ctype_byname"
                             " failed to construct for " + string(name));
+#endif
 }
 
 ctype_byname<wchar_t>::ctype_byname(const string& name, size_t refs)
     : ctype<wchar_t>(refs),
       __l(newlocale(LC_ALL_MASK, name.c_str(), 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__l == 0)
         throw runtime_error("ctype_byname<wchar_t>::ctype_byname"
                             " failed to construct for " + name);
+#endif
 }
 
 ctype_byname<wchar_t>::~ctype_byname()
@@ -1092,9 +1130,11 @@
     : locale::facet(refs),
       __l(newlocale(LC_ALL_MASK, nm, 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__l == 0)
         throw runtime_error("codecvt_byname<wchar_t, char, mbstate_t>::codecvt_byname"
                             " failed to construct for " + string(nm));
+#endif
 }
 
 codecvt<wchar_t, char, mbstate_t>::~codecvt()
@@ -3832,9 +3872,11 @@
     if (strcmp(nm, "C") != 0)
     {
         unique_ptr<_xlocale, int(*)(locale_t)>  loc(newlocale(LC_ALL_MASK, nm, 0), freelocale);
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (loc == 0)
             throw runtime_error("numpunct_byname<char>::numpunct_byname"
                                 " failed to construct for " + string(nm));
+#endif
         lconv* lc = localeconv_l(loc.get());
         if (*lc->decimal_point)
             __decimal_point_ = *lc->decimal_point;
@@ -3869,9 +3911,11 @@
     if (strcmp(nm, "C") != 0)
     {
         unique_ptr<_xlocale, int(*)(locale_t)>  loc(newlocale(LC_ALL_MASK, nm, 0), freelocale);
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (loc == 0)
             throw runtime_error("numpunct_byname<char>::numpunct_byname"
                                 " failed to construct for " + string(nm));
+#endif
         lconv* lc = localeconv_l(loc.get());
         if (*lc->decimal_point)
             __decimal_point_ = *lc->decimal_point;
@@ -4274,17 +4318,21 @@
 __time_get::__time_get(const char* nm)
     : __loc_(newlocale(LC_ALL_MASK, nm, 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__loc_ == 0)
         throw runtime_error("time_get_byname"
                             " failed to construct for " + string(nm));
+#endif
 }
 
 __time_get::__time_get(const string& nm)
     : __loc_(newlocale(LC_ALL_MASK, nm.c_str(), 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__loc_ == 0)
         throw runtime_error("time_get_byname"
                             " failed to construct for " + nm);
+#endif
 }
 
 __time_get::~__time_get()
@@ -4921,17 +4969,21 @@
 __time_put::__time_put(const char* nm)
     : __loc_(newlocale(LC_ALL_MASK, nm, 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__loc_ == 0)
         throw runtime_error("time_put_byname"
                             " failed to construct for " + string(nm));
+#endif
 }
 
 __time_put::__time_put(const string& nm)
     : __loc_(newlocale(LC_ALL_MASK, nm.c_str(), 0))
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (__loc_ == 0)
         throw runtime_error("time_put_byname"
                             " failed to construct for " + nm);
+#endif
 }
 
 __time_put::~__time_put()
@@ -5210,9 +5262,11 @@
 {
     typedef moneypunct<char, false> base;
     unique_ptr<_xlocale, int(*)(locale_t)>  loc(newlocale(LC_ALL_MASK, nm, 0), freelocale);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (loc == 0)
         throw runtime_error("moneypunct_byname"
                             " failed to construct for " + string(nm));
+#endif
     lconv* lc = localeconv_l(loc.get());
     if (*lc->mon_decimal_point)
         __decimal_point_ = *lc->mon_decimal_point;
@@ -5246,9 +5300,11 @@
 {
     typedef moneypunct<char, true> base;
     unique_ptr<_xlocale, int(*)(locale_t)>  loc(newlocale(LC_ALL_MASK, nm, 0), freelocale);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (loc == 0)
         throw runtime_error("moneypunct_byname"
                             " failed to construct for " + string(nm));
+#endif
     lconv* lc = localeconv_l(loc.get());
     if (*lc->mon_decimal_point)
         __decimal_point_ = *lc->mon_decimal_point;
@@ -5282,9 +5338,11 @@
 {
     typedef moneypunct<wchar_t, false> base;
     unique_ptr<_xlocale, int(*)(locale_t)>  loc(newlocale(LC_ALL_MASK, nm, 0), freelocale);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (loc == 0)
         throw runtime_error("moneypunct_byname"
                             " failed to construct for " + string(nm));
+#endif
     lconv* lc = localeconv_l(loc.get());
     if (*lc->mon_decimal_point)
         __decimal_point_ = static_cast<wchar_t>(*lc->mon_decimal_point);
@@ -5341,9 +5399,11 @@
 {
     typedef moneypunct<wchar_t, true> base;
     unique_ptr<_xlocale, int(*)(locale_t)>  loc(newlocale(LC_ALL_MASK, nm, 0), freelocale);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (loc == 0)
         throw runtime_error("moneypunct_byname"
                             " failed to construct for " + string(nm));
+#endif
     lconv* lc = localeconv_l(loc.get());
     if (*lc->mon_decimal_point)
         __decimal_point_ = static_cast<wchar_t>(*lc->mon_decimal_point);
@@ -5398,7 +5458,9 @@
 
 void __throw_runtime_error(const char* msg)
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     throw runtime_error(msg);
+#endif
 }
 
 template class collate<char>;
diff --git a/src/memory.cpp b/src/memory.cpp
index f35b838..2caa12b 100644
--- a/src/memory.cpp
+++ b/src/memory.cpp
@@ -107,12 +107,16 @@
     return 0;
 }
 
+#ifndef _LIBCPP_NO_RTTI
+
 const void*
 __shared_weak_count::__get_deleter(const type_info&) const
 {
     return 0;
 }
 
+#endif
+
 void
 declare_reachable(void*)
 {
diff --git a/src/mutex.cpp b/src/mutex.cpp
index 1f8160d..fa1e7a0 100644
--- a/src/mutex.cpp
+++ b/src/mutex.cpp
@@ -220,8 +220,10 @@
         pthread_cond_wait(&cv, &mut);
     if (flag == 0)
     {
+#ifndef _LIBCPP_NO_EXCEPTIONS
         try
         {
+#endif
             flag = 1;
             pthread_mutex_unlock(&mut);
             func(arg);
@@ -229,6 +231,7 @@
             flag = ~0ul;
             pthread_mutex_unlock(&mut);
             pthread_cond_broadcast(&cv);
+#ifndef _LIBCPP_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -238,6 +241,7 @@
             pthread_cond_broadcast(&cv);
             throw;
         }
+#endif
     }
     else
         pthread_mutex_unlock(&mut);
diff --git a/src/new.cpp b/src/new.cpp
index 964d87b..f751f17 100644
--- a/src/new.cpp
+++ b/src/new.cpp
@@ -42,7 +42,11 @@
         if (__new_handler)
             __new_handler();
         else
+#ifndef _LIBCPP_NO_EXCEPTIONS
             throw std::bad_alloc();
+#else
+            break;
+#endif
     }
     return p;
 }
@@ -52,13 +56,17 @@
 operator new(size_t size, const std::nothrow_t&) throw()
 {
     void* p = 0;
+#ifndef _LIBCPP_NO_EXCEPTIONS
     try
     {
+#endif
         p = ::operator new(size);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     }
     catch (...)
     {
     }
+#endif
     return p;
 }
 
@@ -74,13 +82,17 @@
 operator new[](size_t size, const std::nothrow_t& nothrow) throw()
 {
     void* p = 0;
+#ifndef _LIBCPP_NO_EXCEPTIONS
     try
     {
+#endif
         p = ::operator new[](size);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     }
     catch (...)
     {
     }
+#endif
     return p;
 }
 
@@ -162,7 +174,9 @@
 void
 __throw_bad_alloc()
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     throw bad_alloc();
+#endif
 }
 
 }  // std
diff --git a/src/string.cpp b/src/string.cpp
index 819935c..946e915 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -79,9 +79,11 @@
         ptr = const_cast<char*>(p);
     if (ptr == p)
     {
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (r == 0)
             throw invalid_argument("stoi: no conversion");
         throw out_of_range("stoi: out of range");
+#endif
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -98,9 +100,11 @@
         ptr = const_cast<wchar_t*>(p);
     if (ptr == p)
     {
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (r == 0)
             throw invalid_argument("stoi: no conversion");
         throw out_of_range("stoi: out of range");
+#endif
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -115,9 +119,11 @@
     long r = strtol(p, &ptr, base);
     if (ptr == p)
     {
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (r == 0)
             throw invalid_argument("stol: no conversion");
         throw out_of_range("stol: out of range");
+#endif
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -132,9 +138,11 @@
     long r = wcstol(p, &ptr, base);
     if (ptr == p)
     {
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (r == 0)
             throw invalid_argument("stol: no conversion");
         throw out_of_range("stol: out of range");
+#endif
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -149,9 +157,11 @@
     unsigned long r = strtoul(p, &ptr, base);
     if (ptr == p)
     {
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (r == 0)
             throw invalid_argument("stoul: no conversion");
         throw out_of_range("stoul: out of range");
+#endif
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -166,9 +176,11 @@
     unsigned long r = wcstoul(p, &ptr, base);
     if (ptr == p)
     {
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (r == 0)
             throw invalid_argument("stoul: no conversion");
         throw out_of_range("stoul: out of range");
+#endif
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -183,9 +195,11 @@
     long long r = strtoll(p, &ptr, base);
     if (ptr == p)
     {
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (r == 0)
             throw invalid_argument("stoll: no conversion");
         throw out_of_range("stoll: out of range");
+#endif
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -200,9 +214,11 @@
     long long r = wcstoll(p, &ptr, base);
     if (ptr == p)
     {
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (r == 0)
             throw invalid_argument("stoll: no conversion");
         throw out_of_range("stoll: out of range");
+#endif
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -217,9 +233,11 @@
     unsigned long long r = strtoull(p, &ptr, base);
     if (ptr == p)
     {
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (r == 0)
             throw invalid_argument("stoull: no conversion");
         throw out_of_range("stoull: out of range");
+#endif
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -234,9 +252,11 @@
     unsigned long long r = wcstoull(p, &ptr, base);
     if (ptr == p)
     {
+#ifndef _LIBCPP_NO_EXCEPTIONS
         if (r == 0)
             throw invalid_argument("stoull: no conversion");
         throw out_of_range("stoull: out of range");
+#endif
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -252,10 +272,12 @@
     errno = 0;
     double r = strtod(p, &ptr);
     swap(errno, errno_save);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (errno_save == ERANGE)
         throw out_of_range("stof: out of range");
     if (ptr == p)
         throw invalid_argument("stof: no conversion");
+#endif
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
     return static_cast<float>(r);
@@ -270,10 +292,12 @@
     errno = 0;
     double r = wcstod(p, &ptr);
     swap(errno, errno_save);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (errno_save == ERANGE)
         throw out_of_range("stof: out of range");
     if (ptr == p)
         throw invalid_argument("stof: no conversion");
+#endif
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
     return static_cast<float>(r);
@@ -288,10 +312,12 @@
     errno = 0;
     double r = strtod(p, &ptr);
     swap(errno, errno_save);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (errno_save == ERANGE)
         throw out_of_range("stod: out of range");
     if (ptr == p)
         throw invalid_argument("stod: no conversion");
+#endif
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
     return r;
@@ -306,10 +332,12 @@
     errno = 0;
     double r = wcstod(p, &ptr);
     swap(errno, errno_save);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (errno_save == ERANGE)
         throw out_of_range("stod: out of range");
     if (ptr == p)
         throw invalid_argument("stod: no conversion");
+#endif
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
     return r;
@@ -324,10 +352,12 @@
     errno = 0;
     long double r = strtold(p, &ptr);
     swap(errno, errno_save);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (errno_save == ERANGE)
         throw out_of_range("stold: out of range");
     if (ptr == p)
         throw invalid_argument("stold: no conversion");
+#endif
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
     return r;
@@ -342,10 +372,12 @@
     errno = 0;
     long double r = wcstold(p, &ptr);
     swap(errno, errno_save);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (errno_save == ERANGE)
         throw out_of_range("stold: out of range");
     if (ptr == p)
         throw invalid_argument("stold: no conversion");
+#endif
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
     return r;
diff --git a/src/system_error.cpp b/src/system_error.cpp
index 3c1f000..1ca85cb 100644
--- a/src/system_error.cpp
+++ b/src/system_error.cpp
@@ -193,7 +193,9 @@
 void
 __throw_system_error(int ev, const char* what_arg)
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     throw system_error(error_code(ev, system_category()), what_arg);
+#endif
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/src/thread.cpp b/src/thread.cpp
index f2db6d5..de53f78 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -24,8 +24,10 @@
 thread::join()
 {
     int ec = pthread_join(__t_, 0);
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (ec)
         throw system_error(error_code(ec, system_category()), "thread::join failed");
+#endif
     __t_ = 0;
 }
 
@@ -39,8 +41,10 @@
         if (ec == 0)
             __t_ = 0;
     }
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (ec)
         throw system_error(error_code(ec, system_category()), "thread::detach failed");
+#endif
 }
 
 unsigned
