[cfe-dev] clang 3.1 (trunk at r154095) + mingw gcc 4.6.2 slowness
jon.forums at gmail.com
Sun Apr 8 17:32:50 PDT 2012
> How about adding LDFLAGS=-static (or similarly linking libstdc++ as static)?
Well, that's almost magical. Thanks for the tip as it makes clang+mingw much more usable.
With LDFLAGS=-static, I get the following on the trivial https://github.com/thecodeshop/w32time test case:
# MinGW GCC 4.6.2
# clang 3.1 (trunk 154297)
timer make CC=c:/clang/bin/clang.exe
c:/clang/bin/clang.exe -O2 -o w32time.exe -Wall w32time.c
And -v/-### shows clang still calling gcc in order to invoke as.exe and collect2.exe.
FWIW, this static clang+mingw also configured/built Ruby on Win7 in about the same time as MinGW 4.6.2.
I see clang/clang++ (~22.5MB not stripped) and clang.dll (~12.6MB) are roughly the same size as those not built with LDFLAGS=-static. What exactly did LDFLAGS=-static change?
Static clang is my new build configuration for experimenting. Any downsides or other tradeoffs I should be aware of?
More information about the cfe-dev