[med-svn] [Git][med-team/xenium][master] 2 commits: Do not enable Thread Sanitizer in debian/rules
Michael R. Crusoe
gitlab at salsa.debian.org
Wed Dec 30 17:36:17 GMT 2020
Michael R. Crusoe pushed to branch master at Debian Med / xenium
Commits:
1286f6cb by Juhani Numminen at 2020-12-30T17:36:14+00:00
Do not enable Thread Sanitizer in debian/rules
It is now enabled via the new patch.
- - - - -
f65b900a by Michael R. Crusoe at 2020-12-30T17:36:15+00:00
Merge branch 'master' into 'master'
Use ThreadSanitizer only after checking if it works
See merge request med-team/xenium!1
- - - - -
4 changed files:
- debian/patches/AdjustCMake.patch
- + debian/patches/detect-thread-sanitizer.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/patches/AdjustCMake.patch
=====================================
@@ -1,10 +1,8 @@
Description: Adjusting for non-inclusion of 3rdParty tools
Author: Steffen Moeller <moeller at debian.org>
-Index: xenium/CMakeLists.txt
-===================================================================
---- xenium.orig/CMakeLists.txt
-+++ xenium/CMakeLists.txt
-@@ -21,9 +21,6 @@ file(GLOB_RECURSE BENCHMARK_FILES benchm
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -25,9 +25,6 @@
include_directories(
.
@@ -14,7 +12,7 @@ Index: xenium/CMakeLists.txt
)
add_executable(gtest ${TEST_FILES} ${XENIUM_FILES})
-@@ -44,7 +41,7 @@ if(WITH_LIBCDS)
+@@ -58,7 +55,7 @@
endif()
if(MSVC)
@@ -23,10 +21,8 @@ Index: xenium/CMakeLists.txt
target_compile_options(benchmark PRIVATE /bigobj)# /W4 /WX)
else()
target_compile_options(gtest PRIVATE -Wall -Wextra -Werror -Wno-error=cpp)
-Index: xenium/gtest.cmake
-===================================================================
---- xenium.orig/gtest.cmake
-+++ xenium/gtest.cmake
+--- a/gtest.cmake
++++ b/gtest.cmake
@@ -1,13 +1,13 @@
-set(GOOGLETEST_ROOT gtest/googletest CACHE STRING "Google Test source root")
+set(GOOGLETEST_ROOT /usr/src/googletest/googletest/ CACHE STRING "Google Test source root")
=====================================
debian/patches/detect-thread-sanitizer.patch
=====================================
@@ -0,0 +1,42 @@
+Description: Check whether TSan works before trying to use it
+ because not all Debian archs support it.
+Author: Juhani Numminen <juhaninumminen0 at gmail.com>
+Forwarded: https://github.com/mpoeter/xenium/pull/21
+Last-Update: 2020-12-30
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,6 +1,9 @@
+ project(xenium)
+ cmake_minimum_required(VERSION 3.0)
+
++include(CheckCXXCompilerFlag)
++include(CMakePushCheckState)
++
+ include(gtest.cmake)
+
+ set(CMAKE_CXX_STANDARD 17)
+@@ -11,6 +14,7 @@
+ find_package(Threads REQUIRED)
+ find_package(Doxygen)
+
++option(WITH_TSAN "Build tests and benchmarks with ThreadSanitizer" ON)
+ option(BUILD_DOCUMENTATION "Create the HTML based documentation (requires Doxygen)" ${DOXYGEN_FOUND})
+
+ file(GLOB_RECURSE XENIUM_FILES xenium/*.hpp)
+@@ -43,6 +47,16 @@
+ target_compile_definitions(benchmark PRIVATE WITH_LIBCDS CDS_THREADING_CXX11)
+ endif()
+
++if(WITH_TSAN AND NOT MSVC)
++ cmake_push_check_state()
++ set(CMAKE_REQUIRED_FLAGS -fsanitize=thread)
++ check_cxx_compiler_flag("" TSAN_FLAG_WORKS)
++ cmake_pop_check_state()
++ if(TSAN_FLAG_WORKS)
++ string(APPEND CMAKE_CXX_FLAGS " -fsanitize=thread")
++ endif()
++endif()
++
+ if(MSVC)
+ target_compile_options(gtest PRIVATE /bigobj /W4)# /WX)
+ target_compile_options(benchmark PRIVATE /bigobj)# /W4 /WX)
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
+detect-thread-sanitizer.patch
AdjustCMake.patch
remove-privacy-breach.patch
=====================================
debian/rules
=====================================
@@ -8,7 +8,7 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all
dh $@
override_dh_auto_configure:
- dh_auto_configure -- -DCMAKE_BUILD_TYPE="RelWithDebug" -DCMAKE_CXX_FLAGS="-fsanitize=thread" # -DWITH_LIBCDS="1"
+ dh_auto_configure -- -DCMAKE_BUILD_TYPE="RelWithDebug" # -DWITH_LIBCDS="1"
override_dh_auto_build:
dh_auto_build
View it on GitLab: https://salsa.debian.org/med-team/xenium/-/compare/0ed1fc215dbfaa42ee97445bd42e98a1d02a97b9...f65b900aed34acd5266bb5ba8ed585dd5f28a5c4
--
View it on GitLab: https://salsa.debian.org/med-team/xenium/-/compare/0ed1fc215dbfaa42ee97445bd42e98a1d02a97b9...f65b900aed34acd5266bb5ba8ed585dd5f28a5c4
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20201230/cb9f434e/attachment-0001.html>
More information about the debian-med-commit
mailing list