Patch for __builtin_bzero

Hi,

with the attached patch, vim7 can be built with `make CC=ccc`. Linking takes about 3 minutes (with a debug build of llvm), and vim's build process runs the linker several times (at least 3 times), so total linking time is about 3 minutes.

The patch adds support for __builtin_bzero. OS X' headers use that in FD_SET. __builtin_bzero() simply calls the library's bzero() in this patch. Would it be better to use the llvm.memset intrinsic instead? I believe Windows does not have bzero in its c library.

Nico

bzero.patch (489 Bytes)

builtin-bzero.c (248 Bytes)

Hi,

with the attached patch, vim7 can be built with `make CC=ccc`. Linking takes
about 3 minutes (with a debug build of llvm), and vim's build process runs
the linker several times (at least 3 times), so total linking time is about
3 minutes.

Okay, cool... although the difference between debug and release is
pretty big. clang is roughly 2x faster in release mode, and linking
is roughly 5x faster, if I recall correctly.

__builtin_bzero() simply calls the library's bzero() in this patch.
Would it be better to use the llvm.memset intrinsic instead? I believe
Windows does not have bzero in its c library.

I'd say don't bother for the moment; if it becomes an issue, we can
deal with it later.

-Eli

Great. Can someone commit the patch? I changed the test so that it does no longer compile and execute the code, it now uses grep.

Nico

bzero.patch (489 Bytes)

builtin-bzero.c (140 Bytes)