On Tue, May 29, 2012 at 8:46 PM, Anton Korobeynikov <anton at korobeynikov.info> wrote:> > How do I disable that feature? I've tried -fno-builtin and/or > -ffreestanding > > with no success. > clang (as well as gcc) requires that freestanding environment provides > memcpy, memmove, memset and memcmp. > > PS: Consider emailing cfedev, not llvmdev. >Hi, Thanks. I've emailed cfe-dev. We absolutely need clang/llvm to not insert the calls into our code. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120529/b2f95d99/attachment.html>
Hi Dmitry,> We absolutely need clang/llvm to not insert the calls into our code.why is that? Ciao, Duncan.
On Tue, May 29, 2012 at 9:52 AM, Dmitry Vyukov <dvyukov at google.com> wrote:> On Tue, May 29, 2012 at 8:46 PM, Anton Korobeynikov < > anton at korobeynikov.info> wrote: > >> > How do I disable that feature? I've tried -fno-builtin and/or >> -ffreestanding >> > with no success. >> clang (as well as gcc) requires that freestanding environment provides >> memcpy, memmove, memset and memcmp. >> >> PS: Consider emailing cfedev, not llvmdev. >> > > Hi, > > Thanks. I've emailed cfe-dev. > We absolutely need clang/llvm to not insert the calls into our code. >This really isn't possible. The C++ standard essentially requires the compiler to insert calls to memcpy for certain code patterns. What do you really need here? Clearly you have some way of handling when the user writes memcpy; what is different about Clang or LLVM inserting memcpy? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120529/0cd84292/attachment.html>
On Tue, May 29, 2012 at 9:16 PM, Chandler Carruth <chandlerc at google.com>wrote:> > How do I disable that feature? I've tried -fno-builtin and/or >>> -ffreestanding >>> > with no success. >>> clang (as well as gcc) requires that freestanding environment provides >>> memcpy, memmove, memset and memcmp. >>> >>> PS: Consider emailing cfedev, not llvmdev. >>> >> >> Hi, >> >> Thanks. I've emailed cfe-dev. >> We absolutely need clang/llvm to not insert the calls into our code. >> > > This really isn't possible. > > The C++ standard essentially requires the compiler to insert calls to > memcpy for certain code patterns. > > What do you really need here? Clearly you have some way of handling when > the user writes memcpy; what is different about Clang or LLVM inserting > memcpy? >I need it for ThreadSanitizer runtime. In particular http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?view=annotate line 1238. But I had similar problems in other places. Both memory access processing and signal handling are quite tricky, we can't allow recursion. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120529/93a29bc1/attachment.html>