On 06/30/2010 04:21 PM, Jan Hubicka wrote: >> Long term we could arrange for libbackend.a to become libbackend.dll and >> have that library be used for plugins. The existing practice of linking >> back into the main executable is more or less an efficiency hack that >> happens to work with ELF. > > It also makes WHOPR with -fwhole-program possible on GCC. If we will want to > have dynamically linkable backend library, we would need to clean up our > interfaces quite a lot so frontend does not link into backend other way than > by > langhooks. (or make other crosslinking explicit via externally_visible) Not > that would be a bad thing. I made absolutely no measurements yet if linking > frotned into backend improves performance in any sensible way.
For i386-elf (and probably several other important targets) host, linking the front end and backend together means that libbackend does not need to be compiled -fPIC which would definitely affect performance. For elf host, I think we would have to have a much stronger reason to split the compiler into a shared library than plugins. We could perhaps enable it during development to help make sure that Windows continues to build, but I would hope there would be enough testers there to let us know quickly if something broke. r~