fix scripts and make code compatible with old clang
authorweiyu <weiyuluo1232@gmail.com>
Sat, 12 Dec 2020 21:28:52 +0000 (13:28 -0800)
committerweiyu <weiyuluo1232@gmail.com>
Sat, 12 Dec 2020 21:28:52 +0000 (13:28 -0800)
clang
clang++
g++
gcc
silo/txn_proto2_impl.h

diff --git a/clang b/clang
index 7c38cb7347c28850c260dfa4dac9dea1f78b7916..9e98dbe2c5c59d3a0e10b456045f2e5be425b9c6 100755 (executable)
--- a/clang
+++ b/clang
@@ -1,3 +1,3 @@
 #/bin/bash
 
-/home/vagrant/llvm/build/bin/clang -Xclang -load -Xclang /home/vagrant/llvm/build/lib/libCDSPass.so -L/home/vagrant/c11tester -lmodel -Wno-unused-command-line-argument $@
+/data/tsan11_build/llvm_patched_build/bin/clang -fsanitize=thread -Wno-unused-command-line-argument $@
diff --git a/clang++ b/clang++
index c85f4762cba3cbe642ad2b1254276f4338e55675..5b32812482b791d53aa9e6bcb425a5bfb587f043 100755 (executable)
--- a/clang++
+++ b/clang++
@@ -1,3 +1,3 @@
 #/bin/bash
 
-/home/vagrant/llvm/build/bin/clang++ -Xclang -load -Xclang /home/vagrant/llvm/build/lib/libCDSPass.so -L/home/vagrant/c11tester -lmodel -Wno-unused-command-line-argument $@
+/data/tsan11_build/llvm_patched_build/bin/clang++ -fsanitize=thread -std=c++11 -Wno-unused-command-line-argument $@
diff --git a/g++ b/g++
index c85f4762cba3cbe642ad2b1254276f4338e55675..5b32812482b791d53aa9e6bcb425a5bfb587f043 100755 (executable)
--- a/g++
+++ b/g++
@@ -1,3 +1,3 @@
 #/bin/bash
 
-/home/vagrant/llvm/build/bin/clang++ -Xclang -load -Xclang /home/vagrant/llvm/build/lib/libCDSPass.so -L/home/vagrant/c11tester -lmodel -Wno-unused-command-line-argument $@
+/data/tsan11_build/llvm_patched_build/bin/clang++ -fsanitize=thread -std=c++11 -Wno-unused-command-line-argument $@
diff --git a/gcc b/gcc
index 7c38cb7347c28850c260dfa4dac9dea1f78b7916..9e98dbe2c5c59d3a0e10b456045f2e5be425b9c6 100755 (executable)
--- a/gcc
+++ b/gcc
@@ -1,3 +1,3 @@
 #/bin/bash
 
-/home/vagrant/llvm/build/bin/clang -Xclang -load -Xclang /home/vagrant/llvm/build/lib/libCDSPass.so -L/home/vagrant/c11tester -lmodel -Wno-unused-command-line-argument $@
+/data/tsan11_build/llvm_patched_build/bin/clang -fsanitize=thread -Wno-unused-command-line-argument $@
index 83021ab30158f9cb626d563ffdc7bc62b70036e7..cd358aede9a9fbdb57950e8a256424cca749a7b9 100644 (file)
@@ -708,11 +708,11 @@ txn_logger::pbuffer::can_hold_tid(uint64_t tid) const
 
 // protocol 2 - no global consistent TIDs
 template <typename Traits>
-class transaction_proto2 : public transaction<transaction_proto2, Traits>,
+class transaction_proto2 : public transaction<::transaction_proto2, Traits>,
                            private transaction_proto2_static {
 
-  friend class transaction<transaction_proto2, Traits>;
-  typedef transaction<transaction_proto2, Traits> super_type;
+  friend class transaction<::transaction_proto2, Traits>;
+  typedef transaction<::transaction_proto2, Traits> super_type;
 
 public:
 
@@ -728,7 +728,7 @@ public:
 
   transaction_proto2(uint64_t flags,
                      typename Traits::StringAllocator &sa)
-    : transaction<transaction_proto2, Traits>(flags, sa)
+    : transaction<::transaction_proto2, Traits>(flags, sa)
   {
     if (this->get_flags() & transaction_base::TXN_FLAG_READ_ONLY) {
       const uint64_t global_tick_ex =
@@ -963,7 +963,7 @@ public:
   void
   dump_debug_info() const
   {
-    transaction<transaction_proto2, Traits>::dump_debug_info();
+    transaction<::transaction_proto2, Traits>::dump_debug_info();
     if (this->is_snapshot())
       std::cerr << "  last_consistent_tid: "
         << g_proto_version_str(u_.last_consistent_tid) << std::endl;