about summary refs log tree commit diff homepage
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/Runtest/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/Runtest/Makefile b/runtime/Runtest/Makefile
index 82e21345..1de3281b 100644
--- a/runtime/Runtest/Makefile
+++ b/runtime/Runtest/Makefile
@@ -56,8 +56,14 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux FreeBSD GNU/kFreeBSD GNU)
 endif
 
 ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD))
+  ifeq (-fsanitize=address,$(filter -fsanitize=address,$(CXXFLAGS)))
+    # When building with ASan the library will have undefined symbols into
+    # ASan's runtime. We want to allow this and not fail the build.
+    $(warning Allowing undefined symbols in $(LIBRARYNAME) due to ASan build)
+  else
     # Don't allow unresolved symbols.
     LLVMLibsOptions += -Wl,--no-undefined
+  endif
 endif
 
 ifeq ($(HOST_OS), Linux)