[sanitizers] Set Darwin specific linker and compiler flags for all tests
authorAnna Zaks <ganna@apple.com>
Wed, 26 Oct 2016 23:23:38 +0000 (23:23 +0000)
committerAnna Zaks <ganna@apple.com>
Wed, 26 Oct 2016 23:23:38 +0000 (23:23 +0000)
commitbe7ae6684f0937b1c922ecbbf03c3705846bced9
treec63cfe42de07be26d3919b0257c499b066476690
parent5ee58d38606cc348dc11c2df662123aefb0a67e9
[sanitizers] Set Darwin specific linker and compiler flags for all tests

Looks like we are missing these flags only in tsan and sanitizer-common.

This results in linker warnings in some settings as it can cause the Unit
tests to be built with a different SDK version than that was used to build
the runtime. For example, we are not setting the minimal deployment target
on the tests but are setting the minimal deployment target for the sanitizer
library, which leads to the following warning on some bots: ld: warning:
object file (sanitizer_posix_test.cc.i386.o) was built for newer OSX version
(10.12) than being linked (10.11).

Differential Revision: https://reviews.llvm.org/D25860  https://reviews.llvm.org/D25352

llvm-svn: 285255
compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
compiler-rt/lib/tsan/tests/CMakeLists.txt