[sanitizers test CMake] further refactor testing CMake for tsan
[sanitizers test CMake] further refactor testing CMake for tsan

TSan tests on Darwin first link all libraries into a static archive file.
With this change, the linking is done once per all architecture,
and previously the linking step was repeated per each architecture per
each add_tsan_test call.
Furthermore, the code is cleared up.

Differential Revision: https://reviews.llvm.org/D35913

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@309406 91177308-0d34-0410-b5e6-96231b3b80d8

llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt