diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-12-13 16:40:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-12-13 16:40:50 +0200 |
commit | 1a742c236b7470fff05bfb85fe74206ca8c08b18 (patch) | |
tree | 48a3bb4aec78c1887ec0299584a6bffc35a527a4 | |
parent | 22b8744a7cede83906dfb4a08c55b69dd6878866 (diff) |
Use config macros from libbutl
-rw-r--r-- | build2/b.cxx | 4 | ||||
-rw-r--r-- | build2/scheduler | 10 | ||||
-rw-r--r-- | build2/scheduler.cxx | 6 | ||||
-rw-r--r-- | 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 <iterator> // make_move_iterator() #include <functional> // ref(), cref() +#include <butl/config> // BUTL_CXXNN_* #include <butl/utility> // combine_hash(), reverse_iterate(), casecmp(), // lcase(), etc |