OSDN Git Service

Fix AddressSanitizer link order and multilib setup.
authorEvgenii Stepanov <eugenis@google.com>
Fri, 24 Apr 2015 23:34:47 +0000 (16:34 -0700)
committerEvgenii Stepanov <eugenis@google.com>
Mon, 27 Apr 2015 21:48:35 +0000 (14:48 -0700)
commitf0b15e173be354301fa38354d016211192e36460
tree9dcf330c557cf9f999169dba3f20e09d33ccf59b
parentb271669a0c6dd4287ed1631acecd94c3f443bc8d
Fix AddressSanitizer link order and multilib setup.

ASan runtime library (when using dynamic linking) must be the first
dependency of the main executable to achieve correct symbol
interposition. This matches how the clang driver works.

In multilib setup, ASan-RT name depends on the target arch:
  /system/lib/libclang_rt.asan-arm-android.so
  /system/lib64/libclang_rt.asan-arm64-android.so

We also set RPATH to /system/lib/asan or /system/lib64/asan
to have a place for ASan-only versions of system libraries.

Change-Id: I5c0cdb89e5e08a1950eb276e406da9f31a6e52dd
core/clang/TARGET_arm.mk
core/clang/TARGET_arm64.mk
core/clang/config.mk
core/config_sanitizers.mk