[cfe-commits] r163689 - /cfe/trunk/lib/Driver/Tools.cpp
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Wed Sep 12 02:09:08 PDT 2012
Author: eugenis
Date: Wed Sep 12 04:09:08 2012
New Revision: 163689
URL: http://llvm.org/viewvc/llvm-project?rev=163689&view=rev
Log:
Make -faddress-sanitizer on Android link to the new-style runtime.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=163689&r1=163688&r2=163689&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Sep 12 04:09:08 2012
@@ -1392,14 +1392,13 @@
if (!Args.hasArg(options::OPT_shared)) {
if (!Args.hasArg(options::OPT_pie))
TC.getDriver().Diag(diag::err_drv_asan_android_requires_pie);
- // For an executable, we add a .preinit_array stub.
- CmdArgs.push_back("-u");
- CmdArgs.push_back("__asan_preinit");
- CmdArgs.push_back("-lasan");
}
- CmdArgs.push_back("-lasan_preload");
- CmdArgs.push_back("-ldl");
+ SmallString<128> LibAsan(TC.getDriver().ResourceDir);
+ llvm::sys::path::append(LibAsan, "lib", "linux",
+ (Twine("libclang_rt.asan-") +
+ TC.getArchName() + "-android.so"));
+ CmdArgs.push_back(Args.MakeArgString(LibAsan));
} else {
if (!Args.hasArg(options::OPT_shared)) {
// LibAsan is "libclang_rt.asan-<ArchName>.a" in the Linux library
More information about the cfe-commits
mailing list