Make the ASan OS X DYLD_INSERT_LIBRARIES detection path-independent

Reviewed at http://reviews.llvm.org/D6238

ASan on Darwin during launch reads DYLD_INSERT_LIBRARIES env. variable and if it's not set or if the ASan dylib is not present in there, it relaunches the process. The check whether the dylib is present in the variable is now trying to find a full path in there. This fails in the scenarios where we want to copy the dylib to the executable's directory or somewhere else and set the DYLD_INSERT_LIBRARIES manually, see http://reviews.llvm.org/D6018.

Let's change the search in DYLD_INSERT_LIBRARIES to only look for the filename of the dylib and not the full path.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@222297 91177308-0d34-0410-b5e6-96231b3b80d8