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

Alexey Samsonov samsonov at google.com
Mon Jan 21 01:07:01 PST 2013


Author: samsonov
Date: Mon Jan 21 03:07:01 2013
New Revision: 173015

URL: http://llvm.org/viewvc/llvm-project?rev=173015&view=rev
Log:
ASan: use dynamic lookup when building dynamic ASan runtime on Mac, because shadow mapping and offset are defined in the instrumented modules instead of runtime

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

Modified: compiler-rt/trunk/lib/asan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=173015&r1=173014&r2=173015&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/CMakeLists.txt Mon Jan 21 03:07:01 2013
@@ -99,7 +99,10 @@
             $<TARGET_OBJECTS:RTSanitizerCommon.osx>
     CFLAGS ${ASAN_CFLAGS}
     DEFS ${ASAN_DYLIB_DEFINITIONS}
-    LINKFLAGS "-framework Foundation")
+    # Dynamic lookup is needed because shadow scale and offset are
+    # provided by the instrumented modules.
+    LINKFLAGS "-framework Foundation"
+              "-undefined dynamic_lookup")
   list(APPEND ASAN_DYNAMIC_RUNTIME_LIBRARIES clang_rt.asan_osx_dynamic)
 endif()
 





More information about the llvm-commits mailing list