Mercurial > hg > truffle
diff src/share/vm/runtime/arguments.cpp @ 1483:ba37b9335e1e
New option "-graal" that sets up the correct boot class path and C1X options using only the two environment variables MAXINE and GRAAL.
This greatly simplifies command line arguments necessary to start the Graal VM.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Mon, 29 Nov 2010 16:58:26 +0100 |
parents | 9e5e83ca2259 |
children | 2d26b0046e0d |
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp Mon Nov 29 12:02:16 2010 +0100 +++ b/src/share/vm/runtime/arguments.cpp Mon Nov 29 16:58:26 2010 +0100 @@ -2549,6 +2549,35 @@ return JNI_EINVAL; } } + } else if (match_option(option, "-graal", &tail)) { + if (PrintVMOptions) { + tty->print("Running Graal VM... "); + } + UseC1X = true; + BootstrapC1X = true; + const int BUFFER_SIZE = 1024; + char maxine_dir[BUFFER_SIZE]; + char graal_dir[BUFFER_SIZE]; + char temp[BUFFER_SIZE]; + if (!os::getenv("MAXINE", maxine_dir, sizeof(maxine_dir))) { + fatal("Must set MAXINE environment variable to a Maxine project directory."); + } + if (PrintVMOptions) tty->print("MAXINE=%s", maxine_dir); + if (!os::getenv("GRAAL", graal_dir, sizeof(graal_dir))) { + fatal("Must set GRAAL environment variable to a Graal project directory."); + } + if (PrintVMOptions) tty->print_cr(" GRAAL=%s", graal_dir); + sprintf(temp, "%s/C1X/bin", maxine_dir); + scp_p->add_prefix(temp); + sprintf(temp, "%s/CRI/bin", maxine_dir); + scp_p->add_prefix(temp); + sprintf(temp, "%s/Base/bin", maxine_dir); + scp_p->add_prefix(temp); + sprintf(temp, "%s/Assembler/bin", maxine_dir); + scp_p->add_prefix(temp); + sprintf(temp, "%s/c1x4hotspotsrc/HotSpotVM/bin", graal_dir); + scp_p->add_prefix(temp); + *scp_assembly_required_p = true; } else if (match_option(option, "-C1X:", &tail)) { // -C1X:xxxx // Option for the C1X compiler. if (PrintVMOptions) {