summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-03-23 00:31:07 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-03-23 00:31:07 +0000
commita06fe9183fbffb78798a444da9bc3040fdd444aa (patch)
treed0891fc14db3ce813e10b7da7902eeff9bbc70cb /lib
parenta05af3d0f2417cd6516460a46d0381a7345a5837 (diff)
downloadcompiler-rt-a06fe9183fbffb78798a444da9bc3040fdd444aa.tar.gz
compiler-rt-a06fe9183fbffb78798a444da9bc3040fdd444aa.tar.bz2
compiler-rt-a06fe9183fbffb78798a444da9bc3040fdd444aa.tar.xz
Build and install .syms files alongside sanitizer runtimes. These are used to
specify which symbols are exported to DSOs when the sanitizer is statically linked into a binary. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/asan/CMakeLists.txt3
-rw-r--r--lib/asan/asan.syms1
-rw-r--r--lib/msan/CMakeLists.txt3
-rw-r--r--lib/msan/msan.syms1
-rw-r--r--lib/tsan/rtl/CMakeLists.txt3
-rw-r--r--lib/tsan/rtl/tsan.syms1
-rw-r--r--lib/ubsan/CMakeLists.txt6
-rw-r--r--lib/ubsan/ubsan.syms1
8 files changed, 14 insertions, 5 deletions
diff --git a/lib/asan/CMakeLists.txt b/lib/asan/CMakeLists.txt
index bddae9fe..030c7b3e 100644
--- a/lib/asan/CMakeLists.txt
+++ b/lib/asan/CMakeLists.txt
@@ -86,7 +86,8 @@ else()
$<TARGET_OBJECTS:RTInterception.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
CFLAGS ${ASAN_CFLAGS}
- DEFS ${ASAN_COMMON_DEFINITIONS})
+ DEFS ${ASAN_COMMON_DEFINITIONS}
+ SYMS asan.syms)
list(APPEND ASAN_RUNTIME_LIBRARIES clang_rt.asan-${arch})
endforeach()
endif()
diff --git a/lib/asan/asan.syms b/lib/asan/asan.syms
new file mode 100644
index 00000000..33c8fcb0
--- /dev/null
+++ b/lib/asan/asan.syms
@@ -0,0 +1 @@
+{ __asan_*; };
diff --git a/lib/msan/CMakeLists.txt b/lib/msan/CMakeLists.txt
index 6f10942c..5eedbea7 100644
--- a/lib/msan/CMakeLists.txt
+++ b/lib/msan/CMakeLists.txt
@@ -24,7 +24,8 @@ if(CAN_TARGET_${arch})
SOURCES ${MSAN_RTL_SOURCES}
$<TARGET_OBJECTS:RTInterception.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
- CFLAGS ${MSAN_RTL_CFLAGS})
+ CFLAGS ${MSAN_RTL_CFLAGS}
+ SYMS msan.syms)
list(APPEND MSAN_RUNTIME_LIBRARIES clang_rt.msan-${arch})
endif()
diff --git a/lib/msan/msan.syms b/lib/msan/msan.syms
new file mode 100644
index 00000000..91499b4d
--- /dev/null
+++ b/lib/msan/msan.syms
@@ -0,0 +1 @@
+{ __msan_*; };
diff --git a/lib/tsan/rtl/CMakeLists.txt b/lib/tsan/rtl/CMakeLists.txt
index f2a8533b..8d89e6e7 100644
--- a/lib/tsan/rtl/CMakeLists.txt
+++ b/lib/tsan/rtl/CMakeLists.txt
@@ -44,6 +44,7 @@ if(CAN_TARGET_x86_64 AND UNIX AND NOT APPLE)
$<TARGET_OBJECTS:RTInterception.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
CFLAGS ${TSAN_CFLAGS}
- DEFS ${TSAN_COMMON_DEFINITIONS})
+ DEFS ${TSAN_COMMON_DEFINITIONS}
+ SYMS tsan.syms)
list(APPEND TSAN_RUNTIME_LIBRARIES clang_rt.tsan-${arch})
endif()
diff --git a/lib/tsan/rtl/tsan.syms b/lib/tsan/rtl/tsan.syms
new file mode 100644
index 00000000..bedbe131
--- /dev/null
+++ b/lib/tsan/rtl/tsan.syms
@@ -0,0 +1 @@
+{ __tsan_*; };
diff --git a/lib/ubsan/CMakeLists.txt b/lib/ubsan/CMakeLists.txt
index 3dd8613b..c8470bc6 100644
--- a/lib/ubsan/CMakeLists.txt
+++ b/lib/ubsan/CMakeLists.txt
@@ -34,11 +34,13 @@ else()
# Main UBSan runtime.
add_compiler_rt_static_runtime(clang_rt.ubsan-${arch} ${arch}
SOURCES ${UBSAN_SOURCES}
- CFLAGS ${UBSAN_CFLAGS})
+ CFLAGS ${UBSAN_CFLAGS}
+ SYMS ubsan.syms)
# C++-specific parts of UBSan runtime. Requires a C++ ABI library.
add_compiler_rt_static_runtime(clang_rt.ubsan_cxx-${arch} ${arch}
SOURCES ${UBSAN_CXX_SOURCES}
- CFLAGS ${UBSAN_CFLAGS})
+ CFLAGS ${UBSAN_CFLAGS}
+ SYMS ubsan.syms)
list(APPEND UBSAN_RUNTIME_LIBRARIES
clang_rt.san-${arch}
clang_rt.ubsan-${arch}
diff --git a/lib/ubsan/ubsan.syms b/lib/ubsan/ubsan.syms
new file mode 100644
index 00000000..e74de33f
--- /dev/null
+++ b/lib/ubsan/ubsan.syms
@@ -0,0 +1 @@
+{ __ubsan_*; };