From 1a742c236b7470fff05bfb85fe74206ca8c08b18 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 13 Dec 2016 16:40:50 +0200 Subject: Use config macros from libbutl --- build2/b.cxx | 4 ---- build2/scheduler | 10 +++------- build2/scheduler.cxx | 6 +++--- build2/utility | 1 + 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/build2/b.cxx b/build2/b.cxx index f3502b0..83b6aff 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -1096,10 +1096,6 @@ main (int argc, char* argv[]) { // Diagnostics has already been issued. } - catch (const system_error& e) - { - error << "unhandled system error: " << e.what (); - } return 1; } diff --git a/build2/scheduler b/build2/scheduler index ffb8acd..3160433 100644 --- a/build2/scheduler +++ b/build2/scheduler @@ -457,14 +457,10 @@ namespace build2 // TLS cache of thread's task queue. // static - // Apparently Apple's Clang "temporarily disabled" C++11 thread_local - // until they can implement a "fast" version, which reportedly happened in - // XCode 8. So for now we will continue using __thread for this target. - // -#if defined(__apple_build_version__) && __apple_build_version__ < 8000000 - __thread -#else +#ifdef BUTL_CXX11_THREAD_LOCAL thread_local +#else + __thread #endif task_queue* task_queue_; diff --git a/build2/scheduler.cxx b/build2/scheduler.cxx index 4619e85..3da61b9 100644 --- a/build2/scheduler.cxx +++ b/build2/scheduler.cxx @@ -390,10 +390,10 @@ namespace build2 s.helpers_--; } -#if defined(__apple_build_version__) && __apple_build_version__ < 8000000 - __thread +#ifdef BUTL_CXX11_THREAD_LOCAL + thread_local #else - thread_local + __thread #endif scheduler::task_queue* scheduler::task_queue_ = nullptr; diff --git a/build2/utility b/build2/utility index a0d040a..dda75f0 100644 --- a/build2/utility +++ b/build2/utility @@ -13,6 +13,7 @@ #include // make_move_iterator() #include // ref(), cref() +#include // BUTL_CXXNN_* #include // combine_hash(), reverse_iterate(), casecmp(), // lcase(), etc -- cgit v1.1