How to specify the build output directory?

Mick Jordan mick.jordan at oracle.com
Mon Oct 28 10:43:31 PDT 2013


On 10/28/13 9:54 AM, Volker Simonis wrote:
> Hi,
>
> I've just started to play around with Graal but I couldn't find a way
> to specify a build output directory to the mx  tool.
>
> While I personally don't like to clobber my source directory with
> unknown build artifacts (and I think it is good practice not to do
> so), not having the possibility to specify an arbitrary output
> directory also implies practical problems. The most important is that
> it seems to me that it is not possible to build Graal for two
> platforms from the same repository because the output will be mixed
> (and the settings in mx/env will be shared).
>
> For me, building the same repository on different platforms seems an
> essential feature. Otherwise I'll always have to mess with
> transplanting changesets back and forth to ensure the changes for one
> platform don't break another one.
>
> So to cut a long story short - is there a possibility with the current
> Graal build tools to redirect all the build output to a configurable
> directory? And if not, are there any plans to provide such a feature?
> Or am I missing something here?
>
> T
Doug has answered the Hotspot side of this, which may be all you need. 
If mx has a philosophy (cf mvn), it is to focus on the source and hide 
the details of the binary files (derived) files. There has never been 
any support for cross-compilation to a different architecture in the 
same workspace, which is in a sense the degenerate form of multiple 
platform support. The problem is complicated by the myriad forms of 
derived output, which is not all conveniently located in one place. This 
became even more complicated when mx became responsible for building 
Hotspot (indirectly via gmake).

In the past we have 'solved' this with target-specific clones of the 
repo. If you can do the majority of your development in one workspace 
and just test the other platforms, this works ok. In a sense then, the 
way you specify the output directory is to clone the workspace. If you 
are going to be jumping around actually developing platform-specific 
code on different platforms concurrently, then not so.

Mick



More information about the graal-dev mailing list