nsubtil / lift

A collection of parallel programming primitives for CPUs and GPUs
Other
12 stars 3 forks source link

Tests Do Not Build on Mac #40

Open vucinicv opened 8 years ago

vucinicv commented 8 years ago

thread_local storage is unsupported on some versions(Mavericks at least) of mac.

nsubtil commented 8 years ago

This could ultimately be due to the fact that we're forced to use a relatively old version of Xcode in order to be able to build with nvcc. A newer CUDA toolkit might cure this problem.

nsubtil commented 8 years ago

One possible WAR for the thread-local issue might be to use the __thread attribute under clang instead.

According to http://stackoverflow.com/a/25393790, it's supported. But I can't find it in the clang documentation. One possible solution is to just check if it builds.

Tagging @chuckseberino as he's run into this recently as well.

chuckseberino commented 8 years ago

Using __thread works for me on OSX 10.10.5, XCode 7.2.1

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 7.0.2 (clang-700.1.81) Target: x86_64-apple-darwin14.5.0