How to specify the build output directory?

Volker Simonis volker.simonis at gmail.com
Mon Oct 28 11:03:35 PDT 2013


Hi Mick,

OpenJDK always had the ability to specify an alternative output
direcory (ALT_OUTPUTDIR in the old build system or just the directory
from which you call configure in the new build system). The same holds
true for all GNU and autoconf configured software which actually
strongly recommends not to build into the source directory.

It may be that this is different for Maven which I'm not familiar at
all with and which always seemed a little obscure to me. But anyway
that only seems to work for Java-only code which is not the case here.

Nevertheless thank you for pointing out the background of mx. I'll try
and see how far I can get with you and Doug's hints.

Regards,
Volker

PS: the big and ugly .hgignore file already seemed suspicious to me
right after I cloned Graal for the first time:) Now I know why it is
needed...



On Mon, Oct 28, 2013 at 6:43 PM, Mick Jordan <mick.jordan at oracle.com> wrote:
> 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