[llvm-commits] [compiler-rt] r159420 - /compiler-rt/trunk/lib/asan/tests/CMakeLists.txt

Alexey Samsonov samsonov at google.com
Fri Jun 29 04:29:39 PDT 2012


Author: samsonov
Date: Fri Jun 29 06:29:39 2012
New Revision: 159420

URL: http://llvm.org/viewvc/llvm-project?rev=159420&view=rev
Log:
[ASan] cmake unit tests: explicitly add necessary linker flags when linking unit tests with asan runtime

Modified:
    compiler-rt/trunk/lib/asan/tests/CMakeLists.txt

Modified: compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/CMakeLists.txt?rev=159420&r1=159419&r2=159420&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/tests/CMakeLists.txt Fri Jun 29 06:29:39 2012
@@ -52,8 +52,12 @@
 	endif()
 	if (APPLE)
 		# Darwin-specific linker flags.
-		set_target_properties(${testname} PROPERTIES
-		  LINK_FLAGS "-framework Foundation")
+		set_property(TARGET ${testname} APPEND PROPERTY
+		  LINK_FLAGS "-framework CoreFoundation")
+	elseif (UNIX)
+		# Linux-specific linker flags.
+		set_property(TARGET ${testname} APPEND PROPERTY
+		  LINK_FLAGS "-lpthread -ldl -export-dynamic")
 	endif()
 	get_property(compile_flags TARGET ${testname} PROPERTY COMPILE_FLAGS)
 	foreach(arg ${ASAN_UNITTEST_COMMON_CFLAGS})





More information about the llvm-commits mailing list