Merge _stub.o files into the main .o file (Fixes #3687 and #706)
authorSimon Marlow <marlowsd@gmail.com>
Mon, 31 Jan 2011 10:32:24 +0000 (10:32 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 5 Apr 2011 13:12:19 +0000 (14:12 +0100)
commit7b0ff1792d699ff02a604163c9ccf4a98a1ca3eb
tree39d13b2316841d8566e9dfda06fe6b9a07aa389f
parent0ce8f5e727dfb59857a0f6e34d7617796e76baac
Merge _stub.o files into the main .o file (Fixes #3687 and #706)
Now GHC still generates the _stub.c files, but the object file is
automatically merged into the main .o file for a module.  This means
that build systems (including GHC's own) no longer need to worry about
looking for _stub.o files and including them when linking.

I had to do lots of refactoring in DriverPipeline to make this work;
now there's a monad to carry around all the information, and
everything is a lot tidier.

The _stub.c is now created as a temporary file and removed after
compilation (unless the -keep-tmp-files flag is on).
compiler/main/CodeOutput.lhs
compiler/main/DriverPhases.hs
compiler/main/DriverPipeline.hs
compiler/main/Finder.lhs
compiler/main/GhcMake.hs
compiler/main/HscMain.lhs
compiler/main/HscTypes.lhs
rules/build-package-way.mk