From ee03d18c66d74bde4db29f079025ce74d36ad2dc Mon Sep 17 00:00:00 2001 From: gdh1995 Date: Mon, 21 May 2018 14:23:32 +0800 Subject: [PATCH] fix a bug of the android Makefile for nsync library NDK doesn't support thread_local variables which require destructors, so on Android it should use __thread instead. Observations: * ProtoBuf and other libraries are not using thread_local on Android. * In Tensorflow, there's a "thread_local" in code about CUDA, which should be safe enough. More discussions are on https://github.com/android-ndk/ndk/issues/360 . --- tensorflow/contrib/makefile/compile_nsync.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/contrib/makefile/compile_nsync.sh b/tensorflow/contrib/makefile/compile_nsync.sh index e8c6edd..a28fc3a 100755 --- a/tensorflow/contrib/makefile/compile_nsync.sh +++ b/tensorflow/contrib/makefile/compile_nsync.sh @@ -270,7 +270,7 @@ for arch in $archs; do PLATFORM_LDFLAGS=-pthread MKDEP=${CC} -M -std=c++11 PLATFORM_C=../../platform/c++11/src/nsync_semaphore_mutex.cc \ - ../../platform/c++11/src/per_thread_waiter.cc \ + ../../platform/posix/src/per_thread_waiter.c \ ../../platform/c++11/src/yield.cc \ ../../platform/c++11/src/time_rep_timespec.cc \ ../../platform/c++11/src/nsync_panic.cc -- 2.7.4