Use our own lightweight wrapper for thread local storage

With the boost thread helper we have to statically link to the boost libraries, which on most system is built against the latest version of the OS (instead of our current target 10.7). This doesn't seem to be an actual problem, but newer versions of clang issue warnings about it.
This commit is contained in:
Ronald Wampler
2015-08-06 11:38:49 -04:00
committed by Allan Odgaard
parent f3d1abaeca
commit 14c6a70b85
3 changed files with 2 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
#include "info.h"
#include <boost/thread/tss.hpp>
#include <oak/debug.h>
#include <oak/tls_ptr.h>
/* CrashReporter info */
char const* __crashreporter_info__ = nullptr;
@@ -59,10 +59,7 @@ namespace
static stack_t& stack ()
{
static boost::thread_specific_ptr<stack_t> stackPtr;
if(!stackPtr.get())
stackPtr.reset(new stack_t);
static oak::tls_ptr_t<stack_t> stackPtr;
return *stackPtr;
}
}

View File

@@ -1,3 +1,2 @@
SOURCES = src/*.cc
EXPORT = src/*.h
LN_FLAGS += /usr/local/lib/libboost_thread-mt.a /usr/local/lib/libboost_system-mt.a

2
target
View File

@@ -28,8 +28,6 @@ LN_FLAGS += -rpath @executable_path/../Frameworks
CXX_FLAGS += -I"$capnp_prefix/include"
LN_FLAGS += -L"$capnp_prefix/lib"
LN_FLAGS += /usr/local/lib/libboost_thread-mt.a /usr/local/lib/libboost_system-mt.a
PRELUDE = Shared/PCH/prelude.*
TARGETS = vendor/*/target