[PATCH] D25352: [sanitizers] Set Darwin specific linker and compiler flags for sanitizer-common tests

Anna Zaks via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 6 17:56:41 PDT 2016


zaks.anna created this revision.
zaks.anna added reviewers: kubabrecka, beanz.
zaks.anna added a subscriber: llvm-commits.
Herald added a subscriber: mgorny.

Looks like we are missing these flags only in sanitizer-common, which results in linker warnings in some settings.

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).


https://reviews.llvm.org/D25352

Files:
  lib/sanitizer_common/tests/CMakeLists.txt


Index: lib/sanitizer_common/tests/CMakeLists.txt
===================================================================
--- lib/sanitizer_common/tests/CMakeLists.txt
+++ lib/sanitizer_common/tests/CMakeLists.txt
@@ -78,6 +78,11 @@
   list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON -pie)
 endif()
 
+if(APPLE)
+  list(APPEND SANITIZER_TEST_CFLAGS_COMMON ${DARWIN_osx_CFLAGS})
+  list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON ${DARWIN_osx_LINKFLAGS})
+endif()
+
 # MSVC linker is allocating 1M for the stack by default, which is not
 # enough for the unittests. Some unittests require more than 2M.
 # The default stack size for clang is 8M.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25352.73870.patch
Type: text/x-patch
Size: 634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161007/650eff2b/attachment.bin>


More information about the llvm-commits mailing list