Workflow question (changing codegen)
Ömer Sinan Ağacan
omeragacan at gmail.com
Mon Jul 1 07:42:07 UTC 2019
My current workaround is this: I have a branch which is just master + the new
file I've added. I first build it from a clean tree (git clean -xfd; then
build), then switch to my branch, and run `make 1` in `compiler/`. That way I
don't have to run ./configure (because the new file is already built and tracked
by the build system) so the compiler version does not change and my stage 1
compiler can use the libraries I built with master.
I guess the root cause of this is that I have to run ./configure for the build
system to track my new file, but doing that also updates the compiler version.
Avoiding any of these (updating compiler version, or having to run configure
when adding new files) would make this much easier.
Ömer Sinan Ağacan <omeragacan at gmail.com>, 28 Haz 2019 Cum, 12:09
tarihinde şunu yazdı:
> Hi all,
> I'm currently going through this torturous process and I'm hoping that someone
> here will be able to help.
> I'm making changes in the codegen. My changes are currently buggy, and I need a
> working stage 1 compiler to be able to debug. Basically I need to build
> libraries using the branch my changes are based on, then build stage 1 with my
> branch, so that I'll be able to build and run programs using stage 1 that uses
> my codegen changes. The changes are compatible with the old codegen (i.e. no
> changes in calling conventions or anything like that) so this should work.
> Normally I do this
> $ git checkout master
> $ git distclean && ./boot && ./configure && make
> $ git checkout my_branch
> $ cd compiler; make 1
> This gives me stage 1 compiler that uses my buggy codegen changes, plus
> libraries built with the old and correct codegen.
> However the problem is I'm also adding a new file in my_branch, and the build
> system just doesn't register that fact, even after adding the line I added to
> compiler/ghc.cabal.in to compiler/ghc.cabal. So far the only way to fix this
> that I could find was to run ./configure again, then run make for a few seconds
> at the top level, then do `make 1` in compiler/. Unfortunately even that doesn't
> work when the master branch and my_branch have different dates, because `make`
> in master branch produces a different version than the `make` in my_branch, so
> the interface files become incompatible.
> Anyone have any ideas on how to proceed here?
More information about the ghc-devs