How to specify the build output directory?

Doug Simon doug.simon at oracle.com
Mon Oct 28 10:17:05 PDT 2013


I think this should help:

$ mx buildvars
HotSpot build variables that can be set by the -D option to "mx build":

ALT_BOOTDIR
    The location of the bootstrap JDK installation (default: /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home)
ALT_OUTPUTDIR
    Build directory
HOTSPOT_BUILD_JOBS
    Number of CPUs used by make (default: 4)
INSTALL
    Install the built VM into the JDK? (default: y)
ZIP_DEBUGINFO_FILES
    Install zipped debug symbols file? (default: 0)

Note that these variables can be given persistent values in the file /Users/dsimon/linz/basic-graal/mx/env (see 'mx about').

You then use this in combination with the --installed-jdks option. For example:

$ mx --installed-jdks /tmp/alt-jdks build -DALT_OUTPUTDIR=/tmp/alt-jdks/build

Christian Thalinger has some experience using --installed-jdks for (re)using a current JDK workspace so he can provide further help if the 'mx help' info for the --installed-jdks option is not clear enough.

-Doug

On Oct 28, 2013, at 5:54 PM, Volker Simonis <volker.simonis at gmail.com> 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?
> 
> Thank you and best regards,
> Volker



More information about the graal-dev mailing list