Fix deprecated-copy warnings
[ardour.git] / wscript
diff --git a/wscript b/wscript
index 9068290a9051e490792104f6a3b019eb1a2c0e74..e9fb579dc9018b05cb9f88cd0556b109d1b7eb94 100644 (file)
--- a/wscript
+++ b/wscript
@@ -384,6 +384,12 @@ int main() { return 0; }''',
         cxx_flags.append('-fno-omit-frame-pointer')
         linker_flags.append('-fsanitize=address')
 
+    if conf.options.tsan:
+        conf.check_cxx(cxxflags=["-fsanitize=thread", "-fno-omit-frame-pointer"], linkflags=["-fsanitize=thread"])
+        c_flags.extend(('-fsanitize=thread', '-fno-omit-frame-pointer'))
+        cxx_flags.extend(('-fsanitize=thread', '-fno-omit-frame-pointer'))
+        linker_flags.append('-fsanitize=thread')
+
     if opt.gprofile:
         debug_flags = [ flags_dict['gprofile'] ]
 
@@ -828,6 +834,8 @@ def options(opt):
                     help='use libc++ instead of default or auto-detected stdlib')
     opt.add_option('--address-sanitizer', action='store_true', default=False, dest='asan',
                     help='Turn on AddressSanitizer (requires GCC >= 4.8 or clang >= 3.1)')
+    opt.add_option('--thread-sanitizer', action='store_true', default=False, dest='tsan',
+                    help='Turn on ThreadSanitizer (requires GCC >= 4.8 or clang, and 64bit CPU)')
     opt.add_option('--ptformat', action='store_true', default=False, dest='ptformat',
                     help='Turn on PT session import option')
     opt.add_option('--no-threaded-waveviews', action='store_true', default=False, dest='no_threaded_waveviews',
@@ -1032,12 +1040,12 @@ def configure(conf):
             else:
                 conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')
 
-    conf.check_cxx(fragment = "#include <boost/version.hpp>\n#if !defined (BOOST_VERSION) || BOOST_VERSION < 103900\n#error boost >= 1.39 is not available\n#endif\nint main(void) { return 0; }\n",
+    conf.check_cxx(fragment = "#include <boost/version.hpp>\n#if !defined (BOOST_VERSION) || BOOST_VERSION < 105600\n#error boost >= 1.56 is not available\n#endif\nint main(void) { return 0; }\n",
               execute = False,
               mandatory = True,
-              msg = 'Checking for boost library >= 1.39',
+              msg = 'Checking for boost library >= 1.56',
               okmsg = 'ok',
-              errmsg = 'too old\nPlease install boost version 1.39 or higher.')
+              errmsg = 'too old\nPlease install boost version 1.56 or higher.')
 
     if re.search ("linux", sys.platform) != None and Options.options.dist_target != 'mingw':
         autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA')