comparison src/share/vm/runtime/arguments.cpp @ 5152:cfdb3c24bd6c

changed Graal class path declaration (back) to a constant that is checked for correctness during building
author Doug Simon <doug.simon@oracle.com>
date Fri, 23 Mar 2012 11:48:39 +0100
parents ba5e8ba07b5c
children af59b4dfc9e4
comparison
equal deleted inserted replaced
5151:5717fc2be01c 5152:cfdb3c24bd6c
2125 vm_exit(0); 2125 vm_exit(0);
2126 } 2126 }
2127 } 2127 }
2128 if (PrintVMOptions) tty->print_cr("GRAAL=%s", graal_dir); 2128 if (PrintVMOptions) tty->print_cr("GRAAL=%s", graal_dir);
2129 2129
2130 // this declaration is checked for correctness by 'mx build' - only
2131 // modify its entries, not its name or shape
2132 const char* graal_projects[] = {
2133 "com.oracle.max.criutils",
2134 "com.oracle.graal.hotspot",
2135 "com.oracle.max.asm",
2136 "com.oracle.graal.alloc",
2137 "com.oracle.graal.snippets",
2138 "com.oracle.graal.compiler",
2139 "com.oracle.graal.nodes",
2140 "com.oracle.graal.printer",
2141 "com.oracle.max.cri",
2142 "com.oracle.graal.debug",
2143 "com.oracle.graal.graph",
2144 "com.oracle.graal.lir",
2145 "com.oracle.graal.lir.amd64",
2146 "com.oracle.graal.java"
2147 };
2148
2130 SysClassPath scp_compiler(""); 2149 SysClassPath scp_compiler("");
2131 struct dirent* dentry; 2150 const int len = sizeof(graal_projects) / sizeof(char*);
2132 char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(graal_dir)); 2151 for (int i = 0; i < len; i++) {
2133 errno = 0; 2152 if (PrintVMOptions) {
2134 DIR* graal_dir_handle = os::opendir(graal_dir); 2153 tty->print_cr("Adding project directory %s to bootclasspath", graal_projects[i]);
2135 while ((dentry = os::readdir(graal_dir_handle, (struct dirent *)tdbuf)) != NULL) { 2154 }
2136 if (strcmp(dentry->d_name, ".") != 0 && strcmp(dentry->d_name, "..") != 0 && strcmp(dentry->d_name, "com.oracle.graal.tests") != 0 && strcmp(dentry->d_name, "com.oracle.graal.jtt") != 0) { 2155 prepend_to_graal_classpath(scp_compiler, graal_dir, graal_projects[i]);
2137 prepend_to_graal_classpath(scp_compiler, graal_dir, dentry->d_name); 2156 }
2138 if (PrintVMOptions) {
2139 tty->print_cr("Adding project directory %s to bootclasspath", dentry->d_name);
2140 }
2141 }
2142 }
2143 os::closedir(graal_dir_handle);
2144 FREE_C_HEAP_ARRAY(char, tdbuf);
2145 scp_compiler.expand_endorsed(); 2157 scp_compiler.expand_endorsed();
2146 2158
2147 Arguments::set_compilerclasspath(scp_compiler.combined_path()); 2159 Arguments::set_compilerclasspath(scp_compiler.combined_path());
2148 #endif 2160 #endif
2149 2161