summaryrefslogtreecommitdiff
path: root/lib/asan/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asan/CMakeLists.txt')
-rw-r--r--lib/asan/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/asan/CMakeLists.txt b/lib/asan/CMakeLists.txt
new file mode 100644
index 00000000..76bb1d8e
--- /dev/null
+++ b/lib/asan/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Build for the AddressSanitizer runtime support library.
+
+file(GLOB ASAN_SOURCES "*.cc")
+
+if(CAN_TARGET_X86_64)
+ add_library(clang_rt.asan-x86_64 STATIC ${ASAN_SOURCES})
+ set_target_properties(clang_rt.asan-x86_64 PROPERTIES COMPILE_FLAGS "${TARGET_X86_64_CFLAGS}")
+endif()
+if(CAN_TARGET_I386)
+ add_library(clang_rt.asan-i386 STATIC ${ASAN_SOURCES})
+ set_target_properties(clang_rt.asan-i386 PROPERTIES COMPILE_FLAGS "${TARGET_I386_CFLAGS}")
+endif()