summaryrefslogtreecommitdiff
path: root/storage/rocksdb/CMakeLists.txt
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2019-05-16 18:27:28 +0400
committerSergey Vojtovich <svoj@mariadb.org>2019-05-16 18:27:28 +0400
commit5f66c58f6d7131c64667a06d67b6b6df02e2c47c (patch)
tree07bbfc78fe4cda7e3fc484def46b34998206bf31 /storage/rocksdb/CMakeLists.txt
parent76a94a03db7ec2b4722a13f70c4eaf02debf70a5 (diff)
downloadmariadb-git-5f66c58f6d7131c64667a06d67b6b6df02e2c47c.tar.gz
Issue #904: Crash in rocksdb::IOStatsContext::Reset, this=NULL
Fix both code paths: - Change the test source code so it doesn't cause the "Unused variable" warning (which -Werror converted into error and caused CMake not to set HAVE_THREAD_LOCAL) - If the system doesn't seem to support HAVE_THREAD_LOCAL, refuse to compile (rather than producing a binary that crashes for some tests) Originally submitted at https://github.com/facebook/mysql-5.6/pull/905
Diffstat (limited to 'storage/rocksdb/CMakeLists.txt')
-rw-r--r--storage/rocksdb/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt
index 4ffa28d4bdb..70010ee57e3 100644
--- a/storage/rocksdb/CMakeLists.txt
+++ b/storage/rocksdb/CMakeLists.txt
@@ -124,10 +124,15 @@ CHECK_CXX_SOURCE_COMPILES("
#endif
int main() {
static __thread int tls;
+ tls=0;
+ return tls;
}
" HAVE_THREAD_LOCAL)
if(HAVE_THREAD_LOCAL)
ADD_DEFINITIONS(-DROCKSDB_SUPPORT_THREAD_LOCAL)
+else()
+ MESSAGE(SEND_ERROR "The compiler failed the check for ROCKSDB_SUPPORT_THREAD_LOCAL. "
+ "MyRocks requires that feature.")
endif()
INCLUDE(build_rocksdb.cmake)