Using new build

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Fri Apr 27 01:50:54 PDT 2012


On 2012-04-26 17:43, Jonathan Gibbons wrote:
> A couple of questions about new build.
>
> Sometimes a build fails because of dev changes. One of the useful 
> features about the existing build is the ability to cut n paste a 
> command, and to modify/execute that command outside the build to debug 
> the dev changes. Is it easy to get a log of the commands being executed?

Right now the easiest way to get a log output similar to the old one is 
by running
make VERBOSE=

>
> Right now, the existing build is sequential and relies on starting 
> from the beginning.  This might mean that you have to build A and B to 
> get to C, even though C does not depend on A and B.   Are the 
> dependencies in the new build accurate enough, and the interim targets 
> public enough that I could take a clean forest, go "make C" and have 
> it build the minimum set of dependencies necessary to get to C?   This 
> would certainly help developers debug problematic code.

Having correct dependencies is one of the cornerstones of the new build 
system.

On the top-level view, there are dependencies between sub-systems: jdk 
depends on langtools, hotspot and corba, for instance. So this means 
that even if you changed only jdk, langtools and corba will still be 
checked. This works well if the sub-makes is fast in determining that 
nothing has changed. Apart from hotspot (which we haven't approached 
yet), the dependencies for jdk is checked in just a few seconds on my 
system. So this is the small price you have to pay to get the confidence 
of always getting a correct build.

Since make enforces these dependencies, you can't just say "make jdk" 
and hope that it ignores checking the dependencies.

If you want to build only something further "up" in the chain, like 
langtools, it might make sense to do "make langtools", since then you 
skip checking hotspot and jdk for changes that are not there. On the 
other hand, you're not guaranteed to have a working jdk, just a working 
langtools compilation.

When we talk about changes in the individual subsystems, things are 
slightly different. Here we have, as far as possible, written makefiles 
with proper dependencies on a file level. This means that, in theory, a 
modified file should trigger just the minimal set of changes needed to 
update the build. In practice, we might not have optimal paths at all 
places. And before Fredrik is done with the new "smart javac", 
incremental Java compilation is no good.

/Magnus




More information about the build-infra-dev mailing list