From: gdh1995 Date: Mon, 21 May 2018 06:23:32 +0000 (+0800) Subject: fix a bug of the android Makefile for nsync library X-Git-Tag: upstream/v1.9.0_rc1~64^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee03d18c66d74bde4db29f079025ce74d36ad2dc;p=platform%2Fupstream%2Ftensorflow.git 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 . --- 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