diff options
author | Matt Beaumont-Gay <matthewbg@google.com> | 2012-12-04 21:18:26 +0000 |
---|---|---|
committer | Matt Beaumont-Gay <matthewbg@google.com> | 2012-12-04 21:18:26 +0000 |
commit | 45b27380a24dcd6a39faa888b5d31192801c43f4 (patch) | |
tree | 5be10a2b987a75b0043b2d63fd7f0fa112eabd12 /lib/Analysis/PrintfFormatString.cpp | |
parent | 3e2fe86dd0dd65bff254e3bbdc0ea8df9282dc35 (diff) |
Currently, with -fsanitize=address, the driver appends libclang_rt.asan.a to
the link command. This all works fine when the driver is also responsible for
adding -lstdc++ to the link command. But, if -lstdc++ (or libstdc++.a, etc) is
passed explicitly to the driver, the ASan runtime will appear in the link
command after the standard library, leading to multiple-definition errors for
the global 'operator new' and 'operator delete'. Fix this in a painfully
simple way, by inserting libclang_rt.asan.a at the start of the link command
instead of the end.
If we need to do something more clever, we can walk the link command looking
for something that resembles libstdc++ and insert libclang_rt.asan.a as late
as possible, but the simple solution works for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169310 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/PrintfFormatString.cpp')
0 files changed, 0 insertions, 0 deletions