Mercurial > hg > graal-compiler
annotate src/share/tools/ProjectCreator/ProjectCreator.java @ 10038:9645cfaffc62
CodeUtil.isPowerOf2 should not return true for Integer/Long.MIN_VALUE.
CodeUtil.log2 should work even for numbers that are not powers of 2
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 14 Jun 2013 11:16:08 +0200 |
parents | 989155e2d07a |
children | 3cce976666d9 |
rev | line source |
---|---|
0 | 1 /* |
6842
b9a9ed0f8eeb
7197424: update copyright year to match last edit in jdk8 hotspot repository
mikael
parents:
6801
diff
changeset
|
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 public class ProjectCreator { |
0 | 26 |
6801 | 27 public static void usage() { |
28 System.out.println("ProjectCreator options:"); | |
29 System.err.println("WinGammaPlatform platform-specific options:"); | |
30 System.err.println(" -sourceBase <path to directory (workspace) " | |
31 + "containing source files; no trailing slash>"); | |
32 System.err.println(" -dspFileName <full pathname to which .dsp file " | |
33 + "will be written; all parent directories must " | |
34 + "already exist>"); | |
35 System.err.println(" -envVar <environment variable to be inserted " | |
36 + "into .dsp file, substituting for path given in " | |
37 + "-sourceBase. Example: HotSpotWorkSpace>"); | |
38 System.err.println(" -dllLoc <path to directory in which to put " | |
7456
7d42f3b08300
8005044: remove crufty '_g' support from HS runtime code
dcubed
parents:
6842
diff
changeset
|
39 + "jvm.dll; no trailing slash>"); |
6801 | 40 System.err.println(" If any of the above are specified, " |
41 + "they must all be."); | |
42 System.err.println(" Additional, optional arguments, which can be " | |
43 + "specified multiple times:"); | |
44 System.err.println(" -absoluteInclude <string containing absolute " | |
45 + "path to include directory>"); | |
46 System.err.println(" -relativeInclude <string containing include " | |
47 + "directory relative to -envVar>"); | |
48 System.err.println(" -define <preprocessor flag to be #defined " | |
49 + "(note: doesn't yet support " + "#define (flag) (value))>"); | |
50 System.err.println(" -perFileLine <file> <line>"); | |
51 System.err.println(" -conditionalPerFileLine <file> <line for " | |
52 + "release build> <line for debug build>"); | |
53 System.err.println(" (NOTE: To work around a bug in nmake, where " | |
54 + "you can't have a '#' character in a quoted " | |
55 + "string, all of the lines outputted have \"#\"" + "prepended)"); | |
56 System.err.println(" -startAt <subdir of sourceBase>"); | |
57 System.err.println(" -ignoreFile <file which won't be able to be " | |
58 + "found in the sourceBase because it's generated " + "later>"); | |
59 System.err.println(" -additionalFile <file not in database but " | |
60 + "which should show up in .dsp file>"); | |
61 System.err | |
62 .println(" -additionalGeneratedFile <environment variable of " | |
63 + "generated file's location> <relative path to " | |
64 + "directory containing file; no trailing slash> " | |
65 + "<name of file generated later in the build process>"); | |
66 System.err.println(" -prelink <build> <desc> <cmds>:"); | |
67 System.err | |
68 .println(" Generate a set of prelink commands for the given BUILD"); | |
69 System.err | |
70 .println(" (\"Debug\" or \"Release\"). The prelink description and commands"); | |
71 System.err.println(" are both quoted strings."); | |
72 System.err.println(" Default includes: \".\""); | |
73 System.err | |
74 .println(" Default defines: WIN32, _WINDOWS, \"HOTSPOT_BUILD_USER=$(USERNAME)\""); | |
75 } | |
0 | 76 |
6801 | 77 public static void main(String[] args) { |
78 try { | |
79 if (args.length < 3) { | |
80 usage(); | |
81 System.exit(1); | |
82 } | |
0 | 83 |
6801 | 84 String platformName = args[0]; |
85 Class platformClass = Class.forName(platformName); | |
86 WinGammaPlatform platform = (WinGammaPlatform) platformClass | |
87 .newInstance(); | |
0 | 88 |
6801 | 89 String[] platformArgs = new String[args.length - 1]; |
90 System.arraycopy(args, 1, platformArgs, 0, platformArgs.length); | |
0 | 91 |
6801 | 92 // Allow the platform to write platform-specific files |
93 platform.createVcproj(platformArgs); | |
94 } catch (Exception e) { | |
95 e.printStackTrace(); | |
96 System.exit(1); | |
97 } | |
98 } | |
0 | 99 } |