-
Notifications
You must be signed in to change notification settings - Fork 37
Move build products out of the ghc tree #113
Comments
Agreed, it's time to start moving things around. Let me take care of this. |
I moved most build artefacts to
This is still work in progress and there are a few temporary hacks. I'll probably drop the intermediate The current progress is:
Should be able to finish this tomorrow, although the last one seems tricky. We may first need to tackle the |
Coming across some limitations unfortunately. For example:
For some reason Does anyone know the reason for |
And some more :-(
|
Another mystery. When invoking the following command:
I get the following error:
Even though folder Could this be a GHC bug too? |
I guess you are hitting this: -- | Find out path to @ghcversion.h@ file
getGhcVersionPathName :: DynFlags -> IO FilePath
getGhcVersionPathName dflags = do
dirs <- getPackageIncludePath dflags [rtsUnitId]
found <- filterM doesFileExist (map (</> "ghcversion.h") dirs)
case found of
[] -> throwGhcExceptionIO (InstallationError ("ghcversion.h missing"))
(x:_) -> return x from |
@angerman Thanks! I think you are right. |
OK, it looks like moving generated files from The only remaining bit then is to move files produced by |
@hvr, just mentioned https://ghc.haskell.org/trac/ghc/ticket/8040 on irc. |
@angerman Thanks. Maybe we need to link to this issue from that ticket. |
@snowleopard done. Just linked this issue from trac. @snowleopard could you leave a compiled list of all the files we had to leave in the ghc tree and could not move out of it? So we can track that separately and potentially fix it upstream? |
@angerman Thanks! Here is the list of what will stay in the tree for now:
|
@snowleopard, I think I have fixes for most of the issues above in D2530. This leaves only the |
@bgamari Great, many thanks!
Just to make sure I understand: are you saying we no longer need to generate files into If yes, I'll give it a try! Adding build directory to |
I believe so. D2530 has been merged so you should now be able to move ahead with this. Let me know if you have any trouble. |
@bgamari Thanks! The above commit moves all generated includes into There are still a few remaining bits, see the todo list in #113 (comment). The biggest one is the files generated by |
@bgamari Ah, there is still one remaining relative path in
|
Andrey Mokhov [email protected] writes:
|
@bgamari Thanks for fixing! There is one more problem: I temporarily copy |
Yes, it is. In an earlier message I suggested you deal with this by adding your build directory to the |
@bgamari Ah, indeed, I confused filenames -- sorry! As I understand, you refer to the following line in RTS
In a way, we'd like to change it to
This is a bit tricky, because |
Heh, oh that is devious ;) |
What's the progress on this? When I run a Hadrian build with the master branches, I still get a pile of stage0/stage1/stage2 directories. |
@ezyang The progress is tracked here: #113 (comment) The pile of stage0/1/2 directories is generated by |
The above commits move the directories generated by I believe we can now close this issue, because moving program binaries outside Note: If you spot any other build artefacts that should be moved outside of the GHC tree, feel free to reopen this issue, or even better create a new one. |
We've discussed this in #32 already when debating how to properly reset the build. So far we have depended on the build products being built inside of the ghc tree, such that we could potentially use makes build artifacts during the build. As we now can build on Windows, OS X and Linux.
The text was updated successfully, but these errors were encountered: