Building stage1 only
eir at cis.upenn.edu
Tue Oct 20 15:06:41 UTC 2015
I'll offer my own tips & tricks below. Adopt which ones you like!
On Oct 20, 2015, at 9:19 AM, Ömer Sinan Ağacan <omeragacan at gmail.com> wrote:
> I'm actually swtiching branches quite a lot, because most of the time I have
> multiple tasks at hand, working on multiple tickets etc.
Yes, switching branches causes lots of problems. To avoid this, I maintain many (13, today) different ghc repos, each in different states/branches. Then I don't have to recompile. Since starting doing this, I haven't looked back -- much better than just one repo with many branches. And git makes it easy enough to move changes back and forth when necessary. (Some repos are actually on the same branch as others but just with different build settings.)
> But I think there's another way to introduce this kind of failures. Since
> compilation take very long, I never start the build process and wait until it's
> done, I keep coding in the meantime. Maybe I should rsync changes manually to
> another directory and run build there while I keep working on current tree etc.
I do this also and have not run into trouble with editing while compiling. I don't think this is the issue.
> I just tried `make 1` in ghc directory and I think it worked(I'll try on a
> clean tree once I have to `make clean` and see if it's really building only
> stage-1). But my next question is why marking it as such in build.mk doesn't
> work.. I'd expect `devel1` to build stage1 only.
devel1 means that you're debugging the stage1 compiler, so that compiler is built without optimizations and with DEBUG set. But a great test case for debugging the compiler is building GHC itself. So I wouldn't want devel1 to stop building stage2.
> 2015-10-20 3:12 GMT-04:00 Jan Stolarek <jan.stolarek at p.lodz.pl>:
>>> it's very easy to end up in a state where `make` simply can't build, and only
>>> easy fix is a `make clean`
>> Out of sheer curiosity: in what situations does that happen for you? *If* you are working on a
>> single branch, ie. you're not switching back and forth between master and your feature branches,
>> this should not happen (and even if you switch between branches it should still be safe for most
>> of the time). Richard already gave you a trick (cd ghc/ && make 2) that allows to build only
>> stage 2 compiler without rebuilding stage 1 or any of the libraries. One situation that comes to
>> my mind that can really require a full rebuild is changing format of interface files. But other
>> than that you shouldn't have to do a full rebuild too often.
>> I know how you feel. When I started working on GHC I had to do a full rebuild very often. But now
>> I improved my workflow and only do a full build after a major rebase of my branch against master.
>> Politechnika Łódzka
>> Lodz University of Technology
>> Treść tej wiadomości zawiera informacje przeznaczone tylko dla adresata.
>> Jeżeli nie jesteście Państwo jej adresatem, bądź otrzymaliście ją przez pomyłkę
>> prosimy o powiadomienie o tym nadawcy oraz trwałe jej usunięcie.
>> This email contains information intended solely for the use of the individual to whom it is addressed.
>> If you are not the intended recipient or if you have received this message in error,
>> please notify the sender and delete it from your system.
> ghc-devs mailing list
> ghc-devs at haskell.org
More information about the ghc-devs