Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
1482:2bae90a3deb9 | 1483:ba37b9335e1e |
---|---|
2547 if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) { | 2547 if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) { |
2548 if (!process_argument(tail, args->ignoreUnrecognized, origin)) { | 2548 if (!process_argument(tail, args->ignoreUnrecognized, origin)) { |
2549 return JNI_EINVAL; | 2549 return JNI_EINVAL; |
2550 } | 2550 } |
2551 } | 2551 } |
2552 } else if (match_option(option, "-graal", &tail)) { | |
2553 if (PrintVMOptions) { | |
2554 tty->print("Running Graal VM... "); | |
2555 } | |
2556 UseC1X = true; | |
2557 BootstrapC1X = true; | |
2558 const int BUFFER_SIZE = 1024; | |
2559 char maxine_dir[BUFFER_SIZE]; | |
2560 char graal_dir[BUFFER_SIZE]; | |
2561 char temp[BUFFER_SIZE]; | |
2562 if (!os::getenv("MAXINE", maxine_dir, sizeof(maxine_dir))) { | |
2563 fatal("Must set MAXINE environment variable to a Maxine project directory."); | |
2564 } | |
2565 if (PrintVMOptions) tty->print("MAXINE=%s", maxine_dir); | |
2566 if (!os::getenv("GRAAL", graal_dir, sizeof(graal_dir))) { | |
2567 fatal("Must set GRAAL environment variable to a Graal project directory."); | |
2568 } | |
2569 if (PrintVMOptions) tty->print_cr(" GRAAL=%s", graal_dir); | |
2570 sprintf(temp, "%s/C1X/bin", maxine_dir); | |
2571 scp_p->add_prefix(temp); | |
2572 sprintf(temp, "%s/CRI/bin", maxine_dir); | |
2573 scp_p->add_prefix(temp); | |
2574 sprintf(temp, "%s/Base/bin", maxine_dir); | |
2575 scp_p->add_prefix(temp); | |
2576 sprintf(temp, "%s/Assembler/bin", maxine_dir); | |
2577 scp_p->add_prefix(temp); | |
2578 sprintf(temp, "%s/c1x4hotspotsrc/HotSpotVM/bin", graal_dir); | |
2579 scp_p->add_prefix(temp); | |
2580 *scp_assembly_required_p = true; | |
2552 } else if (match_option(option, "-C1X:", &tail)) { // -C1X:xxxx | 2581 } else if (match_option(option, "-C1X:", &tail)) { // -C1X:xxxx |
2553 // Option for the C1X compiler. | 2582 // Option for the C1X compiler. |
2554 if (PrintVMOptions) { | 2583 if (PrintVMOptions) { |
2555 tty->print_cr("C1X option %s", tail); | 2584 tty->print_cr("C1X option %s", tail); |
2556 } | 2585 } |