Let clang decide ASan linker flags for the host.

Pass -fsanitize=address instead of manually specifying asan libraries
and other linker flags.

Note that we enable LOCAL_ALLOW_UNDEFINED_SYMBOLS by default for host
builds because ASAN only links symbols in the final executable, so
there will _always_ be undefined symbols in intermediate libraries.

Bug: 18208352
Change-Id: Ief55ab296e94974560eeb10507ec8d90f0025d5c
diff --git a/core/clang/config.mk b/core/clang/config.mk
index 05066c8..91073ba 100644
--- a/core/clang/config.mk
+++ b/core/clang/config.mk
@@ -107,15 +107,8 @@
 ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS := -fsanitize=address -fno-omit-frame-pointer
 ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS := -Wl,-u,__asan_preinit
 
-ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS_HOST := -rdynamic
-ADDRESS_SANITIZER_CONFIG_EXTRA_LDLIBS_HOST := -lpthread -ldl
-ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES_HOST :=
-ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES_HOST := libasan
-
-ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS_TARGET :=
-ADDRESS_SANITIZER_CONFIG_EXTRA_LDLIBS_TARGET :=
-ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES_TARGET := libdl $(ADDRESS_SANITIZER_RUNTIME_LIBRARY)
-ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES_TARGET := libasan
+ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES := libdl $(ADDRESS_SANITIZER_RUNTIME_LIBRARY)
+ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES := libasan
 
 # This allows us to use the superset of functionality that compiler-rt
 # provides to Clang (for supporting features like -ftrapv).