[cfe-dev] clang 3.1 (trunk at r154095) + mingw gcc 4.6.2 slowness

Jon jon.forums at gmail.com
Thu Apr 5 09:34:21 PDT 2012


This is a redux of http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-March/020078.html and I'd like to understand if I'm just building clang incorrectly, or whether this is simply the current state of things.

I suspect the slowness is due to the `clang` driver having to use the `gcc` driver to assemble and link. Perhaps MSYS's `sh` is also getting pulled into the party.

I build clang (Win7 32bit) from an svn checkout using a custom integrated MSYS/MinGW 4.6.2/autoconf toolchain like:

  sh ../llvm-svn/configure --prefix=c:/clang --enable-optimized --disable-assertions \
     --disable-docs --disable-pic --disable-pthreads --enable-targets=x86 \
     --with-c-include-dirs=c:/DevKit/mingw/include --prefix=c:/clang
  make
  make install

Using that freshly built clang to build something trivial like https://github.com/thecodeshop/w32time I get the following build times:

# MinGW GCC 4.6.2
timer make
gcc -O2 -o w32time.exe -Wall w32time.c
...
real    0.608
system  0.093
user    0.000


# Clang 3.1 (trunk at r154095)
timer make CC=c:/clang/bin/clang.exe
c:/clang/bin/clang.exe -O2 -o w32time.exe -Wall w32time.c
...
real    5.101
system  0.046
user    0.000

Building './configure' based projects shows similar slowness.

Why is this, and what are the suggested workarounds?

FWIW, my clang advertises itself as posix thread model, and gcc advertises as win32 thread model. There is no `libwinpthread-1.dll` on PATH.

Jon

---
Fail fast. Fail often. Fail publicly. Learn. Adapt. Repeat.
http://thecodeshop.github.com | http://jonforums.github.com/
twitter: @jonforums



More information about the cfe-dev mailing list